@modern-js/plugin-changeset 1.2.2 → 1.2.3

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,14 @@
1
1
  # @modern-js/plugin-changeset
2
2
 
3
+ ## 1.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 61e3f623: feat: convert to new plugin
8
+ - 681a1ff9: feat: remove unnecessary peerDependencies
9
+ - Updated dependencies [c2046f37]
10
+ - @modern-js/utils@1.3.6
11
+
3
12
  ## 1.2.2
4
13
 
5
14
  ### Patch Changes
@@ -1,27 +1,27 @@
1
- import { createPlugin } from '@modern-js/core';
2
1
  import { change, bump, pre, release } from "./commands";
3
2
  import { i18n, localeKeys } from "./locale";
4
3
  import { getLocaleLanguage } from "./utils";
5
- export default createPlugin(() => {
6
- // initial cli language
7
- i18n.changeLanguage({
8
- locale: getLocaleLanguage()
9
- });
10
- return {
11
- plugins() {
12
- return [{}];
13
- },
4
+ export default (() => ({
5
+ name: '@modern-js/plugin-changeset',
6
+ setup: () => {
7
+ // initial cli language
8
+ i18n.changeLanguage({
9
+ locale: getLocaleLanguage()
10
+ });
11
+ return {
12
+ plugins() {
13
+ return [{}];
14
+ },
14
15
 
15
- commands({
16
- program
17
- }) {
18
- program.command('change').description(i18n.t(localeKeys.command.change.describe)).option('--empty', i18n.t(localeKeys.command.change.empty), false).option('--open', i18n.t(localeKeys.command.change.open), false).action(options => change(options));
19
- program.command('bump').description(i18n.t(localeKeys.command.bump.describe)).option('--canary', i18n.t(localeKeys.command.bump.canary), false).option('--preid <tag>', i18n.t(localeKeys.command.bump.preid), 'next').option('--snapshot [snapshot]', i18n.t(localeKeys.command.bump.snapshot), false).action(options => bump(options));
20
- program.command('pre <enter|exit> [tag]').description(i18n.t(localeKeys.command.pre.describe)).action((type, tag) => pre(type, tag));
21
- program.command('release').description(i18n.t(localeKeys.command.release.describe)).option('--tag <tag>', i18n.t(localeKeys.command.release.tag), '').option('--ignore-scripts', i18n.t(localeKeys.command.release.ignore_scripts), '').option('--no-git-checks', i18n.t(localeKeys.command.release.no_git_checks), '').action(options => release(options));
22
- }
16
+ commands({
17
+ program
18
+ }) {
19
+ program.command('change').description(i18n.t(localeKeys.command.change.describe)).option('--empty', i18n.t(localeKeys.command.change.empty), false).option('--open', i18n.t(localeKeys.command.change.open), false).action(options => change(options));
20
+ program.command('bump').description(i18n.t(localeKeys.command.bump.describe)).option('--canary', i18n.t(localeKeys.command.bump.canary), false).option('--preid <tag>', i18n.t(localeKeys.command.bump.preid), 'next').option('--snapshot [snapshot]', i18n.t(localeKeys.command.bump.snapshot), false).action(options => bump(options));
21
+ program.command('pre <enter|exit> [tag]').description(i18n.t(localeKeys.command.pre.describe)).action((type, tag) => pre(type, tag));
22
+ program.command('release').description(i18n.t(localeKeys.command.release.describe)).option('--tag <tag>', i18n.t(localeKeys.command.release.tag), '').option('--ignore-scripts', i18n.t(localeKeys.command.release.ignore_scripts), '').option('--no-git-checks', i18n.t(localeKeys.command.release.no_git_checks), '').action(options => release(options));
23
+ }
23
24
 
24
- };
25
- }, {
26
- name: '@modern-js/plugin-changeset'
27
- });
25
+ };
26
+ }
27
+ }));
@@ -5,37 +5,36 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.default = void 0;
7
7
 
8
- var _core = require("@modern-js/core");
9
-
10
8
  var _commands = require("./commands");
11
9
 
12
10
  var _locale = require("./locale");
13
11
 
14
12
  var _utils = require("./utils");
15
13
 
16
- var _default = (0, _core.createPlugin)(() => {
17
- // initial cli language
18
- _locale.i18n.changeLanguage({
19
- locale: (0, _utils.getLocaleLanguage)()
20
- });
21
-
22
- return {
23
- plugins() {
24
- return [{}];
25
- },
26
-
27
- commands({
28
- program
29
- }) {
30
- program.command('change').description(_locale.i18n.t(_locale.localeKeys.command.change.describe)).option('--empty', _locale.i18n.t(_locale.localeKeys.command.change.empty), false).option('--open', _locale.i18n.t(_locale.localeKeys.command.change.open), false).action(options => (0, _commands.change)(options));
31
- program.command('bump').description(_locale.i18n.t(_locale.localeKeys.command.bump.describe)).option('--canary', _locale.i18n.t(_locale.localeKeys.command.bump.canary), false).option('--preid <tag>', _locale.i18n.t(_locale.localeKeys.command.bump.preid), 'next').option('--snapshot [snapshot]', _locale.i18n.t(_locale.localeKeys.command.bump.snapshot), false).action(options => (0, _commands.bump)(options));
32
- program.command('pre <enter|exit> [tag]').description(_locale.i18n.t(_locale.localeKeys.command.pre.describe)).action((type, tag) => (0, _commands.pre)(type, tag));
33
- program.command('release').description(_locale.i18n.t(_locale.localeKeys.command.release.describe)).option('--tag <tag>', _locale.i18n.t(_locale.localeKeys.command.release.tag), '').option('--ignore-scripts', _locale.i18n.t(_locale.localeKeys.command.release.ignore_scripts), '').option('--no-git-checks', _locale.i18n.t(_locale.localeKeys.command.release.no_git_checks), '').action(options => (0, _commands.release)(options));
34
- }
35
-
36
- };
37
- }, {
38
- name: '@modern-js/plugin-changeset'
14
+ var _default = () => ({
15
+ name: '@modern-js/plugin-changeset',
16
+ setup: () => {
17
+ // initial cli language
18
+ _locale.i18n.changeLanguage({
19
+ locale: (0, _utils.getLocaleLanguage)()
20
+ });
21
+
22
+ return {
23
+ plugins() {
24
+ return [{}];
25
+ },
26
+
27
+ commands({
28
+ program
29
+ }) {
30
+ program.command('change').description(_locale.i18n.t(_locale.localeKeys.command.change.describe)).option('--empty', _locale.i18n.t(_locale.localeKeys.command.change.empty), false).option('--open', _locale.i18n.t(_locale.localeKeys.command.change.open), false).action(options => (0, _commands.change)(options));
31
+ program.command('bump').description(_locale.i18n.t(_locale.localeKeys.command.bump.describe)).option('--canary', _locale.i18n.t(_locale.localeKeys.command.bump.canary), false).option('--preid <tag>', _locale.i18n.t(_locale.localeKeys.command.bump.preid), 'next').option('--snapshot [snapshot]', _locale.i18n.t(_locale.localeKeys.command.bump.snapshot), false).action(options => (0, _commands.bump)(options));
32
+ program.command('pre <enter|exit> [tag]').description(_locale.i18n.t(_locale.localeKeys.command.pre.describe)).action((type, tag) => (0, _commands.pre)(type, tag));
33
+ program.command('release').description(_locale.i18n.t(_locale.localeKeys.command.release.describe)).option('--tag <tag>', _locale.i18n.t(_locale.localeKeys.command.release.tag), '').option('--ignore-scripts', _locale.i18n.t(_locale.localeKeys.command.release.ignore_scripts), '').option('--no-git-checks', _locale.i18n.t(_locale.localeKeys.command.release.no_git_checks), '').action(options => (0, _commands.release)(options));
34
+ }
35
+
36
+ };
37
+ }
39
38
  });
40
39
 
41
40
  exports.default = _default;
@@ -1,3 +1,5 @@
1
- declare const _default: any;
1
+ import type { CliPlugin } from '@modern-js/core';
2
+
3
+ declare const _default: () => CliPlugin;
2
4
 
3
5
  export default _default;
package/modern.config.js CHANGED
@@ -1,2 +1,6 @@
1
1
  /** @type {import('@modern-js/module-tools').UserConfig} */
2
- module.exports = {};
2
+ module.exports = {
3
+ output: {
4
+ packageMode: 'node-js',
5
+ },
6
+ };
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.2.2",
14
+ "version": "1.2.3",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -37,11 +37,11 @@
37
37
  "@changesets/git": "^1.1.2",
38
38
  "@modern-js/i18n-cli-language-detector": "^1.2.1",
39
39
  "@modern-js/plugin-i18n": "^1.2.1",
40
- "@modern-js/utils": "^1.3.2",
40
+ "@modern-js/utils": "^1.3.6",
41
41
  "execa": "^5.1.1"
42
42
  },
43
43
  "devDependencies": {
44
- "@modern-js/core": "^1.4.3",
44
+ "@modern-js/core": "^1.6.0",
45
45
  "@scripts/build": "0.0.0",
46
46
  "@types/jest": "^26",
47
47
  "@types/node": "^14",
@@ -49,21 +49,14 @@
49
49
  "jest": "^27",
50
50
  "@scripts/jest-config": "0.0.0"
51
51
  },
52
- "peerDependencies": {
53
- "@modern-js/core": "^1.4.3"
54
- },
55
52
  "sideEffects": false,
56
- "modernConfig": {
57
- "output": {
58
- "packageMode": "node-js"
59
- }
60
- },
61
53
  "publishConfig": {
62
54
  "registry": "https://registry.npmjs.org/",
63
55
  "access": "public"
64
56
  },
65
57
  "scripts": {
66
58
  "new": "modern new",
59
+ "dev": "modern build --watch",
67
60
  "build": "modern build",
68
61
  "test": "jest --passWithNoTests"
69
62
  },