Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: swc-project/swc-node
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: @swc-node/jest@1.8.12
Choose a base ref
...
head repository: swc-project/swc-node
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: @swc-node/jest@1.8.13
Choose a head ref

Commits on Jul 22, 2024

  1. Copy the full SHA
    f962f8d View commit details
  2. Copy the full SHA
    25e6879 View commit details

Commits on Jul 25, 2024

  1. chore(deps): update dependency lerna to v8.1.7 (#826)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jul 25, 2024
    Copy the full SHA
    99bbcc1 View commit details

Commits on Jul 29, 2024

  1. Copy the full SHA
    e0a9fe6 View commit details

Commits on Aug 5, 2024

  1. Copy the full SHA
    1094d3f View commit details

Commits on Aug 6, 2024

  1. Copy the full SHA
    084b651 View commit details
  2. Copy the full SHA
    e78df16 View commit details

Commits on Aug 7, 2024

  1. Copy the full SHA
    8bb65e9 View commit details

Commits on Aug 12, 2024

  1. Copy the full SHA
    75ccc7e View commit details

Commits on Aug 13, 2024

  1. fix(register/esm): pass file urls as paths (#840)

    compile() expects a filename, not a url: it passes the
    value directly to the bindings module, which immediately
    parses it as a `Path` unconditionally.
    
    This causes input file source maps to fail to load, as it
    attempts to find the URL as if it were a file on disk.
    (see swc-project/swc#9422)
    
    This is a targeted fix which hopefully minimizes the chance of things breaking.
    simonbuchan authored Aug 13, 2024
    Copy the full SHA
    27d922d View commit details

Commits on Aug 15, 2024

  1. Copy the full SHA
    2c5c4a4 View commit details

Commits on Aug 19, 2024

  1. Copy the full SHA
    484d2a4 View commit details
  2. chore(deps): lock file maintenance (#845)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Aug 19, 2024
    Copy the full SHA
    e7fc08f View commit details

Commits on Aug 24, 2024

  1. chore(deps): update dependency oxlint to ^0.8.0 (#849)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Aug 24, 2024
    Copy the full SHA
    6f162b4 View commit details

Commits on Oct 24, 2024

  1. Copy the full SHA
    70a3ce4 View commit details
  2. Copy the full SHA
    3e04cff View commit details
  3. chore(deps): update dependency webpack to v5.94.0 [security] (#860)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 24, 2024
    Copy the full SHA
    05aa59b View commit details
  4. chore(deps): update dependency oxlint to ^0.10.0 (#854)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 24, 2024
    Copy the full SHA
    8cdf971 View commit details
  5. chore(deps): update dependency esbuild to ^0.24.0 (#856)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 24, 2024
    Copy the full SHA
    d34e00f View commit details
  6. chore(deps): lock file maintenance (#853)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 24, 2024
    Copy the full SHA
    0f1b45f View commit details
  7. chore(deps): update dependency sinon to v19 (#855)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 24, 2024
    Copy the full SHA
    f0e4135 View commit details
  8. fix(deps): update dependency oxc-resolver to v2 (#858)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 24, 2024
    Copy the full SHA
    fca85bd View commit details

Commits on Oct 28, 2024

  1. chore(deps): update pnpm to v9.12.3 (#863)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 28, 2024
    Copy the full SHA
    18d0e79 View commit details
  2. chore(deps): lock file maintenance (#862)

    * chore(deps): lock file maintenance
    
    * Update test fixture
    
    ---------
    
    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    Co-authored-by: LongYinan <lynweklm@gmail.com>
    renovate[bot] and Brooooooklyn authored Oct 28, 2024
    Copy the full SHA
    488031a View commit details

Commits on Oct 29, 2024

  1. chore(deps): update dependency @types/node to v22 (#864)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Oct 29, 2024
    Copy the full SHA
    3ccbaeb View commit details

Commits on Oct 31, 2024

  1. Copy the full SHA
    bfc5d0f View commit details

Commits on Nov 5, 2024

  1. chore(deps): update dependency oxlint to ^0.11.0 (#867)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2024
    Copy the full SHA
    51aabbc View commit details
  2. chore(deps): lock file maintenance (#868)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 5, 2024
    Copy the full SHA
    82aa094 View commit details

Commits on Nov 14, 2024

  1. chore(deps): update pnpm to v9.13.0 (#871)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 14, 2024
    Copy the full SHA
    06b6a82 View commit details

Commits on Nov 15, 2024

  1. Copy the full SHA
    1448019 View commit details
  2. chore(deps): update pnpm to v9.13.2 (#873)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 15, 2024
    Copy the full SHA
    1ade704 View commit details

Commits on Nov 20, 2024

  1. Copy the full SHA
    de68ff0 View commit details
  2. Copy the full SHA
    0749446 View commit details
  3. chore(deps): update pnpm to v9.14.2 (#876)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 20, 2024
    Copy the full SHA
    c3e879d View commit details
  4. chore(deps): lock file maintenance (#869)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 20, 2024
    Copy the full SHA
    c63beac View commit details

Commits on Nov 22, 2024

  1. chore(deps): update dependency oxlint to ^0.13.0 (#877)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 22, 2024
    Copy the full SHA
    1b5c546 View commit details

Commits on Nov 29, 2024

  1. chore(deps): update pnpm to v9.14.3 (#879)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Nov 29, 2024
    Copy the full SHA
    0fdb4db View commit details

Commits on Nov 30, 2024

  1. Copy the full SHA
    dea9bc1 View commit details

Commits on Dec 1, 2024

  1. Copy the full SHA
    7b845f7 View commit details

Commits on Dec 6, 2024

  1. chore(deps): update react monorepo to v19 (#884)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Dec 6, 2024
    Copy the full SHA
    976da9a View commit details

Commits on Dec 7, 2024

  1. Copy the full SHA
    396e829 View commit details

Commits on Dec 11, 2024

  1. Copy the full SHA
    d06d3ed View commit details

Commits on Dec 12, 2024

  1. Copy the full SHA
    ff409a7 View commit details

Commits on Dec 20, 2024

  1. Copy the full SHA
    64d568b View commit details

Commits on Jan 1, 2025

  1. Copy the full SHA
    15c4b07 View commit details

Commits on Jan 7, 2025

  1. Copy the full SHA
    1f9e288 View commit details

Commits on Jan 14, 2025

  1. chore(deps): update pnpm to v9.15.4 (#892)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Jan 14, 2025
    Copy the full SHA
    6cdcf2c View commit details

Commits on Feb 24, 2025

  1. fix(register): Windows path (#906)

    For windows users for some reason in some import relative "./importname" the files inside the join was resulting in ".file:..." Generating error, so I just moved the file:// out of the path, ensuring that it would look correctly and work on Windows
    drylian authored Feb 24, 2025
    Copy the full SHA
    406a3d8 View commit details

Commits on Feb 25, 2025

  1. chore(deps): update dependency lerna to v8.2.0 (#905)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Feb 25, 2025
    Copy the full SHA
    e6cd8b8 View commit details

Commits on Mar 4, 2025

  1. chore(deps): update dependency lerna to v8.2.1 (#907)

    Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
    renovate[bot] authored Mar 4, 2025
    Copy the full SHA
    279da26 View commit details
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -46,23 +46,23 @@
"@types/babel__core": "^7.20.5",
"@types/benchmark": "^2.1.5",
"@types/lodash": "^4.17.6",
"@types/node": "^20.14.9",
"@types/node": "^22.0.0",
"@types/sinon": "^17.0.3",
"ava": "^6.1.3",
"benchmark": "^2.1.4",
"colorette": "^2.0.20",
"cross-env": "^7.0.3",
"esbuild": "^0.23.0",
"esbuild": "^0.25.0",
"husky": "^9.0.11",
"jest": "^29.7.0",
"lerna": "8.1.4",
"lerna": "8.2.1",
"lint-staged": "^15.2.7",
"lodash": "^4.17.21",
"oxlint": "^0.6.0",
"oxlint": "^0.15.0",
"prettier": "^3.3.2",
"react": "^18.3.1",
"react": "^19.0.0",
"rxjs": "^7.8.1",
"sinon": "^18.0.0",
"sinon": "^19.0.0",
"tslib": "^2.6.3",
"typescript": "^5.5.3"
},
@@ -98,5 +98,5 @@
"SWC_NODE_PROJECT": "./tsconfig.test.json"
}
},
"packageManager": "pnpm@9.5.0"
"packageManager": "pnpm@10.6.2"
}
10 changes: 5 additions & 5 deletions packages/integrate-module/package.json
Original file line number Diff line number Diff line change
@@ -4,20 +4,20 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"file-type": "^19.0.0",
"file-type": "^20.0.0",
"p-timeout": "^6.1.2"
},
"devDependencies": {
"@napi-rs/simple-git": "^0.1.16",
"@swc/core": "^1.6.6",
"@swc-node/register": "workspace:*",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"esmock": "^2.6.6",
"ipaddr.js": "^2.2.0",
"postgres": "^3.4.4",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"simple-git": "^3.25.0",
"typescript": "^5.5.3"
}
Original file line number Diff line number Diff line change
@@ -10,11 +10,10 @@ Generated by [AVA](https://avajs.dev).
`Error: ␊
at /packages/integrate/__tests__/sourcemaps/sourcemaps.spec.ts:18:26␊
at Test.callFn (file:///node_modules/.pnpm/ava@6.1.3_encoding@0.1.13/node_modules/ava/lib/test.js:525:26)␊
at Test.run (file:///node_modules/.pnpm/ava@6.1.3_encoding@0.1.13/node_modules/ava/lib/test.js:534:33)␊
at Runner.runSingle (file:///node_modules/.pnpm/ava@6.1.3_encoding@0.1.13/node_modules/ava/lib/runner.js:281:33)␊
at Runner.runTest (file:///node_modules/.pnpm/ava@6.1.3_encoding@0.1.13/node_modules/ava/lib/runner.js:363:30)␊
at processTicksAndRejections (node:internal/process/task_queues:95:5)␊
at Test.callFn (file:///node_modules/.pnpm/ava@6.2.0_encoding@0.1.13/node_modules/ava/lib/test.js:525:26)␊
at Test.run (file:///node_modules/.pnpm/ava@6.2.0_encoding@0.1.13/node_modules/ava/lib/test.js:534:33)␊
at Runner.runSingle (file:///node_modules/.pnpm/ava@6.2.0_encoding@0.1.13/node_modules/ava/lib/runner.js:281:33)␊
at Runner.runTest (file:///node_modules/.pnpm/ava@6.2.0_encoding@0.1.13/node_modules/ava/lib/runner.js:363:30)␊
at async Promise.all (index 0)␊
at file:///node_modules/.pnpm/ava@6.1.3_encoding@0.1.13/node_modules/ava/lib/runner.js:528:21␊
at Runner.start (file:///node_modules/.pnpm/ava@6.1.3_encoding@0.1.13/node_modules/ava/lib/runner.js:536:15)`
at file:///node_modules/.pnpm/ava@6.2.0_encoding@0.1.13/node_modules/ava/lib/runner.js:528:21␊
at Runner.start (file:///node_modules/.pnpm/ava@6.2.0_encoding@0.1.13/node_modules/ava/lib/runner.js:536:15)`
Binary file not shown.
1 change: 1 addition & 0 deletions packages/integrate/__tests__/sourcemaps/sourcemaps.spec.ts
Original file line number Diff line number Diff line change
@@ -30,6 +30,7 @@ test('should work with sourcemaps', (t) => {
new Error().stack
?.split('\n')
.map((l) => l.replace(projectRoot, ''))
.filter((n) => !n.includes('node:internal'))
.join('\n'),
)
})
10 changes: 5 additions & 5 deletions packages/integrate/package.json
Original file line number Diff line number Diff line change
@@ -23,12 +23,12 @@
"@swc-node/core": "^1.13.1",
"@swc-node/register": "workspace:*",
"@types/jest": "^29.5.12",
"@types/react": "^18.3.3",
"@types/react-dom": "^18.3.0",
"@types/react": "^19.0.0",
"@types/react-dom": "^19.0.0",
"jest": "^29.7.0",
"react": "^18.3.1",
"react-dom": "^18.3.1",
"sinon": "^18.0.0",
"react": "^19.0.0",
"react-dom": "^19.0.0",
"sinon": "^19.0.0",
"typescript": "^5.5.3"
}
}
4 changes: 4 additions & 0 deletions packages/jest/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.8.13](https://github.com/swc-project/swc-node/compare/@swc-node/jest@1.8.12...@swc-node/jest@1.8.13) (2025-03-13)

**Note:** Version bump only for package @swc-node/jest

## [1.8.12](https://github.com/swc-project/swc-node/compare/@swc-node/jest@1.8.11...@swc-node/jest@1.8.12) (2024-07-17)

**Note:** Version bump only for package @swc-node/jest
4 changes: 2 additions & 2 deletions packages/jest/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc-node/jest",
"version": "1.8.12",
"version": "1.8.13",
"description": "swc preprocessor for jest with source map support",
"keywords": [
"swc",
@@ -29,7 +29,7 @@
"dependencies": {
"@node-rs/xxhash": "^1.7.3",
"@swc-node/core": "^1.13.3",
"@swc-node/register": "^1.10.9"
"@swc-node/register": "^1.10.10"
},
"peerDependencies": {
"@swc/core": ">= 1.4.13",
4 changes: 4 additions & 0 deletions packages/loader/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.5.13](https://github.com/swc-project/swc-node/compare/@swc-node/loader@1.5.12...@swc-node/loader@1.5.13) (2025-03-13)

**Note:** Version bump only for package @swc-node/loader

## [1.5.12](https://github.com/swc-project/swc-node/compare/@swc-node/loader@1.5.11...@swc-node/loader@1.5.12) (2024-07-17)

**Note:** Version bump only for package @swc-node/loader
4 changes: 2 additions & 2 deletions packages/loader/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc-node/loader",
"version": "1.5.12",
"version": "1.5.13",
"description": "Webpack loader powered by swc",
"keywords": [
"swc",
@@ -29,7 +29,7 @@
},
"dependencies": {
"@swc-node/core": "^1.13.3",
"@swc-node/register": "^1.10.9"
"@swc-node/register": "^1.10.10"
},
"peerDependencies": {
"typescript": ">= 4.3",
10 changes: 10 additions & 0 deletions packages/register/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [1.10.10](https://github.com/swc-project/swc-node/compare/@swc-node/register@1.10.9...@swc-node/register@1.10.10) (2025-03-13)

### Bug Fixes

- **deps:** update dependency oxc-resolver to v2 ([#858](https://github.com/swc-project/swc-node/issues/858)) ([fca85bd](https://github.com/swc-project/swc-node/commit/fca85bd1ba1705455ca8c7adb345690cb029b4d3))
- **deps:** update dependency oxc-resolver to v3 ([#887](https://github.com/swc-project/swc-node/issues/887)) ([ff409a7](https://github.com/swc-project/swc-node/commit/ff409a787a68fd2dc2a81cd8703ee5a452dbe445))
- **deps:** update dependency oxc-resolver to v5 ([#910](https://github.com/swc-project/swc-node/issues/910)) ([9bf404a](https://github.com/swc-project/swc-node/commit/9bf404a8a245e67cb57dc2cad9b40c05bea6f96e))
- **register/esm:** pass file urls as paths ([#840](https://github.com/swc-project/swc-node/issues/840)) ([27d922d](https://github.com/swc-project/swc-node/commit/27d922d64c046d48dda94733c5277171b0a358bd))
- **register:** Windows path ([#906](https://github.com/swc-project/swc-node/issues/906)) ([406a3d8](https://github.com/swc-project/swc-node/commit/406a3d886cb86dffe6626c752233012c6f853375))

## [1.10.9](https://github.com/swc-project/swc-node/compare/@swc-node/register@1.10.8...@swc-node/register@1.10.9) (2024-07-17)

### Bug Fixes
10 changes: 8 additions & 2 deletions packages/register/esm.mts
Original file line number Diff line number Diff line change
@@ -217,7 +217,7 @@ export const resolve: ResolveHook = async (specifier, context, nextResolve) => {
// local project file
if (path && isPathNotInNodeModules(path)) {
debug('resolved: typescript', specifier, path)
const url = new URL(join('file://', path))
const url = new URL('file://' + join(path))
return addShortCircuitSignal({
...context,
url: url.href,
@@ -292,7 +292,13 @@ export const load: LoadHook = async (url, context, nextLoad) => {
debug('loaded', url, resolvedFormat)

const code = !source || typeof source === 'string' ? source : Buffer.from(source).toString()
const compiled = await compile(code, url, tsconfigForSWCNode, true)

// url may be essentially an arbitrary string, but fixing the binding module, which currently
// expects a real file path, to correctly interpret this doesn't have an obvious solution,
// and would likely be a breaking change anyway. Do a best effort to give a real path
// like it expects, which at least fixes relative input sourcemap paths.
const filename = url.startsWith('file:') ? fileURLToPath(url) : url
const compiled = await compile(code, filename, tsconfigForSWCNode, true)

debug('compiled', url, resolvedFormat)

6 changes: 3 additions & 3 deletions packages/register/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@swc-node/register",
"version": "1.10.9",
"version": "1.10.10",
"description": "SWC node register",
"keywords": [
"swc",
@@ -44,7 +44,7 @@
"@swc-node/sourcemap-support": "^0.5.1",
"colorette": "^2.0.20",
"debug": "^4.3.5",
"oxc-resolver": "^1.10.2",
"oxc-resolver": "^5.0.0",
"pirates": "^4.0.6",
"tslib": "^2.6.3"
},
@@ -57,7 +57,7 @@
"@swc/helpers": "^0.5.11",
"@types/debug": "^4.1.12",
"lodash": "^4.17.21",
"sinon": "^18.0.0",
"sinon": "^19.0.0",
"typescript": "^5.5.3"
},
"funding": {
1 change: 1 addition & 0 deletions packages/register/register.ts
Original file line number Diff line number Diff line change
@@ -97,6 +97,7 @@ export function compile(
swcRegisterConfig = {
swc: {
swcrc: true,
configFile: process.env.SWC_CONFIG_FILE
},
}
} else {
Loading