ko 6.6.7-beta.3 → 6.6.7-beta.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/lib/cli.js
CHANGED
|
File without changes
|
|
@@ -12,8 +12,28 @@ declare class Script {
|
|
|
12
12
|
include: (input: string) => boolean;
|
|
13
13
|
options: {
|
|
14
14
|
inline: string;
|
|
15
|
+
chunkFilename: string;
|
|
15
16
|
};
|
|
16
17
|
use?: undefined;
|
|
18
|
+
} | {
|
|
19
|
+
test: RegExp;
|
|
20
|
+
include: (input: string) => boolean;
|
|
21
|
+
use: {
|
|
22
|
+
loader: string;
|
|
23
|
+
options: {
|
|
24
|
+
presets: (string | {
|
|
25
|
+
useBuiltIns: string;
|
|
26
|
+
corejs: number;
|
|
27
|
+
targets: string;
|
|
28
|
+
})[][];
|
|
29
|
+
babelrc: boolean;
|
|
30
|
+
configFile: boolean;
|
|
31
|
+
cacheDirectory: boolean;
|
|
32
|
+
cacheCompression: boolean;
|
|
33
|
+
};
|
|
34
|
+
}[];
|
|
35
|
+
loader?: undefined;
|
|
36
|
+
options?: undefined;
|
|
17
37
|
} | {
|
|
18
38
|
test: RegExp;
|
|
19
39
|
include: (input: string) => boolean;
|
|
@@ -17,19 +17,64 @@ class Script {
|
|
|
17
17
|
{
|
|
18
18
|
test: /\.worker.[jt]s$/,
|
|
19
19
|
loader: this.WORKER_LOADER,
|
|
20
|
-
include: (input) => /dt-react-monaco-editor[\\/]lib[\\/]languages
|
|
20
|
+
include: (input) => /dt-react-monaco-editor[\\/]lib[\\/]languages/.test(input),
|
|
21
21
|
options: {
|
|
22
22
|
inline: 'fallback',
|
|
23
|
+
chunkFilename: '[name].[contenthash].worker.js',
|
|
23
24
|
},
|
|
24
25
|
},
|
|
26
|
+
// Monaco worker 依赖专用规则(不使用 thread-loader,使用 usage polyfill 兼容 Chrome 66)
|
|
25
27
|
{
|
|
26
28
|
test: /\.m?(t|j)sx?$/,
|
|
27
29
|
include: (input) => {
|
|
30
|
+
return (input.includes('monaco-sql-languages') ||
|
|
31
|
+
input.includes('dt-sql-parser') ||
|
|
32
|
+
input.includes('antlr4ng') ||
|
|
33
|
+
input.includes('antlr4-c3'));
|
|
34
|
+
},
|
|
35
|
+
use: [
|
|
36
|
+
{
|
|
37
|
+
loader: require.resolve('babel-loader'),
|
|
38
|
+
options: {
|
|
39
|
+
presets: [
|
|
40
|
+
[
|
|
41
|
+
require.resolve('@babel/preset-env'),
|
|
42
|
+
{
|
|
43
|
+
useBuiltIns: 'usage',
|
|
44
|
+
corejs: 3,
|
|
45
|
+
targets: 'chrome >= 66',
|
|
46
|
+
},
|
|
47
|
+
],
|
|
48
|
+
[require.resolve('@babel/preset-typescript')],
|
|
49
|
+
],
|
|
50
|
+
babelrc: false,
|
|
51
|
+
configFile: false,
|
|
52
|
+
cacheDirectory: true,
|
|
53
|
+
cacheCompression: false,
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
test: /\.m?(t|j)sx?$/,
|
|
60
|
+
include: (input) => {
|
|
61
|
+
if (input.includes('monaco-sql-languages') ||
|
|
62
|
+
input.includes('dt-sql-parser') ||
|
|
63
|
+
input.includes('antlr4ng') ||
|
|
64
|
+
input.includes('antlr4-c3')) {
|
|
65
|
+
return false;
|
|
66
|
+
}
|
|
28
67
|
// internal modules dt-common compatible
|
|
29
68
|
if (/node_modules[\\/]dt-common[\\/]src[\\/]/.test(input)) {
|
|
30
69
|
return true;
|
|
31
70
|
}
|
|
32
|
-
else if (
|
|
71
|
+
else if (input.includes('immer')) {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
else if (input.includes('react-grid-layout')) {
|
|
75
|
+
return true;
|
|
76
|
+
}
|
|
77
|
+
else if (input.includes('monaco-editor')) {
|
|
33
78
|
return true;
|
|
34
79
|
}
|
|
35
80
|
else if (input.includes('node_modules')) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ko",
|
|
3
|
-
"version": "6.6.7-beta.
|
|
3
|
+
"version": "6.6.7-beta.5",
|
|
4
4
|
"description": "build & lint library",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ko",
|
|
@@ -34,12 +34,6 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"lib/*"
|
|
36
36
|
],
|
|
37
|
-
"scripts": {
|
|
38
|
-
"prepublishOnly": "rm -rf lib && tsc",
|
|
39
|
-
"debug": "tsc -w --sourceMap",
|
|
40
|
-
"test": "jest",
|
|
41
|
-
"build": "tsc"
|
|
42
|
-
},
|
|
43
37
|
"dependencies": {
|
|
44
38
|
"@babel/core": "^7.18.0",
|
|
45
39
|
"@dtinsight/auto-polyfills-webpack-plugin": "2.0.0",
|
|
@@ -102,5 +96,11 @@
|
|
|
102
96
|
},
|
|
103
97
|
"engines": {
|
|
104
98
|
"node": ">=14"
|
|
105
|
-
}
|
|
106
|
-
|
|
99
|
+
},
|
|
100
|
+
"scripts": {
|
|
101
|
+
"debug": "tsc -w --sourceMap",
|
|
102
|
+
"test": "jest",
|
|
103
|
+
"build": "tsc"
|
|
104
|
+
},
|
|
105
|
+
"readme": "# ko\nEnglish | [简体中文](./README_CN.md)\n## Simple, yet powerful, tool for managing your react applications. \n\n<a href=\"https://www.npmjs.com/package/ko\"><img alt=\"NPM Status\" src=\"https://img.shields.io/npm/v/ko.svg?style=flat\"></a>\n\n## Features\n\n* Support building applications on top of **webpack v5** and **esbuild**\n* Customize ko to work exactly the way you need it for your applications \n* Built-in popular linting tools to lint your source code\n* Built-in support typescript\n\n## Installation\n\nYou can install ko using npm, yarn or pnpm:\n``` bash\nnpm install ko --save-dev\n# or\nyarn add ko --dev\n# or \npnpm add ko --save-dev\n```\n\n## Documents\n* [Introduction](https://dtstack.github.io/ko/zh-CN/docs/current/introduction)\n* [Getting Started](https://dtstack.github.io/ko/zh-CN/docs/current/getting-started)\n* [FAQ](https://dtstack.github.io/ko/zh-CN/docs/current/FAQ)\n\n## Contributing\n\nWe'd love to have your helping hand on `ko`! See [CONTRIBUTING](../../CONTRIBUTING.md) for more information on how to get started.\n\n## License\n\nCopyright © DTStack. All rights reserved.\n\nLicensed under the MIT license.\n"
|
|
106
|
+
}
|