@modern-js/plugin-changeset 1.1.2 → 1.2.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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @modern-js/plugin-changeset
2
2
 
3
+ ## 1.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - cfe11628: Make Modern.js self bootstraping
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies [2da09c69]
12
+ - Updated dependencies [fc71e36f]
13
+ - Updated dependencies [c3d46ee4]
14
+ - Updated dependencies [cfe11628]
15
+ - @modern-js/utils@1.2.0
16
+ - @modern-js/core@1.3.0
17
+ - @modern-js/i18n-cli-language-detector@1.2.0
18
+ - @modern-js/plugin-i18n@1.2.0
19
+
3
20
  ## 1.1.2
4
21
 
5
22
  ### Patch Changes
@@ -24,15 +24,15 @@ export async function bump(options) {
24
24
  }
25
25
 
26
26
  if (canary) {
27
- await execaWithStreamLog('node', [CHANGESET_PATH, 'pre', 'enter', preid || 'next']);
27
+ await execaWithStreamLog(process.execPath, [CHANGESET_PATH, 'pre', 'enter', preid || 'next']);
28
28
 
29
29
  try {
30
- await execaWithStreamLog('node', params);
31
- await execaWithStreamLog('node', [CHANGESET_PATH, 'pre', 'exit']);
30
+ await execaWithStreamLog(process.execPath, params);
31
+ await execaWithStreamLog(process.execPath, [CHANGESET_PATH, 'pre', 'exit']);
32
32
  } catch (e) {
33
- await execaWithStreamLog('node', [CHANGESET_PATH, 'pre', 'exit']);
33
+ await execaWithStreamLog(process.execPath, [CHANGESET_PATH, 'pre', 'exit']);
34
34
  }
35
35
  } else {
36
- await execaWithStreamLog('node', params);
36
+ await execaWithStreamLog(process.execPath, params);
37
37
  }
38
38
  }
@@ -30,5 +30,5 @@ export async function change(options) {
30
30
  params.push('--open');
31
31
  }
32
32
 
33
- await execaWithStreamLog('node', params);
33
+ await execaWithStreamLog(process.execPath, params);
34
34
  }
@@ -6,5 +6,5 @@ export async function pre(type, tag = 'next') {
6
6
  params.push(tag);
7
7
  }
8
8
 
9
- await execaWithStreamLog('node', params);
9
+ await execaWithStreamLog(process.execPath, params);
10
10
  }
@@ -20,7 +20,7 @@ export async function release(options) {
20
20
  }
21
21
 
22
22
  if (!isMonorepo || packageManager === 'yarn') {
23
- await execaWithStreamLog('node', [CHANGESET_PATH, ...params]);
23
+ await execaWithStreamLog(process.execPath, [CHANGESET_PATH, ...params]);
24
24
  return;
25
25
  }
26
26
 
@@ -32,15 +32,15 @@ async function bump(options) {
32
32
  }
33
33
 
34
34
  if (canary) {
35
- await (0, _utils.execaWithStreamLog)('node', [_utils.CHANGESET_PATH, 'pre', 'enter', preid || 'next']);
35
+ await (0, _utils.execaWithStreamLog)(process.execPath, [_utils.CHANGESET_PATH, 'pre', 'enter', preid || 'next']);
36
36
 
37
37
  try {
38
- await (0, _utils.execaWithStreamLog)('node', params);
39
- await (0, _utils.execaWithStreamLog)('node', [_utils.CHANGESET_PATH, 'pre', 'exit']);
38
+ await (0, _utils.execaWithStreamLog)(process.execPath, params);
39
+ await (0, _utils.execaWithStreamLog)(process.execPath, [_utils.CHANGESET_PATH, 'pre', 'exit']);
40
40
  } catch (e) {
41
- await (0, _utils.execaWithStreamLog)('node', [_utils.CHANGESET_PATH, 'pre', 'exit']);
41
+ await (0, _utils.execaWithStreamLog)(process.execPath, [_utils.CHANGESET_PATH, 'pre', 'exit']);
42
42
  }
43
43
  } else {
44
- await (0, _utils.execaWithStreamLog)('node', params);
44
+ await (0, _utils.execaWithStreamLog)(process.execPath, params);
45
45
  }
46
46
  }
@@ -42,5 +42,5 @@ async function change(options) {
42
42
  params.push('--open');
43
43
  }
44
44
 
45
- await (0, _utils2.execaWithStreamLog)('node', params);
45
+ await (0, _utils2.execaWithStreamLog)(process.execPath, params);
46
46
  }
@@ -14,5 +14,5 @@ async function pre(type, tag = 'next') {
14
14
  params.push(tag);
15
15
  }
16
16
 
17
- await (0, _utils.execaWithStreamLog)('node', params);
17
+ await (0, _utils.execaWithStreamLog)(process.execPath, params);
18
18
  }
@@ -33,7 +33,7 @@ async function release(options) {
33
33
  }
34
34
 
35
35
  if (!isMonorepo || packageManager === 'yarn') {
36
- await (0, _utils2.execaWithStreamLog)('node', [_utils2.CHANGESET_PATH, ...params]);
36
+ await (0, _utils2.execaWithStreamLog)(process.execPath, [_utils2.CHANGESET_PATH, ...params]);
37
37
  return;
38
38
  }
39
39
 
package/jest.config.js ADDED
@@ -0,0 +1,8 @@
1
+ const sharedConfig = require('@scripts/jest-config');
2
+
3
+ /** @type {import('@jest/types').Config.InitialOptions} */
4
+ module.exports = {
5
+ // eslint-disable-next-line node/no-unsupported-features/es-syntax
6
+ ...sharedConfig,
7
+ rootDir: __dirname,
8
+ };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.1.2",
14
+ "version": "1.2.0",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -20,32 +20,37 @@
20
20
  "exports": {
21
21
  ".": {
22
22
  "node": {
23
+ "jsnext:source": "./src/index.ts",
23
24
  "import": "./dist/js/modern/index.js",
24
25
  "require": "./dist/js/node/index.js"
25
26
  },
26
27
  "default": "./dist/js/treeshaking/index.js"
27
28
  },
28
- "./cli": "./dist/js/node/index.js"
29
+ "./cli": {
30
+ "jsnext:source": "./src/index.ts",
31
+ "default": "./dist/js/node/index.js"
32
+ }
29
33
  },
30
34
  "dependencies": {
31
35
  "@babel/runtime": "^7",
32
36
  "@changesets/cli": "2.16.0",
33
37
  "@changesets/git": "^1.1.2",
34
- "@modern-js/i18n-cli-language-detector": "^1.1.1",
35
- "@modern-js/plugin-i18n": "^1.1.2",
36
- "@modern-js/utils": "^1.1.6",
38
+ "@modern-js/i18n-cli-language-detector": "^1.2.0",
39
+ "@modern-js/plugin-i18n": "^1.2.0",
40
+ "@modern-js/utils": "^1.2.0",
37
41
  "execa": "^5.1.1"
38
42
  },
39
43
  "devDependencies": {
40
- "@modern-js/core": "^1.1.2",
41
- "@modern-js/module-tools": "^1.1.4",
42
- "@modern-js/plugin-testing": "^1.2.2",
44
+ "@modern-js/core": "^1.3.0",
45
+ "@scripts/build": "0.0.0",
43
46
  "@types/jest": "^26",
44
47
  "@types/node": "^14",
45
- "typescript": "^4"
48
+ "typescript": "^4",
49
+ "jest": "^27",
50
+ "@scripts/jest-config": "0.0.0"
46
51
  },
47
52
  "peerDependencies": {
48
- "@modern-js/core": "^1.1.2"
53
+ "@modern-js/core": "^1.3.0"
49
54
  },
50
55
  "sideEffects": false,
51
56
  "modernConfig": {
@@ -55,12 +60,13 @@
55
60
  },
56
61
  "publishConfig": {
57
62
  "registry": "https://registry.npmjs.org/",
58
- "access": "public"
63
+ "access": "public",
64
+ "types": "./dist/types/index.d.ts"
59
65
  },
60
66
  "scripts": {
61
67
  "new": "modern new",
62
68
  "build": "modern build",
63
- "test": "modern test --passWithNoTests"
69
+ "test": "jest --passWithNoTests"
64
70
  },
65
71
  "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"
66
72
  }
@@ -26,19 +26,27 @@ export async function bump(options: BumpOptions) {
26
26
  }
27
27
 
28
28
  if (canary) {
29
- await execaWithStreamLog('node', [
29
+ await execaWithStreamLog(process.execPath, [
30
30
  CHANGESET_PATH,
31
31
  'pre',
32
32
  'enter',
33
33
  preid || 'next',
34
34
  ]);
35
35
  try {
36
- await execaWithStreamLog('node', params);
37
- await execaWithStreamLog('node', [CHANGESET_PATH, 'pre', 'exit']);
36
+ await execaWithStreamLog(process.execPath, params);
37
+ await execaWithStreamLog(process.execPath, [
38
+ CHANGESET_PATH,
39
+ 'pre',
40
+ 'exit',
41
+ ]);
38
42
  } catch (e) {
39
- await execaWithStreamLog('node', [CHANGESET_PATH, 'pre', 'exit']);
43
+ await execaWithStreamLog(process.execPath, [
44
+ CHANGESET_PATH,
45
+ 'pre',
46
+ 'exit',
47
+ ]);
40
48
  }
41
49
  } else {
42
- await execaWithStreamLog('node', params);
50
+ await execaWithStreamLog(process.execPath, params);
43
51
  }
44
52
  }
@@ -36,5 +36,5 @@ export async function change(options: ChangeOptions) {
36
36
  params.push('--open');
37
37
  }
38
38
 
39
- await execaWithStreamLog('node', params);
39
+ await execaWithStreamLog(process.execPath, params);
40
40
  }
@@ -7,5 +7,5 @@ export async function pre(type: 'enter' | 'exit', tag = 'next') {
7
7
  params.push(tag);
8
8
  }
9
9
 
10
- await execaWithStreamLog('node', params);
10
+ await execaWithStreamLog(process.execPath, params);
11
11
  }
@@ -24,7 +24,7 @@ export async function release(options: PublishOptions) {
24
24
  }
25
25
 
26
26
  if (!isMonorepo || packageManager === 'yarn') {
27
- await execaWithStreamLog('node', [CHANGESET_PATH, ...params]);
27
+ await execaWithStreamLog(process.execPath, [CHANGESET_PATH, ...params]);
28
28
  return;
29
29
  }
30
30
 
@@ -0,0 +1,7 @@
1
+ import plugin from '../src';
2
+
3
+ describe('plugin-changeset', () => {
4
+ it('default', () => {
5
+ expect(plugin).toBeDefined();
6
+ });
7
+ });
package/tsconfig.json CHANGED
@@ -5,9 +5,7 @@
5
5
  "jsx": "preserve",
6
6
  "baseUrl": "./",
7
7
  "isolatedModules": true,
8
- "paths": {
9
- "@/*": ["./src/*"]
10
- }
8
+ "paths": {}
11
9
  },
12
10
  "include": ["src"]
13
11
  }