@modern-js/module-tools 1.20.1 → 1.21.1

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,47 @@
1
1
  # @modern-js/module-tools
2
2
 
3
+ ## 1.21.1
4
+
5
+ ### Patch Changes
6
+
7
+ - fdea3b7: fix: support node-linker=hoist
8
+
9
+ fix: 支持 node-linker=hoist
10
+
11
+ - @modern-js/babel-preset-module@1.21.1
12
+ - @modern-js/core@1.21.1
13
+ - @modern-js/css-config@1.21.1
14
+ - @modern-js/plugin-changeset@1.21.1
15
+ - @modern-js/plugin-i18n@1.21.1
16
+ - @modern-js/plugin-jarvis@1.21.1
17
+ - @modern-js/new-action@1.21.1
18
+ - @modern-js/babel-compiler@1.21.1
19
+ - @modern-js/style-compiler@1.21.1
20
+ - @modern-js/plugin@1.21.1
21
+ - @modern-js/upgrade@1.21.1
22
+ - @modern-js/utils@1.21.1
23
+
24
+ ## 1.21.0
25
+
26
+ ### Patch Changes
27
+
28
+ - Updated dependencies [cfd8557]
29
+ - Updated dependencies [dca34c4]
30
+ - Updated dependencies [28f0a4f]
31
+ - Updated dependencies [b0597e3]
32
+ - @modern-js/new-action@1.21.0
33
+ - @modern-js/upgrade@1.21.0
34
+ - @modern-js/core@1.21.0
35
+ - @modern-js/plugin@1.21.0
36
+ - @modern-js/utils@1.21.0
37
+ - @modern-js/css-config@1.21.0
38
+ - @modern-js/plugin-changeset@1.21.0
39
+ - @modern-js/plugin-jarvis@1.21.0
40
+ - @modern-js/babel-preset-module@1.21.0
41
+ - @modern-js/plugin-i18n@1.21.0
42
+ - @modern-js/babel-compiler@1.21.0
43
+ - @modern-js/style-compiler@1.21.0
44
+
3
45
  ## 1.20.1
4
46
 
5
47
  ### Patch Changes
@@ -85,11 +85,20 @@ export const resolveAlias = (modernConfig, config, watchFilenames = []) => {
85
85
  }
86
86
  };
87
87
  export const getTscBinPath = appDirectory => {
88
- const tscBinFile = path.join(appDirectory, './node_modules/.bin/tsc');
88
+ const {
89
+ root
90
+ } = path.parse(appDirectory);
91
+ let currentDirectory = appDirectory;
92
+
93
+ while (currentDirectory !== root) {
94
+ const tscBinFile = path.join(currentDirectory, './node_modules/.bin/tsc');
95
+
96
+ if (fs.existsSync(tscBinFile)) {
97
+ return tscBinFile;
98
+ }
89
99
 
90
- if (!fs.existsSync(tscBinFile)) {
91
- throw new Error('Failed to excute the `tsc` command, please check if `typescript` is installed correctly in the current directory.');
100
+ currentDirectory = path.dirname(currentDirectory);
92
101
  }
93
102
 
94
- return tscBinFile;
103
+ throw new Error('Failed to excute the `tsc` command, please check if `typescript` is installed correctly in the current directory.');
95
104
  };
@@ -110,13 +110,22 @@ const resolveAlias = (modernConfig, config, watchFilenames = []) => {
110
110
  exports.resolveAlias = resolveAlias;
111
111
 
112
112
  const getTscBinPath = appDirectory => {
113
- const tscBinFile = path.join(appDirectory, './node_modules/.bin/tsc');
113
+ const {
114
+ root
115
+ } = path.parse(appDirectory);
116
+ let currentDirectory = appDirectory;
117
+
118
+ while (currentDirectory !== root) {
119
+ const tscBinFile = path.join(currentDirectory, './node_modules/.bin/tsc');
120
+
121
+ if (_utils.fs.existsSync(tscBinFile)) {
122
+ return tscBinFile;
123
+ }
114
124
 
115
- if (!_utils.fs.existsSync(tscBinFile)) {
116
- throw new Error('Failed to excute the `tsc` command, please check if `typescript` is installed correctly in the current directory.');
125
+ currentDirectory = path.dirname(currentDirectory);
117
126
  }
118
127
 
119
- return tscBinFile;
128
+ throw new Error('Failed to excute the `tsc` command, please check if `typescript` is installed correctly in the current directory.');
120
129
  };
121
130
 
122
131
  exports.getTscBinPath = getTscBinPath;
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.20.1",
14
+ "version": "1.21.1",
15
15
  "bin": {
16
16
  "modern": "./bin/modern.js"
17
17
  },
@@ -54,18 +54,18 @@
54
54
  "@babel/runtime": "^7.18.0",
55
55
  "@babel/traverse": "^7.18.0",
56
56
  "@babel/types": "^7.18.0",
57
- "@modern-js/babel-compiler": "1.20.1",
58
- "@modern-js/babel-preset-module": "1.20.1",
59
- "@modern-js/core": "1.20.1",
60
- "@modern-js/css-config": "1.20.1",
61
- "@modern-js/new-action": "1.20.1",
62
- "@modern-js/upgrade": "1.20.1",
63
- "@modern-js/plugin": "1.20.1",
64
- "@modern-js/plugin-changeset": "1.20.1",
65
- "@modern-js/plugin-i18n": "1.20.1",
66
- "@modern-js/plugin-jarvis": "1.20.1",
67
- "@modern-js/style-compiler": "1.20.1",
68
- "@modern-js/utils": "1.20.1",
57
+ "@modern-js/babel-compiler": "1.21.1",
58
+ "@modern-js/babel-preset-module": "1.21.1",
59
+ "@modern-js/core": "1.21.1",
60
+ "@modern-js/css-config": "1.21.1",
61
+ "@modern-js/new-action": "1.21.1",
62
+ "@modern-js/upgrade": "1.21.1",
63
+ "@modern-js/plugin": "1.21.1",
64
+ "@modern-js/plugin-changeset": "1.21.1",
65
+ "@modern-js/plugin-i18n": "1.21.1",
66
+ "@modern-js/plugin-jarvis": "1.21.1",
67
+ "@modern-js/style-compiler": "1.21.1",
68
+ "@modern-js/utils": "1.21.1",
69
69
  "@rollup/plugin-json": "~4.1.0",
70
70
  "@speedy-js/speedy-types": "0.13.2-modern.1",
71
71
  "@speedy-js/speedy-core": "0.13.2-modern.1",
@@ -79,8 +79,8 @@
79
79
  "signal-exit": "^3.0.7"
80
80
  },
81
81
  "devDependencies": {
82
- "@scripts/build": "1.20.1",
83
- "@scripts/jest-config": "1.20.1",
82
+ "@scripts/build": "1.21.1",
83
+ "@scripts/jest-config": "1.21.1",
84
84
  "@types/babel__core": "^7.1.15",
85
85
  "@types/babel__generator": "^7.6.3",
86
86
  "@types/babel__traverse": "^7.14.2",