Using globalize-compiler@1.1.1, we compiled CLDR data using globalize@1.4.2.
But when we load the compiled code using globalize@1.5.0/dist/globalize-runtime, we are seeing the following error.
return partsJoin( numberToPartsFormatter( value ));
^
TypeError: numberToPartsFormatter is not a function
at Object.numberFormatter (...\test-globalize-1.5.0\node_modules\globalize\dist\globalize-runtime\number.js:579:21)
at ...\test-globalize-1.5.0\node_modules\globalize\dist\globalize-runtime\date.js:697:38
at String.replace (<anonymous>)
at dateFormat (...\test-globalize-1.5.0\node_modules\globalize\dist\globalize-runtime\date.js:388:21)
at dateToPartsFormatter (...\test-globalize-1.5.0\node_modules\globalize\dist\globalize-runtime\date.js:1575:10)
at dateFormatter (...\test-globalize-1.5.0\node_modules\globalize\dist\globalize-runtime\date.js:715:21)
at Object.<anonymous> (...\test-globalize-1.5.0\index2.js:3:67)
at Module._compile (internal/modules/cjs/loader.js:734:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:745:10)
at Module.load (internal/modules/cjs/loader.js:626:32)
Description
I believe the semantic version mechanism in globalize is not honored.
The data generated by 1.4.2, should be able to load by 1.5.0. If the older data is not intended to be loadable, the runtime engine should be bumped to 2.0.0.
We checked runtime of 1.4.3 can successfully load data compiled from 1.4.2.
We are developing a web UI component package and we packaged the precompiled globalize.js (1.4.2) in our NPM package. As globalize recently released as 1.5.0 about 2 days ago, all new installs of our web UI package start picking up globalize@1.5.0 and it's breaking our component because the data cannot be loaded with the newer runtime.
we were running into the same issue, with a slight variation though:
globalize@1.5.0 (and 1.6.0) runtime threw the same error when using data compiled with globalize-compiler 1.0.0 (and no variation in the runtime)
Background
Using
globalize-compiler@1.1.1
, we compiled CLDR data usingglobalize@1.4.2
.But when we load the compiled code using
globalize@1.5.0/dist/globalize-runtime
, we are seeing the following error.Description
I believe the semantic version mechanism in
globalize
is not honored.The data generated by
1.4.2
, should be able to load by1.5.0
. If the older data is not intended to be loadable, the runtime engine should be bumped to2.0.0
.We checked runtime of
1.4.3
can successfully load data compiled from1.4.2
.We are developing a web UI component package and we packaged the precompiled globalize.js (
1.4.2
) in our NPM package. Asglobalize
recently released as1.5.0
about 2 days ago, all new installs of our web UI package start picking upglobalize@1.5.0
and it's breaking our component because the data cannot be loaded with the newer runtime.Diff of precompiled globalize.js
(Minus is from 1.4.2, plus is from 1.5.0)
Repro steps
npm install
globalize@1.4.2
node compile
PrecompiledGlobalize.js
filenpm install globalize@1.5.0
node run
PrecompiledGlobalize.js
withglobalize@1.5.0/dist/globalize-runtime