@modern-js/module-tools 1.5.0 → 1.5.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,26 @@
1
1
  # @modern-js/module-tools
2
2
 
3
+ ## 1.5.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 69a728375: fix: remove exports.jsnext:source after publish
8
+ - Updated dependencies [cd7346b0d]
9
+ - Updated dependencies [0e0537005]
10
+ - Updated dependencies [6b0bb5e3b]
11
+ - Updated dependencies [69a728375]
12
+ - @modern-js/utils@1.7.2
13
+ - @modern-js/babel-preset-module@1.3.4
14
+ - @modern-js/babel-compiler@1.2.4
15
+ - @modern-js/new-action@1.3.8
16
+ - @modern-js/core@1.10.1
17
+ - @modern-js/css-config@1.2.5
18
+ - @modern-js/plugin-analyze@1.4.2
19
+ - @modern-js/plugin-changeset@1.2.6
20
+ - @modern-js/plugin-fast-refresh@1.2.5
21
+ - @modern-js/plugin-i18n@1.2.5
22
+ - @modern-js/style-compiler@1.2.5
23
+
3
24
  ## 1.5.0
4
25
 
5
26
  ### Minor Changes
@@ -118,13 +118,13 @@ const taskMain = async ({
118
118
 
119
119
 
120
120
  const srcDir = path.resolve(appDirectory, SRC_STYLE_DIRS);
121
- const outputDirtoSrc = path.join(appDirectory, outputPath, jsPath, assetsPath);
121
+ const outputDirToSrc = path.join(appDirectory, outputPath, jsPath, assetsPath);
122
122
 
123
123
  if (importStyle === 'compiled-code') {
124
124
  const srcStyleResult = await compiler.styleCompiler({
125
125
  projectDir: appDirectory,
126
126
  stylesDir: srcDir,
127
- outDir: outputDirtoSrc,
127
+ outDir: outputDirToSrc,
128
128
  enableVirtualDist: true,
129
129
  compilerOption: {
130
130
  less: lessOption,
@@ -136,7 +136,7 @@ const taskMain = async ({
136
136
  } else {
137
137
  copyOriginStyleFiles({
138
138
  targetDir: srcDir,
139
- outputDir: outputDirtoSrc
139
+ outputDir: outputDirToSrc
140
140
  });
141
141
  }
142
142
  };
@@ -31,7 +31,7 @@ export const copyTask = async option => {
31
31
  try {
32
32
  // 类型暂时这样处理,待之后优化copy的逻辑
33
33
  for (const copyOption of copy) {
34
- // 在原来的基础上,引入了类似于 copy-webpck-plugin 的 context 属性,可以设置项目根路径
34
+ // 在原来的基础上,引入了类似于 copy-webpack-plugin 的 context 属性,可以设置项目根路径
35
35
  const {
36
36
  context = appDirectory,
37
37
  from,
@@ -75,7 +75,7 @@ const transformExport = option => nodePath => {
75
75
  mapPathString(nodePath.get('source'), option);
76
76
  };
77
77
 
78
- const transfromSingleFileAlias = ({
78
+ const transformSingleFileAlias = ({
79
79
  filename,
80
80
  baseUrl,
81
81
  paths
@@ -118,7 +118,7 @@ export const transformDtsAlias = option => {
118
118
  for (const filename of filenames) {
119
119
  transformResult.push({
120
120
  path: filename,
121
- content: transfromSingleFileAlias({
121
+ content: transformSingleFileAlias({
122
122
  filename,
123
123
  baseUrl,
124
124
  paths
@@ -133,13 +133,13 @@ const taskMain = async ({
133
133
 
134
134
 
135
135
  const srcDir = path.resolve(appDirectory, SRC_STYLE_DIRS);
136
- const outputDirtoSrc = path.join(appDirectory, outputPath, jsPath, assetsPath);
136
+ const outputDirToSrc = path.join(appDirectory, outputPath, jsPath, assetsPath);
137
137
 
138
138
  if (importStyle === 'compiled-code') {
139
139
  const srcStyleResult = await compiler.styleCompiler({
140
140
  projectDir: appDirectory,
141
141
  stylesDir: srcDir,
142
- outDir: outputDirtoSrc,
142
+ outDir: outputDirToSrc,
143
143
  enableVirtualDist: true,
144
144
  compilerOption: {
145
145
  less: lessOption,
@@ -151,7 +151,7 @@ const taskMain = async ({
151
151
  } else {
152
152
  copyOriginStyleFiles({
153
153
  targetDir: srcDir,
154
- outputDir: outputDirtoSrc
154
+ outputDir: outputDirToSrc
155
155
  });
156
156
  }
157
157
  };
@@ -45,7 +45,7 @@ const copyTask = async option => {
45
45
  try {
46
46
  // 类型暂时这样处理,待之后优化copy的逻辑
47
47
  for (const copyOption of copy) {
48
- // 在原来的基础上,引入了类似于 copy-webpck-plugin 的 context 属性,可以设置项目根路径
48
+ // 在原来的基础上,引入了类似于 copy-webpack-plugin 的 context 属性,可以设置项目根路径
49
49
  const {
50
50
  context = appDirectory,
51
51
  from,
@@ -97,7 +97,7 @@ const transformExport = option => nodePath => {
97
97
  mapPathString(nodePath.get('source'), option);
98
98
  };
99
99
 
100
- const transfromSingleFileAlias = ({
100
+ const transformSingleFileAlias = ({
101
101
  filename,
102
102
  baseUrl,
103
103
  paths
@@ -141,7 +141,7 @@ const transformDtsAlias = option => {
141
141
  for (const filename of filenames) {
142
142
  transformResult.push({
143
143
  path: filename,
144
- content: transfromSingleFileAlias({
144
+ content: transformSingleFileAlias({
145
145
  filename,
146
146
  baseUrl,
147
147
  paths
@@ -3,7 +3,7 @@ export interface IDevConfig {
3
3
  appDirectory: string;
4
4
  isTsProject: boolean;
5
5
  }
6
- export declare type DevTaskType = 'storybook' | 'docsite' | 'unknow';
6
+ export declare type DevTaskType = 'storybook' | 'docsite' | 'unknown';
7
7
  export declare const showMenu: (api: PluginAPI, config: IDevConfig) => Promise<void>;
8
8
  export declare const devStorybook: (api: PluginAPI, config: IDevConfig) => Promise<void>;
9
9
  export declare const runSubCmd: (api: PluginAPI, subCmd: string, config: IDevConfig) => Promise<void>;
@@ -3,12 +3,12 @@ export interface TransformOption {
3
3
  baseUrl: string;
4
4
  paths: Record<string, string[] | string>;
5
5
  }
6
- interface TransformDtsAlaisOption {
6
+ interface TransformDtsAliasOption {
7
7
  filenames?: string[];
8
8
  baseUrl: string;
9
9
  paths: Record<string, string[] | string>;
10
10
  }
11
- export declare const transformDtsAlias: (option: TransformDtsAlaisOption) => {
11
+ export declare const transformDtsAlias: (option: TransformDtsAliasOption) => {
12
12
  path: string;
13
13
  content: string;
14
14
  }[];
package/package.json CHANGED
@@ -11,7 +11,7 @@
11
11
  "modern",
12
12
  "modern.js"
13
13
  ],
14
- "version": "1.5.0",
14
+ "version": "1.5.1",
15
15
  "bin": {
16
16
  "modern": "./bin/modern.js"
17
17
  },
@@ -54,19 +54,19 @@
54
54
  "@babel/runtime": "^7",
55
55
  "@babel/traverse": "^7.15.0",
56
56
  "@babel/types": "^7.17.0",
57
- "@modern-js/babel-compiler": "^1.2.3",
58
- "@modern-js/babel-preset-module": "^1.3.3",
59
- "@modern-js/core": "^1.9.0",
60
- "@modern-js/css-config": "^1.2.4",
57
+ "@modern-js/babel-compiler": "^1.2.4",
58
+ "@modern-js/babel-preset-module": "^1.3.4",
59
+ "@modern-js/core": "^1.10.1",
60
+ "@modern-js/css-config": "^1.2.5",
61
61
  "@modern-js/i18n-cli-language-detector": "^1.2.2",
62
- "@modern-js/new-action": "^1.3.7",
62
+ "@modern-js/new-action": "^1.3.8",
63
63
  "@modern-js/plugin": "^1.3.3",
64
- "@modern-js/plugin-analyze": "^1.4.1",
65
- "@modern-js/plugin-changeset": "^1.2.5",
66
- "@modern-js/plugin-fast-refresh": "^1.2.4",
67
- "@modern-js/plugin-i18n": "^1.2.4",
68
- "@modern-js/style-compiler": "^1.2.4",
69
- "@modern-js/utils": "^1.6.0",
64
+ "@modern-js/plugin-analyze": "^1.4.2",
65
+ "@modern-js/plugin-changeset": "^1.2.6",
66
+ "@modern-js/plugin-fast-refresh": "^1.2.5",
67
+ "@modern-js/plugin-i18n": "^1.2.5",
68
+ "@modern-js/style-compiler": "^1.2.5",
69
+ "@modern-js/utils": "^1.7.2",
70
70
  "normalize-path": "^3.0.0",
71
71
  "p-map": "^4",
72
72
  "process.argv": "^0.6.0",