@modern-js/plugin-i18n 1.2.5 → 1.2.6

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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @modern-js/plugin-i18n
2
2
 
3
+ ## 1.2.6
4
+
5
+ ### Patch Changes
6
+
7
+ - d32f35134: chore: add modern/jest/eslint/ts config files to .npmignore
8
+ - Updated dependencies [d32f35134]
9
+ - Updated dependencies [6ae4a34ae]
10
+ - Updated dependencies [b80229c79]
11
+ - Updated dependencies [948cc4436]
12
+ - @modern-js/utils@1.7.3
13
+
3
14
  ## 1.2.5
4
15
 
5
16
  ### Patch Changes
@@ -1,10 +1,13 @@
1
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
+
1
3
  import { get } from '@modern-js/utils/lodash';
2
4
  import { getObjKeyMap } from "./utils";
3
5
 
4
6
  class I18n {
5
7
  constructor() {
6
- this.language = 'en';
7
- this.languageMap = {};
8
+ _defineProperty(this, "language", 'en');
9
+
10
+ _defineProperty(this, "languageMap", {});
8
11
  }
9
12
 
10
13
  format(msg, vars) {
@@ -9,10 +9,13 @@ var _lodash = require("@modern-js/utils/lodash");
9
9
 
10
10
  var _utils = require("./utils");
11
11
 
12
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
13
+
12
14
  class I18n {
13
15
  constructor() {
14
- this.language = 'en';
15
- this.languageMap = {};
16
+ _defineProperty(this, "language", 'en');
17
+
18
+ _defineProperty(this, "languageMap", {});
16
19
  }
17
20
 
18
21
  format(msg, vars) {
@@ -1,9 +1,6 @@
1
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
2
-
3
- function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
4
-
5
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
6
-
1
+ import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
+ import _createClass from "@babel/runtime/helpers/esm/createClass";
3
+ import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
7
4
  import { get } from '@modern-js/utils/lodash';
8
5
  import { getObjKeyMap } from "./utils";
9
6
 
@@ -11,8 +8,9 @@ var I18n = /*#__PURE__*/function () {
11
8
  function I18n() {
12
9
  _classCallCheck(this, I18n);
13
10
 
14
- this.language = 'en';
15
- this.languageMap = {};
11
+ _defineProperty(this, "language", 'en');
12
+
13
+ _defineProperty(this, "languageMap", {});
16
14
  }
17
15
 
18
16
  _createClass(I18n, [{
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.5",
14
+ "version": "1.2.6",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -28,10 +28,10 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@babel/runtime": "^7",
31
- "@modern-js/utils": "^1.7.2"
31
+ "@modern-js/utils": "^1.7.3"
32
32
  },
33
33
  "devDependencies": {
34
- "@types/jest": "^26",
34
+ "@types/jest": "^27",
35
35
  "@types/node": "^14",
36
36
  "typescript": "^4",
37
37
  "@scripts/build": "0.0.0",
@@ -44,10 +44,32 @@
44
44
  "registry": "https://registry.npmjs.org/",
45
45
  "access": "public"
46
46
  },
47
+ "wireit": {
48
+ "build": {
49
+ "command": "modern build",
50
+ "files": [
51
+ "src/**/*",
52
+ "tsconfig.json",
53
+ "package.json"
54
+ ],
55
+ "output": [
56
+ "dist/**/*"
57
+ ]
58
+ },
59
+ "test": {
60
+ "command": "jest --passWithNoTests",
61
+ "files": [
62
+ "src/**/*",
63
+ "tsconfig.json",
64
+ "package.json"
65
+ ],
66
+ "output": []
67
+ }
68
+ },
47
69
  "scripts": {
48
70
  "new": "modern new",
49
- "build": "modern build",
50
- "test": "jest --passWithNoTests"
71
+ "build": "wireit",
72
+ "test": "wireit"
51
73
  },
52
74
  "readme": "\n<p align=\"center\">\n <a href=\"https://modernjs.dev\" target=\"blank\"><img src=\"https://lf3-static.bytednsdoc.com/obj/eden-cn/ylaelkeh7nuhfnuhf/modernjs-cover.png\" width=\"300\" alt=\"Modern.js Logo\" /></a>\n</p>\n<p align=\"center\">\n现代 Web 工程体系\n <br/>\n <a href=\"https://modernjs.dev\" target=\"blank\">\n modernjs.dev\n </a>\n</p>\n<p align=\"center\">\n The meta-framework suite designed from scratch for frontend-focused modern web development\n</p>\n\n# Introduction\n\n> The doc site ([modernjs.dev](https://modernjs.dev)) and articles are only available in Chinese for now, we are planning to add English versions soon.\n\n- [Modern.js: Hello, World!](https://zhuanlan.zhihu.com/p/426707646)\n\n## Getting Started\n\n- [Quick Start](https://modernjs.dev/docs/start)\n- [Guides](https://modernjs.dev/docs/guides)\n- [API References](https://modernjs.dev/docs/apis)\n\n## Contributing\n\n- [Contributing Guide](https://github.com/modern-js-dev/modern.js/blob/main/CONTRIBUTING.md)\n"
53
75
  }
package/.eslintrc.js DELETED
@@ -1,8 +0,0 @@
1
- module.exports = {
2
- root: true,
3
- extends: ['@modern-js'],
4
- parserOptions: {
5
- tsconfigRootDir: __dirname,
6
- project: ['./tsconfig.json'],
7
- },
8
- };
package/jest.config.js DELETED
@@ -1,7 +0,0 @@
1
- const sharedConfig = require('@scripts/jest-config');
2
-
3
- /** @type {import('@jest/types').Config.InitialOptions} */
4
- module.exports = {
5
- ...sharedConfig,
6
- rootDir: __dirname,
7
- };
package/modern.config.js DELETED
@@ -1,2 +0,0 @@
1
- /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {};
package/tsconfig.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "extends": "@modern-js/tsconfig/base",
3
- "compilerOptions": {
4
- "declaration": false,
5
- "jsx": "preserve",
6
- "baseUrl": "./",
7
- "isolatedModules": true,
8
- "paths": {}
9
- },
10
- "include": ["src"]
11
- }