Skip to content
This repository was archived by the owner on Jan 16, 2025. It is now read-only.

Commit 3bb97ed

Browse files
committed
Merge branch 'master' into ISSUE-203
2 parents 77c915a + dc0f03d commit 3bb97ed

File tree

21 files changed

+1286
-1725
lines changed

21 files changed

+1286
-1725
lines changed

.github/workflows/integration.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
strategy:
99
matrix:
1010
os: [macos-latest, windows-latest, ubuntu-latest]
11-
node-version: [12.x, 14.x, 16.x]
11+
node-version: [14.x, 16.x, 18.x]
1212

1313
steps:
1414
- uses: actions/checkout@v2
@@ -40,7 +40,7 @@ jobs:
4040
echo "File count do not match source count: ${SOURCE_JS_COUNT} to build ${BUILD_JS_COUNT}"
4141
exit 1
4242
fi
43-
}
43+
}
4444
4545
mkdir -p integration-tests/three.js
4646
git clone --depth 1 https://github.com/mrdoob/three.js.git integration-tests/three.js
@@ -66,20 +66,20 @@ jobs:
6666
EOF
6767
6868
echo "Run swc sync"
69-
rm -rf build
69+
rm -rf build
7070
yarn swc --sync src -d build
7171
checkBuild "src" "build"
7272
73-
rm -rf build-editor
73+
rm -rf build-editor
7474
yarn swc --sync editor -d ./build-editor/
7575
checkBuild "editor" "build-editor"
7676
7777
echo "Run swc async"
78-
rm -rf build
78+
rm -rf build
7979
yarn swc src -d ./build/
8080
checkBuild "src" "build"
8181
82-
rm -rf build-editor
82+
rm -rf build-editor
8383
yarn swc editor -d ./build-editor/
8484
checkBuild "editor" "build-editor"
8585
@@ -108,7 +108,7 @@ jobs:
108108
echo "File count do not match source count: ${SOURCE_JS_COUNT} to build ${BUILD_JS_COUNT}"
109109
exit 1
110110
fi
111-
}
111+
}
112112
113113
mkdir -p integration-tests/rxjs
114114
git clone --depth 1 https://github.com/ReactiveX/rxjs.git integration-tests/rxjs
@@ -142,7 +142,7 @@ jobs:
142142
yarn swc --sync spec -d build-spec
143143
checkBuild "spec" "build-spec"
144144
145-
rm -rf build
145+
rm -rf build
146146
147147
echo "Run swc async"
148148
rm -rf build

.github/workflows/test.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
node-version: [12.x, 14.x, 16.x]
10+
node-version: [14.x, 16.x, 18.x]
1111

1212
steps:
1313
- uses: actions/checkout@v2
@@ -26,6 +26,9 @@ jobs:
2626
- name: Build
2727
run: yarn types
2828

29+
- name: Format
30+
run: yarn prettier --check src examples
31+
2932
- name: Test
3033
run: yarn test
3134

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
const { config } = require('@swc/core/spack')
2-
1+
const { config } = require("@swc/core/spack");
32

43
module.exports = config({
5-
entry: {
6-
'web': __dirname + '/src/index.ts',
7-
},
8-
output: {
9-
path: __dirname + '/lib'
10-
},
11-
module: {},
12-
});
4+
entry: {
5+
web: __dirname + "/src/index.ts",
6+
},
7+
output: {
8+
path: __dirname + "/lib",
9+
},
10+
module: {},
11+
});

examples/spack-basic/src/common.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
export const A = 'foo';
2-
export const B = 'bar';
1+
export const A = "foo";
2+
export const B = "bar";

examples/spack-basic/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
import { B } from "./common";
22

3-
console.log(B)
3+
console.log(B);
Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
1-
const { config } = require('@swc/core/spack')
2-
1+
const { config } = require("@swc/core/spack");
32

43
module.exports = config({
5-
entry: {
6-
'web': __dirname + '/src/web.ts',
7-
'android': __dirname + '/src/android.ts',
8-
},
9-
output: {
10-
path: __dirname + '/lib'
11-
},
12-
module: {},
13-
});
4+
entry: {
5+
web: __dirname + "/src/web.ts",
6+
android: __dirname + "/src/android.ts",
7+
},
8+
output: {
9+
path: __dirname + "/lib",
10+
},
11+
module: {},
12+
});
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import './common';
1+
import "./common";
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
console.log('initializing')
1+
console.log("initializing");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
import './common';
1+
import "./common";
Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
const { config } = require('@swc/core/spack')
2-
1+
const { config } = require("@swc/core/spack");
32

43
module.exports = config({
5-
entry: {
6-
'web': __dirname + '/src/index.ts',
7-
},
8-
output: {
9-
path: __dirname + '/lib'
10-
},
11-
module: {},
12-
});
4+
entry: {
5+
web: __dirname + "/src/index.ts",
6+
},
7+
output: {
8+
path: __dirname + "/lib",
9+
},
10+
module: {},
11+
});

0 commit comments

Comments
 (0)