@modern-js/monorepo-tools 1.4.4 → 1.4.5

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,19 @@
1
1
  # @modern-js/monorepo-tools
2
2
 
3
+ ## 1.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - 69a728375: fix: remove exports.jsnext:source after publish
8
+ - Updated dependencies [cd7346b0d]
9
+ - Updated dependencies [6b0bb5e3b]
10
+ - Updated dependencies [69a728375]
11
+ - @modern-js/utils@1.7.2
12
+ - @modern-js/new-action@1.3.8
13
+ - @modern-js/core@1.10.1
14
+ - @modern-js/plugin-changeset@1.2.6
15
+ - @modern-js/plugin-i18n@1.2.5
16
+
3
17
  ## 1.4.4
4
18
 
5
19
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import { build } from "../commands";
2
2
  export const buildCli = (program, api) => {
3
- program.command('build [project]').usage('[options]').option('--no-self', 'build without target project').option('-t, --dept', 'build target project with project’s dependent').option('--no-deps', 'build target project without project’s dependences').option('--only-self', 'build target project with nothing').option('-a, --all', 'build target project with project’s dependences and dependent').option('--content-hash', 'build target project use content hash cache').option('--git-hash', 'build target project use git hash cache').description('build target project').action(async (targetProjectName, option) => {
3
+ program.command('build [project]').usage('[options]').option('--no-self', 'build without target project').option('-t, --dept', 'build target project with project’s dependent').option('--no-deps', 'build target project without project’s dependencies').option('--only-self', 'build target project with nothing').option('-a, --all', 'build target project with project’s dependencies and dependent').option('--content-hash', 'build target project use content hash cache').option('--git-hash', 'build target project use git hash cache').description('build target project').action(async (targetProjectName, option) => {
4
4
  await build(targetProjectName, option, api);
5
5
  });
6
6
  };
@@ -7,18 +7,18 @@ export class TaskRunner extends EventEmitter {
7
7
  super();
8
8
  this._tasks = void 0;
9
9
  this._concurrency = void 0;
10
- this._useableConcurrency = void 0;
10
+ this._usableConcurrency = void 0;
11
11
  this._stopFlag = void 0;
12
12
  this._tasks = tasks;
13
13
  this._concurrency = concurrency || TaskRunner.DefaultConcurrency;
14
- this._useableConcurrency = this._concurrency;
14
+ this._usableConcurrency = this._concurrency;
15
15
  this._stopFlag = false;
16
16
  }
17
17
 
18
18
  async run() {
19
19
  const tasks = this._tasks.splice(0, this._concurrency);
20
20
 
21
- this._useableConcurrency = this._concurrency - tasks.length;
21
+ this._usableConcurrency = this._concurrency - tasks.length;
22
22
  await pMap(tasks, async task => {
23
23
  await this._runTask(task);
24
24
  }, {
@@ -36,13 +36,13 @@ export class TaskRunner extends EventEmitter {
36
36
  }
37
37
 
38
38
  const emitValue = await task(this._stopTask.bind(this));
39
- this._useableConcurrency--;
39
+ this._usableConcurrency--;
40
40
  this.emit(TaskRunner.TASK_FINISH, emitValue);
41
41
 
42
42
  if (this._tasks.length > 0) {
43
- const nextTasks = this._tasks.splice(0, this._useableConcurrency);
43
+ const nextTasks = this._tasks.splice(0, this._usableConcurrency);
44
44
 
45
- this._useableConcurrency -= nextTasks.length;
45
+ this._usableConcurrency -= nextTasks.length;
46
46
 
47
47
  if (nextTasks.length > 0) {
48
48
  await pMap(nextTasks, async _task => {
@@ -75,9 +75,9 @@ const generatorAndCopyRequiredFiles = (rootPath, deployDir) => {
75
75
  const checkAndRunDeployCommand = async (monorepoPath, targetProject, packageManager) => {
76
76
  var _targetProject$extra;
77
77
 
78
- const scritps = ((_targetProject$extra = targetProject.extra) === null || _targetProject$extra === void 0 ? void 0 : _targetProject$extra.scripts) || {};
78
+ const scripts = ((_targetProject$extra = targetProject.extra) === null || _targetProject$extra === void 0 ? void 0 : _targetProject$extra.scripts) || {};
79
79
 
80
- if (scritps.deploy) {
80
+ if (scripts.deploy) {
81
81
  var _childProcess$stdout, _childProcess$stderr;
82
82
 
83
83
  logger.info(`The 'deploy' command for the ${targetProject.name} is detected, so 'deploy' will be executed`);
@@ -6,19 +6,19 @@ import { installByPackageManager } from "../../utils/install";
6
6
 
7
7
  const replaceWorkspaces = ({
8
8
  rootPath,
9
- projectsInWorkspacs
9
+ projectsInWorkspaces
10
10
  }) => {
11
11
  // pnpm
12
12
  const pnpmWsFilePath = path.join(rootPath, WORKSPACE_FILE.PNPM);
13
13
 
14
14
  if (fs.existsSync(pnpmWsFilePath)) {
15
15
  const pnpmWorkspace = fs.readFileSync(pnpmWsFilePath, 'utf-8');
16
- const orignalPnpmWorkspaces = yaml.load(pnpmWorkspace);
16
+ const originalPnpmWorkspaces = yaml.load(pnpmWorkspace);
17
17
  fs.writeFileSync(pnpmWsFilePath, yaml.dump({
18
- packages: projectsInWorkspacs
18
+ packages: projectsInWorkspaces
19
19
  }));
20
20
  return () => {
21
- yaml.dump(orignalPnpmWorkspaces);
21
+ yaml.dump(originalPnpmWorkspaces);
22
22
  };
23
23
  }
24
24
 
@@ -31,7 +31,7 @@ const replaceWorkspaces = ({
31
31
 
32
32
  if (pkg !== null && pkg !== void 0 && (_pkg$workspaces = pkg.workspaces) !== null && _pkg$workspaces !== void 0 && _pkg$workspaces.packages) {
33
33
  const originalPkg = pkg;
34
- pkg.workspaces.packages = projectsInWorkspacs;
34
+ pkg.workspaces.packages = projectsInWorkspaces;
35
35
  JsonFile.save(pkg, pkgFilePath);
36
36
  return () => {
37
37
  JsonFile.save(originalPkg, pkgFilePath);
@@ -62,7 +62,7 @@ export const runInstallTask = async (projectNames, operator, config) => {
62
62
  const noDupProjectList = Array.from(new Set(projectsInWorkspaces));
63
63
  const restorWorkspace = replaceWorkspaces({
64
64
  rootPath,
65
- projectsInWorkspacs: noDupProjectList
65
+ projectsInWorkspaces: noDupProjectList
66
66
  });
67
67
  await installByPackageManager(packageManager, {
68
68
  rootPath,
@@ -101,7 +101,7 @@ export const getMonorepoBaseData = (root = process.cwd()) => {
101
101
  const rootPath = findMonorepoRoot(root);
102
102
 
103
103
  if (!rootPath) {
104
- throw new Error('not find any monorepo, you can add lerna、pnpm or yarn worksapce file');
104
+ throw new Error('not find any monorepo, you can add lerna、pnpm or yarn workspace file');
105
105
  }
106
106
 
107
107
  return {
@@ -38,12 +38,12 @@ export const checkProjectChangeByGit = async (project, rootPath) => {
38
38
  });
39
39
  }
40
40
 
41
- const monorepoProjecstHashJson = JsonFile.load(monorepoGitMemory);
42
- const changed = monorepoProjecstHashJson[project.name] !== currentProjectHash;
41
+ const monorepoProjectHashJson = JsonFile.load(monorepoGitMemory);
42
+ const changed = monorepoProjectHashJson[project.name] !== currentProjectHash;
43
43
 
44
44
  if (changed) {
45
- monorepoProjecstHashJson[project.name] = currentProjectHash;
46
- FileSystem.writeFile(monorepoGitMemory, JsonFile.stringify(monorepoProjecstHashJson), {
45
+ monorepoProjectHashJson[project.name] = currentProjectHash;
46
+ FileSystem.writeFile(monorepoGitMemory, JsonFile.stringify(monorepoProjectHashJson), {
47
47
  ensureFolderExists: true
48
48
  });
49
49
  }
@@ -55,7 +55,7 @@ const makeFileFinder = (rootPath, packageConfigs, ignoreConfigs = []) => {
55
55
  };
56
56
  };
57
57
 
58
- export const getProjetsByPackageConfig = async (rootPath, packagesConfig, ignoreConfigs) => {
58
+ export const getProjectsByPackageConfig = async (rootPath, packagesConfig, ignoreConfigs) => {
59
59
  const finder = makeFileFinder(rootPath, packagesConfig, ignoreConfigs);
60
60
  const fileName = 'package.json';
61
61
 
@@ -93,7 +93,7 @@ const makeSyncFileFinder = (rootPath, packageConfigs, ignoreConfigs = []) => {
93
93
  };
94
94
  };
95
95
 
96
- export const syncGetProjetsByPackageConfig = (rootPath, packagesConfig, ignoreConfigs) => {
96
+ export const syncGetProjectsByPackageConfig = (rootPath, packagesConfig, ignoreConfigs) => {
97
97
  const finder = makeSyncFileFinder(rootPath, packagesConfig, ignoreConfigs);
98
98
  const fileName = 'package.json';
99
99
 
@@ -3,7 +3,7 @@ import { FileSystem, JsonFile } from '@rushstack/node-core-library';
3
3
  import { fs, yaml } from '@modern-js/utils';
4
4
  import { getWorkspaceFile } from "../parse-config/monorepo";
5
5
  import { WORKSPACE_FILE } from "../constants";
6
- import { getProjetsByPackageConfig, syncGetProjetsByPackageConfig } from "./get-projects-by-packages-config";
6
+ import { getProjectsByPackageConfig, syncGetProjectsByPackageConfig } from "./get-projects-by-packages-config";
7
7
  export const getProjectsByWorkspaceFile = async (rootPath, config, ignoreConfigs) => {
8
8
  var _config$workspaceFile;
9
9
 
@@ -37,7 +37,7 @@ export const getProjectsByWorkspaceFile = async (rootPath, config, ignoreConfigs
37
37
  packagesConfig = (_lernaJson$packages = lernaJson.packages) !== null && _lernaJson$packages !== void 0 ? _lernaJson$packages : [];
38
38
  }
39
39
 
40
- const projects = await getProjetsByPackageConfig(rootPath, packagesConfig, ignoreConfigs);
40
+ const projects = await getProjectsByPackageConfig(rootPath, packagesConfig, ignoreConfigs);
41
41
  return projects;
42
42
  };
43
43
  export const syncGetProjectsByWorkspaceFile = (rootPath, config, ignoreConfigs) => {
@@ -73,6 +73,6 @@ export const syncGetProjectsByWorkspaceFile = (rootPath, config, ignoreConfigs)
73
73
  packagesConfig = (_lernaJson$packages2 = lernaJson.packages) !== null && _lernaJson$packages2 !== void 0 ? _lernaJson$packages2 : [];
74
74
  }
75
75
 
76
- const projects = syncGetProjetsByPackageConfig(rootPath, packagesConfig, ignoreConfigs);
76
+ const projects = syncGetProjectsByPackageConfig(rootPath, packagesConfig, ignoreConfigs);
77
77
  return projects;
78
78
  };
@@ -6,7 +6,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
6
6
 
7
7
  import { errorLog } from "../log/error";
8
8
  import { getMonorepoBaseData } from "../parse-config/monorepo";
9
- import { getProjetsByPackageConfig, syncGetProjetsByPackageConfig } from "./get-projects-by-packages-config";
9
+ import { getProjectsByPackageConfig, syncGetProjectsByPackageConfig } from "./get-projects-by-packages-config";
10
10
  import { getProjectsByWorkspaceFile, syncGetProjectsByWorkspaceFile } from "./get-projects-by-workspace-file";
11
11
  var FindProjectsMode;
12
12
 
@@ -40,7 +40,7 @@ const getProjectsByPackagesMatch = async (rootPath, match, ignore) => {
40
40
 
41
41
  if (Array.isArray(match)) {
42
42
  // like lerna`s packages config
43
- projects = await getProjetsByPackageConfig(rootPath, match, ignore);
43
+ projects = await getProjectsByPackageConfig(rootPath, match, ignore);
44
44
  } else {
45
45
  // use workspace file
46
46
  projects = await getProjectsByWorkspaceFile(rootPath, match, ignore);
@@ -70,7 +70,7 @@ const syncGetProjectsByPackagesMatch = (rootPath, match, ignore) => {
70
70
 
71
71
  if (Array.isArray(match)) {
72
72
  // like lerna`s packages config
73
- projects = syncGetProjetsByPackageConfig(rootPath, match, ignore);
73
+ projects = syncGetProjectsByPackageConfig(rootPath, match, ignore);
74
74
  } else {
75
75
  // use workspace file
76
76
  projects = syncGetProjectsByWorkspaceFile(rootPath, match, ignore);
@@ -110,10 +110,10 @@ const checkFindProjectsMode = (config // eslint-disable-next-line consistent-ret
110
110
  }
111
111
 
112
112
  if (config.projectsConfig && config.packagesMatchs) {
113
- errorLog('There can not be both `pakcagesMatchs` and `projectsConfig`');
113
+ errorLog('There can not be both `packagesMatchs` and `projectsConfig`');
114
114
  }
115
115
 
116
- errorLog('No `pakcagesMatchs` and `projectsConfig` configurations found');
116
+ errorLog('No `packagesMatchs` and `projectsConfig` configurations found');
117
117
  };
118
118
 
119
119
  export const getProjects = async (config, currentDir = process.cwd()) => {
@@ -8,7 +8,7 @@ exports.buildCli = void 0;
8
8
  var _commands = require("../commands");
9
9
 
10
10
  const buildCli = (program, api) => {
11
- program.command('build [project]').usage('[options]').option('--no-self', 'build without target project').option('-t, --dept', 'build target project with project’s dependent').option('--no-deps', 'build target project without project’s dependences').option('--only-self', 'build target project with nothing').option('-a, --all', 'build target project with project’s dependences and dependent').option('--content-hash', 'build target project use content hash cache').option('--git-hash', 'build target project use git hash cache').description('build target project').action(async (targetProjectName, option) => {
11
+ program.command('build [project]').usage('[options]').option('--no-self', 'build without target project').option('-t, --dept', 'build target project with project’s dependent').option('--no-deps', 'build target project without project’s dependencies').option('--only-self', 'build target project with nothing').option('-a, --all', 'build target project with project’s dependencies and dependent').option('--content-hash', 'build target project use content hash cache').option('--git-hash', 'build target project use git hash cache').description('build target project').action(async (targetProjectName, option) => {
12
12
  await (0, _commands.build)(targetProjectName, option, api);
13
13
  });
14
14
  };
@@ -18,18 +18,18 @@ class TaskRunner extends _events.EventEmitter {
18
18
  super();
19
19
  this._tasks = void 0;
20
20
  this._concurrency = void 0;
21
- this._useableConcurrency = void 0;
21
+ this._usableConcurrency = void 0;
22
22
  this._stopFlag = void 0;
23
23
  this._tasks = tasks;
24
24
  this._concurrency = concurrency || TaskRunner.DefaultConcurrency;
25
- this._useableConcurrency = this._concurrency;
25
+ this._usableConcurrency = this._concurrency;
26
26
  this._stopFlag = false;
27
27
  }
28
28
 
29
29
  async run() {
30
30
  const tasks = this._tasks.splice(0, this._concurrency);
31
31
 
32
- this._useableConcurrency = this._concurrency - tasks.length;
32
+ this._usableConcurrency = this._concurrency - tasks.length;
33
33
  await (0, _pMap.default)(tasks, async task => {
34
34
  await this._runTask(task);
35
35
  }, {
@@ -47,13 +47,13 @@ class TaskRunner extends _events.EventEmitter {
47
47
  }
48
48
 
49
49
  const emitValue = await task(this._stopTask.bind(this));
50
- this._useableConcurrency--;
50
+ this._usableConcurrency--;
51
51
  this.emit(TaskRunner.TASK_FINISH, emitValue);
52
52
 
53
53
  if (this._tasks.length > 0) {
54
- const nextTasks = this._tasks.splice(0, this._useableConcurrency);
54
+ const nextTasks = this._tasks.splice(0, this._usableConcurrency);
55
55
 
56
- this._useableConcurrency -= nextTasks.length;
56
+ this._usableConcurrency -= nextTasks.length;
57
57
 
58
58
  if (nextTasks.length > 0) {
59
59
  await (0, _pMap.default)(nextTasks, async _task => {
@@ -90,9 +90,9 @@ const generatorAndCopyRequiredFiles = (rootPath, deployDir) => {
90
90
  const checkAndRunDeployCommand = async (monorepoPath, targetProject, packageManager) => {
91
91
  var _targetProject$extra;
92
92
 
93
- const scritps = ((_targetProject$extra = targetProject.extra) === null || _targetProject$extra === void 0 ? void 0 : _targetProject$extra.scripts) || {};
93
+ const scripts = ((_targetProject$extra = targetProject.extra) === null || _targetProject$extra === void 0 ? void 0 : _targetProject$extra.scripts) || {};
94
94
 
95
- if (scritps.deploy) {
95
+ if (scripts.deploy) {
96
96
  var _childProcess$stdout, _childProcess$stderr;
97
97
 
98
98
  _utils.logger.info(`The 'deploy' command for the ${targetProject.name} is detected, so 'deploy' will be executed`);
@@ -21,7 +21,7 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
21
21
 
22
22
  const replaceWorkspaces = ({
23
23
  rootPath,
24
- projectsInWorkspacs
24
+ projectsInWorkspaces
25
25
  }) => {
26
26
  // pnpm
27
27
  const pnpmWsFilePath = path.join(rootPath, _constants.WORKSPACE_FILE.PNPM);
@@ -29,14 +29,14 @@ const replaceWorkspaces = ({
29
29
  if (_utils.fs.existsSync(pnpmWsFilePath)) {
30
30
  const pnpmWorkspace = _utils.fs.readFileSync(pnpmWsFilePath, 'utf-8');
31
31
 
32
- const orignalPnpmWorkspaces = _utils.yaml.load(pnpmWorkspace);
32
+ const originalPnpmWorkspaces = _utils.yaml.load(pnpmWorkspace);
33
33
 
34
34
  _utils.fs.writeFileSync(pnpmWsFilePath, _utils.yaml.dump({
35
- packages: projectsInWorkspacs
35
+ packages: projectsInWorkspaces
36
36
  }));
37
37
 
38
38
  return () => {
39
- _utils.yaml.dump(orignalPnpmWorkspaces);
39
+ _utils.yaml.dump(originalPnpmWorkspaces);
40
40
  };
41
41
  }
42
42
 
@@ -49,7 +49,7 @@ const replaceWorkspaces = ({
49
49
 
50
50
  if (pkg !== null && pkg !== void 0 && (_pkg$workspaces = pkg.workspaces) !== null && _pkg$workspaces !== void 0 && _pkg$workspaces.packages) {
51
51
  const originalPkg = pkg;
52
- pkg.workspaces.packages = projectsInWorkspacs;
52
+ pkg.workspaces.packages = projectsInWorkspaces;
53
53
 
54
54
  _nodeCoreLibrary.JsonFile.save(pkg, pkgFilePath);
55
55
 
@@ -82,7 +82,7 @@ const runInstallTask = async (projectNames, operator, config) => {
82
82
  const noDupProjectList = Array.from(new Set(projectsInWorkspaces));
83
83
  const restorWorkspace = replaceWorkspaces({
84
84
  rootPath,
85
- projectsInWorkspacs: noDupProjectList
85
+ projectsInWorkspaces: noDupProjectList
86
86
  });
87
87
  await (0, _install.installByPackageManager)(packageManager, {
88
88
  rootPath,
@@ -123,7 +123,7 @@ const getMonorepoBaseData = (root = process.cwd()) => {
123
123
  const rootPath = findMonorepoRoot(root);
124
124
 
125
125
  if (!rootPath) {
126
- throw new Error('not find any monorepo, you can add lerna、pnpm or yarn worksapce file');
126
+ throw new Error('not find any monorepo, you can add lerna、pnpm or yarn workspace file');
127
127
  }
128
128
 
129
129
  return {
@@ -60,14 +60,14 @@ const checkProjectChangeByGit = async (project, rootPath) => {
60
60
  });
61
61
  }
62
62
 
63
- const monorepoProjecstHashJson = _nodeCoreLibrary.JsonFile.load(monorepoGitMemory);
63
+ const monorepoProjectHashJson = _nodeCoreLibrary.JsonFile.load(monorepoGitMemory);
64
64
 
65
- const changed = monorepoProjecstHashJson[project.name] !== currentProjectHash;
65
+ const changed = monorepoProjectHashJson[project.name] !== currentProjectHash;
66
66
 
67
67
  if (changed) {
68
- monorepoProjecstHashJson[project.name] = currentProjectHash;
68
+ monorepoProjectHashJson[project.name] = currentProjectHash;
69
69
 
70
- _nodeCoreLibrary.FileSystem.writeFile(monorepoGitMemory, _nodeCoreLibrary.JsonFile.stringify(monorepoProjecstHashJson), {
70
+ _nodeCoreLibrary.FileSystem.writeFile(monorepoGitMemory, _nodeCoreLibrary.JsonFile.stringify(monorepoProjectHashJson), {
71
71
  ensureFolderExists: true
72
72
  });
73
73
  }
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.syncGetProjetsByPackageConfig = exports.getProjetsByPackageConfig = void 0;
6
+ exports.syncGetProjectsByPackageConfig = exports.getProjectsByPackageConfig = void 0;
7
7
 
8
8
  var path = _interopRequireWildcard(require("path"));
9
9
 
@@ -73,7 +73,7 @@ const makeFileFinder = (rootPath, packageConfigs, ignoreConfigs = []) => {
73
73
  };
74
74
  };
75
75
 
76
- const getProjetsByPackageConfig = async (rootPath, packagesConfig, ignoreConfigs) => {
76
+ const getProjectsByPackageConfig = async (rootPath, packagesConfig, ignoreConfigs) => {
77
77
  const finder = makeFileFinder(rootPath, packagesConfig, ignoreConfigs);
78
78
  const fileName = 'package.json';
79
79
 
@@ -91,7 +91,7 @@ const getProjetsByPackageConfig = async (rootPath, packagesConfig, ignoreConfigs
91
91
  return projects;
92
92
  };
93
93
 
94
- exports.getProjetsByPackageConfig = getProjetsByPackageConfig;
94
+ exports.getProjectsByPackageConfig = getProjectsByPackageConfig;
95
95
 
96
96
  const makeSyncFileFinder = (rootPath, packageConfigs, ignoreConfigs = []) => {
97
97
  const globOpts = getGlobOpts(rootPath, packageConfigs, ignoreConfigs);
@@ -114,7 +114,7 @@ const makeSyncFileFinder = (rootPath, packageConfigs, ignoreConfigs = []) => {
114
114
  };
115
115
  };
116
116
 
117
- const syncGetProjetsByPackageConfig = (rootPath, packagesConfig, ignoreConfigs) => {
117
+ const syncGetProjectsByPackageConfig = (rootPath, packagesConfig, ignoreConfigs) => {
118
118
  const finder = makeSyncFileFinder(rootPath, packagesConfig, ignoreConfigs);
119
119
  const fileName = 'package.json';
120
120
 
@@ -130,4 +130,4 @@ const syncGetProjetsByPackageConfig = (rootPath, packagesConfig, ignoreConfigs)
130
130
  return projects;
131
131
  };
132
132
 
133
- exports.syncGetProjetsByPackageConfig = syncGetProjetsByPackageConfig;
133
+ exports.syncGetProjectsByPackageConfig = syncGetProjectsByPackageConfig;
@@ -58,7 +58,7 @@ const getProjectsByWorkspaceFile = async (rootPath, config, ignoreConfigs) => {
58
58
  packagesConfig = (_lernaJson$packages = lernaJson.packages) !== null && _lernaJson$packages !== void 0 ? _lernaJson$packages : [];
59
59
  }
60
60
 
61
- const projects = await (0, _getProjectsByPackagesConfig.getProjetsByPackageConfig)(rootPath, packagesConfig, ignoreConfigs);
61
+ const projects = await (0, _getProjectsByPackagesConfig.getProjectsByPackageConfig)(rootPath, packagesConfig, ignoreConfigs);
62
62
  return projects;
63
63
  };
64
64
 
@@ -101,7 +101,7 @@ const syncGetProjectsByWorkspaceFile = (rootPath, config, ignoreConfigs) => {
101
101
  packagesConfig = (_lernaJson$packages2 = lernaJson.packages) !== null && _lernaJson$packages2 !== void 0 ? _lernaJson$packages2 : [];
102
102
  }
103
103
 
104
- const projects = (0, _getProjectsByPackagesConfig.syncGetProjetsByPackageConfig)(rootPath, packagesConfig, ignoreConfigs);
104
+ const projects = (0, _getProjectsByPackagesConfig.syncGetProjectsByPackageConfig)(rootPath, packagesConfig, ignoreConfigs);
105
105
  return projects;
106
106
  };
107
107
 
@@ -51,7 +51,7 @@ const getProjectsByPackagesMatch = async (rootPath, match, ignore) => {
51
51
 
52
52
  if (Array.isArray(match)) {
53
53
  // like lerna`s packages config
54
- projects = await (0, _getProjectsByPackagesConfig.getProjetsByPackageConfig)(rootPath, match, ignore);
54
+ projects = await (0, _getProjectsByPackagesConfig.getProjectsByPackageConfig)(rootPath, match, ignore);
55
55
  } else {
56
56
  // use workspace file
57
57
  projects = await (0, _getProjectsByWorkspaceFile.getProjectsByWorkspaceFile)(rootPath, match, ignore);
@@ -81,7 +81,7 @@ const syncGetProjectsByPackagesMatch = (rootPath, match, ignore) => {
81
81
 
82
82
  if (Array.isArray(match)) {
83
83
  // like lerna`s packages config
84
- projects = (0, _getProjectsByPackagesConfig.syncGetProjetsByPackageConfig)(rootPath, match, ignore);
84
+ projects = (0, _getProjectsByPackagesConfig.syncGetProjectsByPackageConfig)(rootPath, match, ignore);
85
85
  } else {
86
86
  // use workspace file
87
87
  projects = (0, _getProjectsByWorkspaceFile.syncGetProjectsByWorkspaceFile)(rootPath, match, ignore);
@@ -121,10 +121,10 @@ const checkFindProjectsMode = (config // eslint-disable-next-line consistent-ret
121
121
  }
122
122
 
123
123
  if (config.projectsConfig && config.packagesMatchs) {
124
- (0, _error.errorLog)('There can not be both `pakcagesMatchs` and `projectsConfig`');
124
+ (0, _error.errorLog)('There can not be both `packagesMatchs` and `projectsConfig`');
125
125
  }
126
126
 
127
- (0, _error.errorLog)('No `pakcagesMatchs` and `projectsConfig` configurations found');
127
+ (0, _error.errorLog)('No `packagesMatchs` and `projectsConfig` configurations found');
128
128
  };
129
129
 
130
130
  const getProjects = async (config, currentDir = process.cwd()) => {
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from 'events';
3
- export interface ITaskRunnterConfig {
3
+ export interface ITaskRunnerConfig {
4
4
  concurrency?: number;
5
5
  }
6
6
  export declare type TaskFunType<T = undefined> = (stopTask?: () => void) => Promise<T>;
@@ -9,11 +9,11 @@ export declare class TaskRunner<S> extends EventEmitter {
9
9
  static TASK_FINISH: string;
10
10
  _tasks: TaskFunType<S>[];
11
11
  _concurrency: number;
12
- _useableConcurrency: number;
12
+ _usableConcurrency: number;
13
13
  private _stopFlag;
14
14
  constructor(tasks: TaskFunType<S>[], {
15
15
  concurrency
16
- }: ITaskRunnterConfig);
16
+ }: ITaskRunnerConfig);
17
17
  run(): Promise<void>;
18
18
  addTask(task: TaskFunType<S>): void;
19
19
  private _runTask;
@@ -1,3 +1,3 @@
1
1
  import { Package } from '../package';
2
- export declare const getProjetsByPackageConfig: (rootPath: string, packagesConfig: string[], ignoreConfigs: string[]) => Promise<Package[]>;
3
- export declare const syncGetProjetsByPackageConfig: (rootPath: string, packagesConfig: string[], ignoreConfigs: string[]) => Package[];
2
+ export declare const getProjectsByPackageConfig: (rootPath: string, packagesConfig: string[], ignoreConfigs: string[]) => Promise<Package[]>;
3
+ export declare const syncGetProjectsByPackageConfig: (rootPath: string, packagesConfig: string[], ignoreConfigs: string[]) => Package[];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.4.4",
14
+ "version": "1.4.5",
15
15
  "jsnext:source": "./src/index.ts",
16
16
  "types": "./dist/types/index.d.ts",
17
17
  "main": "./dist/js/node/index.js",
@@ -35,14 +35,14 @@
35
35
  "modern": "./bin/modern.js"
36
36
  },
37
37
  "dependencies": {
38
- "@modern-js/core": "^1.9.0",
38
+ "@modern-js/core": "^1.10.1",
39
39
  "@babel/runtime": "^7",
40
40
  "@modern-js/i18n-cli-language-detector": "^1.2.2",
41
- "@modern-js/new-action": "^1.3.7",
41
+ "@modern-js/new-action": "^1.3.8",
42
42
  "@modern-js/plugin": "^1.3.3",
43
- "@modern-js/plugin-changeset": "^1.2.5",
44
- "@modern-js/plugin-i18n": "^1.2.4",
45
- "@modern-js/utils": "^1.6.0",
43
+ "@modern-js/plugin-changeset": "^1.2.6",
44
+ "@modern-js/plugin-i18n": "^1.2.5",
45
+ "@modern-js/utils": "^1.7.2",
46
46
  "@rushstack/node-core-library": "^3.39.1",
47
47
  "@rushstack/package-deps-hash": "^3.0.54",
48
48
  "anymatch": "^3.1.2",