Skip to content

Commit

Permalink
Merge branch 'main' into next
Browse files Browse the repository at this point in the history
# Conflicts:
#	Cargo.lock
#	Cargo.toml
  • Loading branch information
timofei-iatsenko committed Apr 18, 2024
2 parents d00c6a7 + 66bd99c commit 174d53e
Show file tree
Hide file tree
Showing 18 changed files with 561 additions and 444 deletions.
707 changes: 405 additions & 302 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lingui_macro_plugin"
version = "4.0.6"
version = "4.0.7"
edition = "2021"

[lib]
Expand All @@ -22,7 +22,7 @@ serde = "1"
serde_json = "1.0.95"
regex = "1.7.3"
once_cell = "1.17.1"
swc_core = { version = "0.90.3", 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.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@lingui/swc-plugin",
"version": "4.0.6",
"version": "4.0.7",
"description": "A SWC Plugin for LinguiJS",
"author": {
"name": "Timofei Iatsenko",
Expand Down Expand Up @@ -28,7 +28,6 @@
"prepublishOnly": "cargo build-wasi --release"
},
"files": [],
"packageManager": "[email protected]",
"peerDependencies": {
"@lingui/macro": "4"
},
Expand Down

0 comments on commit 174d53e

Please sign in to comment.