Skip to content

Commit

Permalink
chore: bump swc-core to 0.90.35 (#91)
Browse files Browse the repository at this point in the history
  • Loading branch information
timofei-iatsenko authored Apr 18, 2024
1 parent f2aab8d commit 8aed142
Show file tree
Hide file tree
Showing 20 changed files with 315 additions and 255 deletions.
272 changes: 159 additions & 113 deletions Cargo.lock

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ serde = "1"
serde_json = "1.0.95"
regex = "1.7.3"
once_cell = "1.17.1"
swc_common = "=0.33.15"
swc_core = { version = "0.87.28", features = [
swc_core = { version = "0.90.35", features = [
"ecma_plugin_transform",
"ecma_utils",
"ecma_visit",
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,8 @@ So you need to select an appropriate version of the plugin to match compatible `
| `4.0.3` | `0.78.28` | `@swc/[email protected]` ~ `@swc/[email protected]` <br/> `[email protected] ~ [email protected]` |
| `4.0.4` | `0.79.x` | `@swc/[email protected]` ~ `@swc/[email protected]` <br/> `[email protected]` ~ |
| `4.0.5` | `0.87.x` | broken due incorrect version of `swc_common` |
| `4.0.6` | `0.87.x` | `@swc/[email protected] ~ @swc/[email protected]` <br /> `~ [email protected]` |
| `4.0.6` | `0.87.x` | `@swc/[email protected] ~ @swc/[email protected]` <br /> `~ [email protected]` |
| `4.0.7` | `0.90.35` | `@swc/[email protected] ~` <br /> `[email protected] ~` <br /> `@rspack/[email protected] ~` |

This table may become outdated. If you don't see a particular version of `@swc/core` or `next` check the compatibility by referring to the upstream's [Selecting the version](https://swc.rs/docs/plugin/selecting-swc-core) article.
This will help you select the appropriate plugin version for your project.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
const path = require('node:path');

const plugin = process.env.USE_LOCAL_PLUGIN_BINARY
? path.join(__dirname, '../../target/wasm32-wasi/release/lingui_macro_plugin.wasm')
: '@lingui/swc-plugin';


/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
Expand All @@ -7,7 +14,7 @@ const nextConfig = {
},
experimental: {
swcPlugins: [
['@lingui/swc-plugin', {}],
[plugin, {}],
],
},
};
Expand Down
15 changes: 8 additions & 7 deletions examples/nextjs-13/package.json → examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,29 @@
"private": true,
"scripts": {
"dev": "next dev",
"dev:local-binary": "USE_LOCAL_PLUGIN_BINARY=true next dev",
"build": "next build",
"build:local-binary": "USE_LOCAL_PLUGIN_BINARY=true next build",
"start": "next start",
"lint": "next lint",
"lingui:extract": "lingui extract"
},
"dependencies": {
"@lingui/core": "^4.7.0",
"@lingui/react": "^4.7.0",
"@next/font": "14.1.0",
"@lingui/core": "^4.10.0",
"@lingui/react": "^4.10.0",
"@types/node": "18.11.18",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.10",
"make-plural": "^7.2.0",
"next": "14.1.0",
"next": "14.2.2",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
},
"devDependencies": {
"@lingui/cli": "^4.7.0",
"@lingui/loader": "^4.7.0",
"@lingui/macro": "^4.7.0",
"@lingui/cli": "^4.10.0",
"@lingui/loader": "^4.10.0",
"@lingui/macro": "^4.10.0",
"@lingui/swc-plugin": "4.0.6"
}
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
264 changes: 135 additions & 129 deletions examples/nextjs-13/yarn.lock → examples/nextjs/yarn.lock

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"prepublishOnly": "cargo build-wasi --release"
},
"files": [],
"packageManager": "[email protected]",
"peerDependencies": {
"@lingui/macro": "4"
},
Expand Down
1 change: 1 addition & 0 deletions src/ast_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,5 +164,6 @@ pub fn create_import(source: JsWord, specifier: Ident) -> ModuleItem {
}),
with: None,
type_only: false,
phase: Default::default(),
}))
}
2 changes: 1 addition & 1 deletion src/tests/jsx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ to!(

r#"
import { Trans } from "@lingui/react";
<Trans message={"<0>This should work \xa0</0>"} id={"K/1Xpr"}
<Trans message={"<0>This should work  </0>"} id={"K/1Xpr"}
components={{
0: <Text />,
}}
Expand Down

0 comments on commit 8aed142

Please sign in to comment.