Skip to content

Releases: swc-project/swc-node

@swc-node/[email protected]

10 Feb 18:41
@swc-node/[email protected]
75d423f
Compare
Choose a tag to compare

Experimental esm support

node --loader=@swc-node/register/esm ./src/index.ts in this project

src/index.ts

import assert from 'node:assert'
import test from 'node:test'

import { supportedExtensions } from 'file-type' // pure esm project

await test('file-type should work', () => {
  assert.ok(supportedExtensions.has('jpg'))
})

tsconfig.json

{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
  }
}

package.json

{
  "type": "module"
}

output

> node --loader=@swc-node/register/esm ./src/index.ts

(node:77682) ExperimentalWarning: Custom ESM Loaders is an experimental feature. This feature could change at any time
(Use `node --trace-warnings ...` to show where the warning was created)
(node:77682) ExperimentalWarning: The test runner is an experimental feature. This feature could change at any time
TAP version 13
# Subtest: file-type should work
ok 1 - file-type should work
  ---
  duration_ms: 0.642416
  ...
1..1
# tests 1
# pass 1
# fail 0
# cancelled 0
# skipped 0
# todo 0
# duration_ms 5.702292

What's Changed

Full Changelog: https://github.com/swc-project/swc-node/compare/@swc-node/[email protected]...@swc-node/[email protected]

@swc-node/[email protected]

10 Feb 17:18
@swc-node/[email protected]
593ee50
Compare
Choose a tag to compare

1.5.8 (2023-02-10)

Bug Fixes

@swc-node/[email protected]

10 Feb 17:18
@swc-node/[email protected]
593ee50
Compare
Choose a tag to compare

1.2.8 (2023-02-10)

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

@swc-node/[email protected]

10 Feb 17:18
@swc-node/[email protected]
593ee50
Compare
Choose a tag to compare

1.5.9 (2023-02-10)

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

@swc-node/[email protected]

07 Feb 07:47
@swc-node/[email protected]
18396eb
Compare
Choose a tag to compare

0.2.4 (2023-02-07)

Note: Version bump only for package @swc-node/sourcemap-support

@swc-node/[email protected]

07 Feb 12:42
@swc-node/[email protected]
06d4802
Compare
Choose a tag to compare

1.5.7 (2023-02-07)

Bug Fixes

  • register: align externalHelpers with tsconfig.importHelpers (2f3e155)

@swc-node/[email protected]

07 Feb 07:47
@swc-node/[email protected]
18396eb
Compare
Choose a tag to compare

1.5.6 (2023-02-07)

Bug Fixes

  • register: always inline swc helpers (1d557ec)
  • register: react configuration (af643b8)

@swc-node/[email protected]

07 Feb 12:42
@swc-node/[email protected]
06d4802
Compare
Choose a tag to compare

1.2.7 (2023-02-07)

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

@swc-node/[email protected]

07 Feb 07:47
@swc-node/[email protected]
18396eb
Compare
Choose a tag to compare

1.2.6 (2023-02-07)

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

@swc-node/[email protected]

07 Feb 12:42
@swc-node/[email protected]
06d4802
Compare
Choose a tag to compare

1.5.8 (2023-02-07)

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