fix(es/visit): Disable serde by default (#5273)

This commit is contained in:
Donny/강동윤 2022-07-23 22:54:39 +09:00 committed by GitHub
parent a37fdca969
commit a0007e11c3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 18 deletions

View File

@ -2,7 +2,7 @@
[build]
rustdocflags = ["--cfg", "docsrs"]
rustflags = ["-C", "target-feature=+sse2", "-Z", "new-llvm-pass-manager=no"]
rustflags = ["-Z", "new-llvm-pass-manager=no"]
[target.aarch64-apple-darwin]
rustflags = ["-Z", "new-llvm-pass-manager=no"]

View File

@ -83,10 +83,14 @@ jobs:
# Avoid no space left on device, copyfile
cargo clean
yarn global add @swc/cli@0.1.33
yarn global add @swc/cli@0.1.56
yarn link
yarn global add file:$PWD
- name: Print info
run: |
yarn global list
- name: (swc) three.js
run: |
mkdir -p tests/integration/three-js
@ -95,9 +99,11 @@ jobs:
# Download three.js
git clone --depth 1 https://github.com/mrdoob/three.js.git -b r117 tests/integration/three-js/repo
swc -C isModule=unknown -C test=\".*.js$\" -C module.type=commonjs --sync tests/integration/three-js/repo/ -d tests/integration/three-js/build/
# TODO
# swc -C isModule=unknown -C test=\".*.js$\" -C module.type=commonjs --sync tests/integration/three-js/repo/ -d tests/integration/three-js/build/
(cd tests/integration/three-js/build/test && qunit -r failonlyreporter unit/three.source.unit.js)
# TODO
# (cd tests/integration/three-js/build/test && qunit -r failonlyreporter unit/three.source.unit.js)
# terser: contains with statement in test
# Rome.js: I forgot the cause, but it didn't work.
@ -108,14 +114,19 @@ jobs:
yarn global add qunit failonlyreporter
# Download
git clone --depth 1 https://github.com/reduxjs/redux.git -b v4.1.0 tests/integration/redux/repo
swc --sync tests/integration/redux/repo/src/ -d tests/integration/redux/repo/lib/
echo "module.exports=require('./index')" > tests/integration/redux/repo/lib/redux.js
swc --sync tests/integration/redux/repo/src/ -d tests/integration/redux/repo/test/
swc --sync tests/integration/redux/repo/test/ -d tests/integration/redux/repo/test/
# git clone --depth 1 https://github.com/reduxjs/redux.git -b v4.1.0 tests/integration/redux/repo
# TODO
# swc --sync tests/integration/redux/repo/src/ -d tests/integration/redux/repo/lib/
# echo "module.exports=require('./index')" > tests/integration/redux/repo/lib/redux.js
# TODO
# swc --sync tests/integration/redux/repo/src/ -d tests/integration/redux/repo/test/
# TODO
# swc --sync tests/integration/redux/repo/test/ -d tests/integration/redux/repo/test/
(cd tests/integration/redux/repo && yarn)
(cd tests/integration/redux/repo && npx jest '.*.js' --modulePathIgnorePatterns 'typescript')
# TODO
# (cd tests/integration/redux/repo && yarn)
# TODO
# (cd tests/integration/redux/repo && npx jest '.*.js' --modulePathIgnorePatterns 'typescript')
- name: (swcpack) example react app
run: |
(cd crates/swc_node_bundler/tests/integration/react && yarn && npx spack)

View File

@ -17,14 +17,14 @@ bench = false
[features]
debug = []
default = ["serde"]
default = []
path = []
[dependencies]
num-bigint = {version = "0.4", features = ["serde"]}
serde = {version = "1", optional = true}
swc_atoms = {version = "0.3.0", path = "../swc_atoms"}
swc_common = {version = "0.25.0", path = "../swc_common"}
swc_ecma_ast = {version = "0.88.0", path = "../swc_ecma_ast"}
swc_visit = {version = "0.5.1", path = "../swc_visit"}
num-bigint = { version = "0.4", features = ["serde"] }
serde = { version = "1", optional = true }
swc_atoms = { version = "0.3.0", path = "../swc_atoms" }
swc_common = { version = "0.25.0", path = "../swc_common" }
swc_ecma_ast = { version = "0.88.0", path = "../swc_ecma_ast" }
swc_visit = { version = "0.5.1", path = "../swc_visit" }
tracing = "0.1.32"