Skip to content

Commit ccb76f7

Browse files
authored
Merge pull request #37 from effector/release/v1
SWC Plugin v1
2 parents 3669080 + 7208b2c commit ccb76f7

18 files changed

Lines changed: 526 additions & 809 deletions

CHANGELOG.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,45 @@
11
# @effector/swc-plugin
22

3+
## 1.0.0
4+
5+
This is the first stable release of `@effector/swc-plugin`. The plugin now supports stable Plugin ABI and fully supports `@swc/core@^1.15.0` and Next.js v16.1+.
6+
7+
### Major Changes
8+
9+
- ffcab40: Remove support for multi-label publishing
10+
11+
### Minor Changes
12+
13+
- d13af2f: Support `swc_core@47` (stable Plugin ABI)
14+
15+
### Patch Changes
16+
17+
- 9834f76: Bump to `swc_core@55`
18+
- 6fb24b3: Bump dependencies up to `swc_core@52` & toolchain to `nightly-2025-12-23`
19+
- 5ef2f76: Bump toolchain to `nightly-2025-11-08`
20+
21+
## 1.0.0-next.1
22+
23+
### Patch Changes
24+
25+
- 6fb24b3: Bump dependencies up to `swc_core@52` & toolchain to `nightly-2025-12-23`
26+
27+
## 1.0.0-next.0
28+
29+
The Wasm ABI for plugins have been [announced](https://blog.swc.rs/2025-11-4-wasm-backward-compatibility) to now be backward compatible. This release prepares the plugin for its first major version by getting rid of multi-label system for supporting several `@swc/core` versions.
30+
31+
### Major Changes
32+
33+
- ffcab40: Remove support for multi-label publishing
34+
35+
### Minor Changes
36+
37+
- d13af2f: Support `swc_core@47` (stable Plugin ABI)
38+
39+
### Patch Changes
40+
41+
- 5ef2f76: Bump toolchain to `nightly-2025-11-08`
42+
343
## 0.8.1
444

545
### Patch Changes

CONTRIBUTING.md

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,37 @@
11
# Contributing to @effector/swc-plugin
22

3-
## Developing plugin
3+
## Development
44

5-
The plugin is built to support both _latest_ `swc_core`, with some features to support older SWC versions.
5+
This plugin supports `swc_core@49.0.0+` and `@swc/core@1.15.0+` with stable Plugin ABI and targets the _latest_ version available. Breaking changes in Plugin ABI by SWC require a major version bump.
66

7-
Usually, the development is done using the base plugin, targeting the latest AST version, and the latest _Nightly_ Rust version.
7+
### Making Changes
88

9-
### Changelog
9+
Changelog is managed with `@changesets/cli`. When making changes to the plugin code document them briefly using `pnpm changeset` before committing.
1010

11-
Changelog is managed with `changeset`, and each change to the plugin's core must be logged using `pnpm changeset`.
11+
### Testing
1212

13-
### Tests
13+
#### Fixtures
1414

15-
Currently, the plugin is tested in two ways
15+
Plugin Transform is run against a set of JS code samples (located at `tests/fixtures`) directly. Run manually with `cargo test`.
1616

17-
- **Fixture tests** located in `src/tests/fixtures`.
17+
#### Integration
1818

19-
The plugin transforms are run directly on samples of JS code. These tests are run during packing process to ensure plugin is functionally working.
19+
Pre-built `wasm` file with the plugin is loaded into different _host runtimes_ (usually Next.js), and several Playwright-based end-to-end tests are run. These tests are managed manually and should be run after packing to ensure the plugin is compatible with supported host runtimes.
2020

21-
You can run them manually on base plugin with `cargo test`.
21+
## Releasing
2222

23-
- **Integration tests**, run using Playwright.
23+
### 1. Version Bump
2424

25-
Pre-built `wasm` files are loaded into different _host runtimes_, e.g. Next.js. These tests are run manually after packing to ensure published labels are compatible with host runtimes.
25+
1. Run `pnpm changeset version`
26+
2. Update `CHANGELOG.md` with notable changes
27+
3. Sync version from `package.json` -> to `Cargo.toml`
28+
4. Run fixture tests with `cargo test`
29+
5. Commit as `release: v{version}` and git tag with `v{version}`
2630

27-
## Release process
31+
### 2. Build
2832

29-
1. **Bump packages versions**
30-
1. Run `pnpm changeset version` to generate `CHANGELOG.md` and bump `package.json` version.
31-
2. Update `CHANGELOG.md` with additional details, e.g. notable/breaking changes.
32-
3. Manually update the `package.version` field in `Cargo.toml` to match `package.json`.
33-
4. Check the base plugin using `cargo test`.
34-
5. Make a release commit `release: v{version}`.
35-
6. Tag the release with new git tag `v{version}`.
36-
2. **Build packages**
37-
1. Run build script with `pnpm build --test --build`.
38-
2. Verify that `target/bundles` contains several tarballs named in form `effector-swc-plugin-{version}-swc{tag}.tgz`.
39-
3. **Publish**
40-
1. For each labeled tarball, run `npm publish target/bundles/effector-swc-plugin-{version}-swc{tag}.tgz --tag swc{tag}`.
41-
2. For the _latest_, non-labeled tarball, run `npm publish target/bundles/effector-swc-plugin-{version}.tgz`.
33+
Build a tarball `cargo make bundle` -> `target/bundle/effector-swc-plugin-{version}.tgz`
34+
35+
### 3. Publish
36+
37+
Run `npm publish target/bundle/effector-swc-plugin-{version}.tgz`

0 commit comments

Comments
 (0)