@intlify/core 9.3.0-beta.9 → 9.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -37,10 +37,19 @@ The intlify core module for i18n
37
37
  ### For Node.js (Server-Side)
38
38
 
39
39
  - **`core.cjs(.prod).js`**:
40
+ - For CommonJS usage in Node.js
40
41
  - For use in Node.js via `require()`
41
42
  - If you bundle your app with webpack with `target: 'node'` and properly externalize `@intlify/core`, this is the build that will be loaded
42
43
  - The dev/prod files are pre-built, but the appropriate file is automatically required based on `process.env.NODE_ENV`
43
44
 
45
+ - **`core.node.mjs`**:
46
+ - For ES Moudles usage in Node.js
47
+ - For use in Node.js via `import`
48
+ - The dev/prod files are pre-built, but the appropriate file is automatically required based on `process.env`<wbr/>`.NODE_ENV`
49
+
50
+ > NOTE: ES Modules will be the future of the Node.js module system. The `core.cjs(.prod).js` will be deprecated in the future. We recommend you would use `core.node.mjs`. 9.3+
51
+
52
+
44
53
  ## :copyright: License
45
54
 
46
55
  [MIT](http://opensource.org/licenses/MIT)
package/dist/core.cjs CHANGED
@@ -1,21 +1,21 @@
1
1
  /*!
2
- * core v9.3.0-beta.9
3
- * (c) 2022 kazuya kawaguchi
2
+ * core v9.4.0
3
+ * (c) 2023 kazuya kawaguchi
4
4
  * Released under the MIT License.
5
5
  */
6
6
  'use strict';
7
7
 
8
- Object.defineProperty(exports, '__esModule', { value: true });
9
-
10
8
  var coreBase = require('@intlify/core-base');
11
9
 
12
- // register message compiler at @intlify/core
13
- coreBase.registerMessageCompiler(coreBase.compileToFunction);
14
- // register message resolver at @intlify/core
15
- coreBase.registerMessageResolver(coreBase.resolveValue);
16
- // register fallback locale at @intlify/core
10
+ // register message compiler at @intlify/core
11
+ {
12
+ coreBase.registerMessageCompiler(coreBase.compile);
13
+ }
14
+ // register message resolver at @intlify/core
15
+ coreBase.registerMessageResolver(coreBase.resolveValue);
16
+ // register fallback locale at @intlify/core
17
17
  coreBase.registerLocaleFallbacker(coreBase.fallbackWithLocaleChain);
18
18
 
19
- for (var k in coreBase) {
20
- if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = coreBase[k];
21
- }
19
+ Object.keys(coreBase).forEach(function (k) {
20
+ if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) exports[k] = coreBase[k];
21
+ });