Skip to content

Commit

Permalink
Merge branch 'hotfix/issue_9460' of github.com:wjw99830/swc into hotf…
Browse files Browse the repository at this point in the history
…ix/issue_9460
  • Loading branch information
wjw99830 committed Aug 21, 2024
2 parents a92c84d + c74ef0d commit 717bec5
Show file tree
Hide file tree
Showing 57 changed files with 330 additions and 442 deletions.
9 changes: 0 additions & 9 deletions .changeset/olive-pianos-lay.md

This file was deleted.

34 changes: 19 additions & 15 deletions .github/workflows/publish-npm-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,14 @@ jobs:
export JEMALLOC_SYS_WITH_LG_PAGE=16 &&
rustup toolchain install $(cat ../../rust-toolchain) &&
rustup target add aarch64-unknown-linux-musl &&
RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-lgcc' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-unknown-linux-musl &&
rm -rf target/release/.cargo-lock &&
cp ../../bindings/target/aarch64-unknown-linux-musl/release/swc . && chmod +x ./swc &&
env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl
if [[ ${{ inputs.package }} == "core" ]]; then
RUSTFLAGS='-C target-feature=+crt-static -C link-arg=-lgcc' cargo build --manifest-path ../../bindings/swc_cli/Cargo.toml --release --features plugin --target aarch64-unknown-linux-musl &&
rm -rf target/release/.cargo-lock &&
cp ../../bindings/target/aarch64-unknown-linux-musl/release/swc . && chmod +x ./swc &&
env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl
else
env RUSTFLAGS='-C target-feature=-crt-static' yarn build --target=aarch64-unknown-linux-musl
fi
- host: windows-latest
target: aarch64-pc-windows-msvc
# Disable `LTO` and increase `codegen-units` to avoid llvm `OOM` on GitHub Actions.
Expand Down Expand Up @@ -276,7 +280,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bindings-${{ matrix.settings.target }}
name: bindings-${{ inputs.package }}-${{ matrix.settings.target }}
path: |
packages/${{ inputs.package }}/swc*
packages/${{ inputs.package }}/*.node
Expand Down Expand Up @@ -315,7 +319,7 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: bindings-${{ matrix.settings.target }}
name: bindings-${{ inputs.package }}-${{ matrix.settings.target }}
path: ./packages/${{ inputs.package }}
- name: List packages
run: ls -R .
Expand Down Expand Up @@ -354,15 +358,15 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: bindings-x86_64-unknown-linux-gnu
name: bindings-${{ inputs.package }}-x86_64-unknown-linux-gnu
path: ./packages/${{ inputs.package }}
- name: List packages
run: ls -R .
shell: bash
- name: Build TypeScript
run: yarn build:ts
- name: Test bindings
run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim sh -c 'npm install -f -g yarn@1.22.19 && cd ./packages/${{ inputs.package }} && env DISABLE_PLUGIN_E2E_TESTS=true yarn test'
run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-slim sh -c 'npm install -f -g yarn@1.22.19 && env DISABLE_PLUGIN_E2E_TESTS=true yarn test:${{ inputs.package }}'
test-linux-x64-musl-binding:
name: Test bindings on x86_64-unknown-linux-musl - node@${{ matrix.node }}
needs:
Expand Down Expand Up @@ -394,15 +398,15 @@ jobs:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: bindings-x86_64-unknown-linux-musl
name: bindings-${{ inputs.package }}-x86_64-unknown-linux-musl
path: ./packages/${{ inputs.package }}
- name: List packages
run: ls -R .
shell: bash
- name: Build TypeScript
run: yarn build:ts
- name: Test bindings
run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine sh -c 'npm install -f -g yarn@1.22.19 && cd ./packages/${{ inputs.package }} && env DISABLE_PLUGIN_E2E_TESTS=true yarn test'
run: docker run --rm -v $(pwd):/swc -w /swc node:${{ matrix.node }}-alpine sh -c 'npm install -f -g yarn@1.22.19 && env DISABLE_PLUGIN_E2E_TESTS=true yarn test:${{ inputs.package }}'
# test-linux-aarch64-musl-binding:
# name: Test bindings on aarch64-unknown-linux-musl - node@lts
# needs:
Expand All @@ -417,7 +421,7 @@ jobs:
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: bindings-aarch64-unknown-linux-musl
# name: bindings-${{ inputs.package }}-aarch64-unknown-linux-musl
# path: ./packages/${{ inputs.package }}
# - name: List packages
# run: ls -R .
Expand Down Expand Up @@ -465,7 +469,7 @@ jobs:
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: bindings-armv7-unknown-linux-gnueabihf
# name: bindings-${{ inputs.package }}-armv7-unknown-linux-gnueabihf
# path: ./packages/${{ inputs.package }}
# - name: List packages
# run: ls -R .
Expand Down Expand Up @@ -520,16 +524,16 @@ jobs:
run: corepack enable && yarn install

- name: Download all artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
pattern: "bindings-${{ inputs.package }}-*"
path: ./packages/${{ inputs.package }}/artifacts

- name: List binaries
run: ls -R ./packages/${{ inputs.package }}/artifacts
shell: bash

- name: Move binaries
if: inputs.package == 'core'
shell: bash
working-directory: ./packages/${{ inputs.package }}
run: |
Expand Down Expand Up @@ -559,7 +563,7 @@ jobs:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Upload CLI binaries to gh release
if: ${{ !inputs.skipPublishing }}
if: ${{ !inputs.skipPublishing && inputs.package == 'core' }}
shell: bash
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
47 changes: 15 additions & 32 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,27 @@

- **(html)** Fix html binding ([eefae1c](https://github.com/swc-project/swc/commit/eefae1cde794b28b68e5c0af2d2f13a5053b7a49))

### Features



- **(bindings/html)** Allow using `lightningcss` as minfiier ([#9462](https://github.com/swc-project/swc/issues/9462)) ([74d6478](https://github.com/swc-project/swc/commit/74d6478be1eb8cdf1df096c360c159db64b64d8a))

### Miscellaneous Tasks



- **(html)** Use `binding_html_node` instead of `html_node` ([bdea5cb](https://github.com/swc-project/swc/commit/bdea5cb94cf7cc9d02274f32e104b55f977e625d))


- **(html)** Fix publish action ([f30fd4f](https://github.com/swc-project/swc/commit/f30fd4fe42764ee29031ce4c0c038c1c95235482))

### Performance



- **(visit)** Add linear AST traversal ([#9452](https://github.com/swc-project/swc/issues/9452)) ([911d4ea](https://github.com/swc-project/swc/commit/911d4eaa146ff493636308a3cebd8b21d941bfde))

## [1.7.14] - 2024-08-19

### Bug Fixes
Expand Down Expand Up @@ -1279,36 +1294,4 @@

- **(visit)** Improve `Map` implementation for `Box` ([#8819](https://github.com/swc-project/swc/issues/8819)) ([dc04657](https://github.com/swc-project/swc/commit/dc046572def13a3eb625520c5a8bfd651b86f3a3))

## [1.4.12] - 2024-04-04

### Bug Fixes



- **(common)** Fix source index for `inputSourceMap` ([#8800](https://github.com/swc-project/swc/issues/8800)) ([4f9ab81](https://github.com/swc-project/swc/commit/4f9ab8151dad9984c81c72eb10c2afe5313a7591))


- **(es)** Change default value of `inputSourceMap` to `true` ([#8801](https://github.com/swc-project/swc/issues/8801)) ([9ffcd18](https://github.com/swc-project/swc/commit/9ffcd1823c0abdc741f654b8e1e330cdc06769a1))


- **(es/minifier)** Abort fn inliner if there's a spread arg ([#8809](https://github.com/swc-project/swc/issues/8809)) ([730ded2](https://github.com/swc-project/swc/commit/730ded2a26f63f0069dea0d3bc207bb31f344444))

### Features



- **(es/minifier)** Evaluate spread of arrays ([#8811](https://github.com/swc-project/swc/issues/8811)) ([47714c5](https://github.com/swc-project/swc/commit/47714c52ce08b0e94617d17c11c8e8994c62dbaa))

### Miscellaneous Tasks



- **(deps)** Update dependencies ([#8810](https://github.com/swc-project/swc/issues/8810)) ([207582f](https://github.com/swc-project/swc/commit/207582ff254a66a9dd4613de6d3cb43c19957b68))

### Performance



- **(atoms)** Update `hstr` ([#8799](https://github.com/swc-project/swc/issues/8799)) ([0745624](https://github.com/swc-project/swc/commit/0745624cb71e12b18b06d9ee106066d8b585c4c6))

<!-- generated by git-cliff -->
10 changes: 5 additions & 5 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 36 additions & 14 deletions bindings/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion bindings/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ resolver = "2"
swc_common = "0.37.4"
swc_compiler_base = "0.18.1"
swc_config = "0.1.15"
swc_core = "0.101.3"
swc_core = "0.101.4"
swc_css_ast = "0.144.0"
swc_css_codegen = "0.155.0"
swc_css_minifier = "0.120.0"
Expand Down
Loading

0 comments on commit 717bec5

Please # to comment.