@tramvai/swc-integration 2.109.1 → 2.111.0

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/README.md CHANGED
@@ -44,6 +44,7 @@ Refer to docs of [`@tramvai/cli`](references/cli/experiments.md#transpilation)
44
44
 
45
45
  - To run all tests for all plugins run `cargo test` from the swc folder
46
46
  - To run tests for single plugin either run `cargo test` from plugin directory or run `cargo test <plugin_name>`
47
+ - To update snapshots in tests run tests with `UPDATE` env i.e. `UPDATE=1 cargo test`
47
48
 
48
49
  ### Formatting
49
50
 
@@ -63,5 +64,15 @@ Refer to docs of [`@tramvai/cli`](references/cli/experiments.md#transpilation)
63
64
  1. Make changes to the source code
64
65
  2. Make sure the tests are passing with `cargo test`
65
66
  3. Commit a release version of swc plugins, you can do it either:
66
- - by building it locally with command `cargo build-wasi --release`. But this requires specific os and rust versions, and therefore should be done inside docker container, using image `rust:1.65.0`
67
+ - by building it locally with command `cargo build-wasi --release`. But this requires specific os and rust versions, and therefore should be done inside docker container, using image `rust:1.70.0`
67
68
  - pushing your code changes and creating merge request. Merge request will fail because it'll detect changes in built files but it'll provide these built files through gitlab artifacts for job `swc-integration build check`. You can download this artifact and commit files from it to your branch.
69
+
70
+ #### Upgrade swc version
71
+
72
+ Rust crate `swc_core` and npm package `@swc/core` must be in sync to be able to work properly.
73
+
74
+ To update either rust swc dependencies or npm swc dependencies:
75
+
76
+ 1. Pick the required version of core swc dependency from either side
77
+ 2. Follow the [docs](https://swc.rs/docs/plugin/selecting-swc-core) to pick up right counterpart version
78
+ 3. Upgrade to both versions (they should be strict even by patch version) and rebuild wasm plugins
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tramvai/swc-integration",
3
- "version": "2.109.1",
3
+ "version": "2.111.0",
4
4
  "description": "Tramvai integration with swc toolset",
5
5
  "files": [
6
6
  "target/wasm32-wasi/release/*.wasm"
@@ -12,9 +12,9 @@
12
12
  },
13
13
  "scripts": {},
14
14
  "dependencies": {
15
- "@swc/core": "^1.3.36",
16
- "@swc/helpers": "^0.4.14",
17
- "swc-loader": "^0.2.3"
15
+ "@swc/core": "1.3.62",
16
+ "@swc/helpers": "0.5.1",
17
+ "swc-loader": "0.2.3"
18
18
  },
19
19
  "peerDependencies": {},
20
20
  "license": "Apache-2.0"