@workleap/swc-configs 2.1.0 → 2.1.2
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 +12 -0
- package/dist/build.d.mts +1 -2
- package/dist/build.d.ts +1 -2
- package/dist/build.js +2 -7
- package/dist/build.mjs +1 -1
- package/dist/{chunk-4XVTQNRR.mjs → chunk-5DI7IZIG.mjs} +2 -7
- package/dist/{chunk-MYINGMHM.mjs → chunk-BAXEZBXT.mjs} +1 -5
- package/dist/{chunk-VPNQWY2U.mjs → chunk-IQX2HH4E.mjs} +3 -8
- package/dist/dev.d.mts +1 -2
- package/dist/dev.d.ts +1 -2
- package/dist/dev.js +3 -8
- package/dist/dev.mjs +1 -1
- package/dist/index.js +6 -20
- package/dist/index.mjs +3 -3
- package/dist/jest.js +1 -5
- package/dist/jest.mjs +1 -1
- package/package.json +12 -12
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @workleap/swc-configs
|
|
2
2
|
|
|
3
|
+
## 2.1.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#143](https://github.com/gsoft-inc/wl-web-configs/pull/143) [`334088f`](https://github.com/gsoft-inc/wl-web-configs/commit/334088fac63aad6cc245ee3300da076e5c201287) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated to SWC 1.3.85
|
|
8
|
+
|
|
9
|
+
## 2.1.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [#120](https://github.com/gsoft-inc/wl-web-configs/pull/120) [`0e66000`](https://github.com/gsoft-inc/wl-web-configs/commit/0e66000b2028cad9c606d3523e3bcf540e6350e2) Thanks [@patricklafrance](https://github.com/patricklafrance)! - Updated configs
|
|
14
|
+
|
|
3
15
|
## 2.1.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/build.d.mts
CHANGED
|
@@ -2,10 +2,9 @@ import { Config } from '@swc/core';
|
|
|
2
2
|
import { SwcConfigTransformer } from './applyTransformers.mjs';
|
|
3
3
|
|
|
4
4
|
interface DefineBuildConfigOptions {
|
|
5
|
-
targets: Record<string, string>;
|
|
6
5
|
parser?: "ecmascript" | "typescript";
|
|
7
6
|
transformers?: SwcConfigTransformer[];
|
|
8
7
|
}
|
|
9
|
-
declare function defineBuildConfig(
|
|
8
|
+
declare function defineBuildConfig(targets: Record<string, string>, options?: DefineBuildConfigOptions): Config;
|
|
10
9
|
|
|
11
10
|
export { DefineBuildConfigOptions, defineBuildConfig };
|
package/dist/build.d.ts
CHANGED
|
@@ -2,10 +2,9 @@ import { Config } from '@swc/core';
|
|
|
2
2
|
import { SwcConfigTransformer } from './applyTransformers.js';
|
|
3
3
|
|
|
4
4
|
interface DefineBuildConfigOptions {
|
|
5
|
-
targets: Record<string, string>;
|
|
6
5
|
parser?: "ecmascript" | "typescript";
|
|
7
6
|
transformers?: SwcConfigTransformer[];
|
|
8
7
|
}
|
|
9
|
-
declare function defineBuildConfig(
|
|
8
|
+
declare function defineBuildConfig(targets: Record<string, string>, options?: DefineBuildConfigOptions): Config;
|
|
10
9
|
|
|
11
10
|
export { DefineBuildConfigOptions, defineBuildConfig };
|
package/dist/build.js
CHANGED
|
@@ -6,9 +6,8 @@ function applyTransformers(config, transformers, context) {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
// src/build.ts
|
|
9
|
-
function defineBuildConfig(options) {
|
|
9
|
+
function defineBuildConfig(targets, options = {}) {
|
|
10
10
|
const {
|
|
11
|
-
targets,
|
|
12
11
|
parser = "typescript",
|
|
13
12
|
transformers = []
|
|
14
13
|
} = options;
|
|
@@ -40,11 +39,7 @@ function defineBuildConfig(options) {
|
|
|
40
39
|
},
|
|
41
40
|
module: {
|
|
42
41
|
// The output module resolution system that the code will be compiled for.
|
|
43
|
-
type: "es6"
|
|
44
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
45
|
-
strict: true,
|
|
46
|
-
// Preserve dynamic imports.
|
|
47
|
-
ignoreDynamic: true
|
|
42
|
+
type: "es6"
|
|
48
43
|
},
|
|
49
44
|
env: {
|
|
50
45
|
// jsc.target is not provided because the provided targets takes precedence.
|
package/dist/build.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { defineBuildConfig } from './chunk-
|
|
1
|
+
export { defineBuildConfig } from './chunk-5DI7IZIG.mjs';
|
|
2
2
|
import './chunk-3UBBOKDF.mjs';
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { applyTransformers } from './chunk-3UBBOKDF.mjs';
|
|
2
2
|
|
|
3
3
|
// src/build.ts
|
|
4
|
-
function defineBuildConfig(options) {
|
|
4
|
+
function defineBuildConfig(targets, options = {}) {
|
|
5
5
|
const {
|
|
6
|
-
targets,
|
|
7
6
|
parser = "typescript",
|
|
8
7
|
transformers = []
|
|
9
8
|
} = options;
|
|
@@ -35,11 +34,7 @@ function defineBuildConfig(options) {
|
|
|
35
34
|
},
|
|
36
35
|
module: {
|
|
37
36
|
// The output module resolution system that the code will be compiled for.
|
|
38
|
-
type: "es6"
|
|
39
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
40
|
-
strict: true,
|
|
41
|
-
// Preserve dynamic imports.
|
|
42
|
-
ignoreDynamic: true
|
|
37
|
+
type: "es6"
|
|
43
38
|
},
|
|
44
39
|
env: {
|
|
45
40
|
// jsc.target is not provided because the provided targets takes precedence.
|
|
@@ -29,11 +29,7 @@ function defineJestConfig(options = {}) {
|
|
|
29
29
|
},
|
|
30
30
|
module: {
|
|
31
31
|
// The output module resolution system that the code will be compiled for.
|
|
32
|
-
type: "es6"
|
|
33
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
34
|
-
strict: true,
|
|
35
|
-
// Preserve dynamic imports.
|
|
36
|
-
ignoreDynamic: true
|
|
32
|
+
type: "es6"
|
|
37
33
|
}
|
|
38
34
|
};
|
|
39
35
|
const transformedConfig = applyTransformers(config, transformers, {
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { applyTransformers } from './chunk-3UBBOKDF.mjs';
|
|
2
2
|
|
|
3
3
|
// src/dev.ts
|
|
4
|
-
function defineDevConfig(options) {
|
|
4
|
+
function defineDevConfig(targets, options = {}) {
|
|
5
5
|
const {
|
|
6
|
-
|
|
7
|
-
fastRefresh = false,
|
|
6
|
+
fastRefresh = true,
|
|
8
7
|
parser = "typescript",
|
|
9
8
|
transformers = []
|
|
10
9
|
} = options;
|
|
@@ -34,11 +33,7 @@ function defineDevConfig(options) {
|
|
|
34
33
|
},
|
|
35
34
|
module: {
|
|
36
35
|
// The output module resolution system that the code will be compiled for.
|
|
37
|
-
type: "es6"
|
|
38
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
39
|
-
strict: true,
|
|
40
|
-
// Preserve dynamic imports.
|
|
41
|
-
ignoreDynamic: true
|
|
36
|
+
type: "es6"
|
|
42
37
|
},
|
|
43
38
|
env: {
|
|
44
39
|
// jsc.target is not provided because the provided targets takes precedence.
|
package/dist/dev.d.mts
CHANGED
|
@@ -2,11 +2,10 @@ import { Config } from '@swc/core';
|
|
|
2
2
|
import { SwcConfigTransformer } from './applyTransformers.mjs';
|
|
3
3
|
|
|
4
4
|
interface DefineDevConfigOptions {
|
|
5
|
-
targets: Record<string, string>;
|
|
6
5
|
fastRefresh?: boolean;
|
|
7
6
|
parser?: "ecmascript" | "typescript";
|
|
8
7
|
transformers?: SwcConfigTransformer[];
|
|
9
8
|
}
|
|
10
|
-
declare function defineDevConfig(
|
|
9
|
+
declare function defineDevConfig(targets: Record<string, string>, options?: DefineDevConfigOptions): Config;
|
|
11
10
|
|
|
12
11
|
export { DefineDevConfigOptions, defineDevConfig };
|
package/dist/dev.d.ts
CHANGED
|
@@ -2,11 +2,10 @@ import { Config } from '@swc/core';
|
|
|
2
2
|
import { SwcConfigTransformer } from './applyTransformers.js';
|
|
3
3
|
|
|
4
4
|
interface DefineDevConfigOptions {
|
|
5
|
-
targets: Record<string, string>;
|
|
6
5
|
fastRefresh?: boolean;
|
|
7
6
|
parser?: "ecmascript" | "typescript";
|
|
8
7
|
transformers?: SwcConfigTransformer[];
|
|
9
8
|
}
|
|
10
|
-
declare function defineDevConfig(
|
|
9
|
+
declare function defineDevConfig(targets: Record<string, string>, options?: DefineDevConfigOptions): Config;
|
|
11
10
|
|
|
12
11
|
export { DefineDevConfigOptions, defineDevConfig };
|
package/dist/dev.js
CHANGED
|
@@ -6,10 +6,9 @@ function applyTransformers(config, transformers, context) {
|
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
// src/dev.ts
|
|
9
|
-
function defineDevConfig(options) {
|
|
9
|
+
function defineDevConfig(targets, options = {}) {
|
|
10
10
|
const {
|
|
11
|
-
|
|
12
|
-
fastRefresh = false,
|
|
11
|
+
fastRefresh = true,
|
|
13
12
|
parser = "typescript",
|
|
14
13
|
transformers = []
|
|
15
14
|
} = options;
|
|
@@ -39,11 +38,7 @@ function defineDevConfig(options) {
|
|
|
39
38
|
},
|
|
40
39
|
module: {
|
|
41
40
|
// The output module resolution system that the code will be compiled for.
|
|
42
|
-
type: "es6"
|
|
43
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
44
|
-
strict: true,
|
|
45
|
-
// Preserve dynamic imports.
|
|
46
|
-
ignoreDynamic: true
|
|
41
|
+
type: "es6"
|
|
47
42
|
},
|
|
48
43
|
env: {
|
|
49
44
|
// jsc.target is not provided because the provided targets takes precedence.
|
package/dist/dev.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { defineDevConfig } from './chunk-
|
|
1
|
+
export { defineDevConfig } from './chunk-IQX2HH4E.mjs';
|
|
2
2
|
import './chunk-3UBBOKDF.mjs';
|
package/dist/index.js
CHANGED
|
@@ -82,9 +82,8 @@ function applyTransformers(config, transformers, context) {
|
|
|
82
82
|
}
|
|
83
83
|
|
|
84
84
|
// src/build.ts
|
|
85
|
-
function defineBuildConfig(options) {
|
|
85
|
+
function defineBuildConfig(targets, options = {}) {
|
|
86
86
|
const {
|
|
87
|
-
targets,
|
|
88
87
|
parser = "typescript",
|
|
89
88
|
transformers = []
|
|
90
89
|
} = options;
|
|
@@ -116,11 +115,7 @@ function defineBuildConfig(options) {
|
|
|
116
115
|
},
|
|
117
116
|
module: {
|
|
118
117
|
// The output module resolution system that the code will be compiled for.
|
|
119
|
-
type: "es6"
|
|
120
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
121
|
-
strict: true,
|
|
122
|
-
// Preserve dynamic imports.
|
|
123
|
-
ignoreDynamic: true
|
|
118
|
+
type: "es6"
|
|
124
119
|
},
|
|
125
120
|
env: {
|
|
126
121
|
// jsc.target is not provided because the provided targets takes precedence.
|
|
@@ -134,10 +129,9 @@ function defineBuildConfig(options) {
|
|
|
134
129
|
}
|
|
135
130
|
|
|
136
131
|
// src/dev.ts
|
|
137
|
-
function defineDevConfig(options) {
|
|
132
|
+
function defineDevConfig(targets, options = {}) {
|
|
138
133
|
const {
|
|
139
|
-
|
|
140
|
-
fastRefresh = false,
|
|
134
|
+
fastRefresh = true,
|
|
141
135
|
parser = "typescript",
|
|
142
136
|
transformers = []
|
|
143
137
|
} = options;
|
|
@@ -167,11 +161,7 @@ function defineDevConfig(options) {
|
|
|
167
161
|
},
|
|
168
162
|
module: {
|
|
169
163
|
// The output module resolution system that the code will be compiled for.
|
|
170
|
-
type: "es6"
|
|
171
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
172
|
-
strict: true,
|
|
173
|
-
// Preserve dynamic imports.
|
|
174
|
-
ignoreDynamic: true
|
|
164
|
+
type: "es6"
|
|
175
165
|
},
|
|
176
166
|
env: {
|
|
177
167
|
// jsc.target is not provided because the provided targets takes precedence.
|
|
@@ -213,11 +203,7 @@ function defineJestConfig(options = {}) {
|
|
|
213
203
|
},
|
|
214
204
|
module: {
|
|
215
205
|
// The output module resolution system that the code will be compiled for.
|
|
216
|
-
type: "es6"
|
|
217
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
218
|
-
strict: true,
|
|
219
|
-
// Preserve dynamic imports.
|
|
220
|
-
ignoreDynamic: true
|
|
206
|
+
type: "es6"
|
|
221
207
|
}
|
|
222
208
|
};
|
|
223
209
|
const transformedConfig = applyTransformers(config, transformers, {
|
package/dist/index.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { browserslistToSwc, createSwcTargetsFromBrowserslistEntries } from './chunk-MGMFB3UY.mjs';
|
|
2
|
-
export { defineBuildConfig } from './chunk-
|
|
3
|
-
export { defineDevConfig } from './chunk-
|
|
4
|
-
export { defineJestConfig } from './chunk-
|
|
2
|
+
export { defineBuildConfig } from './chunk-5DI7IZIG.mjs';
|
|
3
|
+
export { defineDevConfig } from './chunk-IQX2HH4E.mjs';
|
|
4
|
+
export { defineJestConfig } from './chunk-BAXEZBXT.mjs';
|
|
5
5
|
import './chunk-3UBBOKDF.mjs';
|
package/dist/jest.js
CHANGED
|
@@ -34,11 +34,7 @@ function defineJestConfig(options = {}) {
|
|
|
34
34
|
},
|
|
35
35
|
module: {
|
|
36
36
|
// The output module resolution system that the code will be compiled for.
|
|
37
|
-
type: "es6"
|
|
38
|
-
// Prevent SWC from exporting the `__esModule` property.
|
|
39
|
-
strict: true,
|
|
40
|
-
// Preserve dynamic imports.
|
|
41
|
-
ignoreDynamic: true
|
|
37
|
+
type: "es6"
|
|
42
38
|
}
|
|
43
39
|
};
|
|
44
40
|
const transformedConfig = applyTransformers(config, transformers, {
|
package/dist/jest.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { defineJestConfig } from './chunk-
|
|
1
|
+
export { defineJestConfig } from './chunk-BAXEZBXT.mjs';
|
|
2
2
|
import './chunk-3UBBOKDF.mjs';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@workleap/swc-configs",
|
|
3
3
|
"description": "Workleap recommended SWC configs.",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.2",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"workleap",
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"require": {
|
|
14
|
-
"
|
|
15
|
-
"
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
15
|
+
"default": "./dist/index.js"
|
|
16
16
|
},
|
|
17
17
|
"import": {
|
|
18
|
-
"
|
|
19
|
-
"
|
|
18
|
+
"types": "./dist/index.d.mts",
|
|
19
|
+
"default": "./dist/index.mjs"
|
|
20
20
|
}
|
|
21
21
|
}
|
|
22
22
|
},
|
|
@@ -32,18 +32,18 @@
|
|
|
32
32
|
"directory": "packages/swc-configs"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
|
-
"@swc/core": "1.3.
|
|
36
|
-
"@swc/helpers": "0.5.
|
|
35
|
+
"@swc/core": "1.3.85",
|
|
36
|
+
"@swc/helpers": "0.5.2",
|
|
37
37
|
"@swc/jest": "0.2.29",
|
|
38
|
-
"@types/jest": "29.5.
|
|
38
|
+
"@types/jest": "29.5.5",
|
|
39
39
|
"browserslist": "4.21.10",
|
|
40
|
-
"jest": "29.
|
|
40
|
+
"jest": "29.7.0",
|
|
41
41
|
"ts-node": "10.9.1",
|
|
42
42
|
"tsup": "7.2.0",
|
|
43
43
|
"typescript": "5.2.2",
|
|
44
|
-
"@workleap/eslint-plugin": "2.1.
|
|
45
|
-
"@workleap/tsup-configs": "3.0.
|
|
46
|
-
"@workleap/typescript-configs": "3.0.
|
|
44
|
+
"@workleap/eslint-plugin": "2.1.1",
|
|
45
|
+
"@workleap/tsup-configs": "3.0.1",
|
|
46
|
+
"@workleap/typescript-configs": "3.0.2"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
49
|
"@swc/core": "*",
|