Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
rust-audit:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
Expand All @@ -23,7 +23,7 @@ jobs:
manifest-path: "deps/swc/bindings/binding_typescript_wasm/Cargo.toml"

typescript-audit:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
permissions:
security-events: write
packages: read
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/build-swc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
- 'tools/*'
- 'deps/*'

env:
NODE_VERSION: lts/*

jobs:
build-swc:
runs-on: ubuntu-latest
Expand All @@ -18,6 +15,8 @@ jobs:

- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: '.nvmrc'

- name: Set up Docker
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/update-swc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ on:
schedule:
- cron: '0 0 * * 1' # Every Monday at 00:00 UTC

env:
NODE_VERSION: lts/*

jobs:
update-swc:
runs-on: ubuntu-latest
Expand All @@ -26,6 +23,8 @@ jobs:

- name: Set up Node.js
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
with:
node-version-file: '.nvmrc'

- name: Check if SWC update is required
id: version-check
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ It is possible to use Amaro as an external loader to execute TypeScript files.
This allows the installed Amaro to override the Amaro version used by Node.js.
In order to use Amaro as an external loader, type stripping needs to be enabled.

In node v23 and later you can omit the `--experimental-strip-types` flag, as it is enabled by default.

```bash
node --experimental-strip-types --import="amaro/strip" file.ts
node --import="amaro/strip" file.ts
```

> In node v22.18.0 and later you can omit the `--experimental-strip-types` flag, as it is enabled by default.

Enabling TypeScript feature transformation:

```bash
Expand Down
8 changes: 0 additions & 8 deletions test/loader.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ const { match, doesNotMatch, strictEqual } = require("node:assert");

test("should work as a loader", async () => {
const result = await spawnPromisified(process.execPath, [
"--experimental-strip-types",
"--no-warnings",
"--import=./dist/register-strip.mjs",
fixturesPath("hello.ts"),
Expand All @@ -17,7 +16,6 @@ test("should work as a loader", async () => {

test("should not work with enums", async (t) => {
const result = await spawnPromisified(process.execPath, [
"--experimental-strip-types",
"--no-warnings",
"--import=./dist/register-strip.mjs",
fixturesPath("enum.ts"),
Expand All @@ -31,7 +29,6 @@ test("should not work with enums", async (t) => {

test("should work with enums", async () => {
const result = await spawnPromisified(process.execPath, [
"--experimental-strip-types",
"--no-warnings",
"--import=./dist/register-transform.mjs",
fixturesPath("enum.ts"),
Expand All @@ -44,7 +41,6 @@ test("should work with enums", async () => {

test("should warn and inaccurate stracktrace", async () => {
const result = await spawnPromisified(process.execPath, [
"--experimental-strip-types",
"--import=./dist/register-transform.mjs",
fixturesPath("stacktrace.ts"),
]);
Expand All @@ -57,7 +53,6 @@ test("should warn and inaccurate stracktrace", async () => {

test("should not warn and accurate stracktrace", async () => {
const result = await spawnPromisified(process.execPath, [
"--experimental-strip-types",
"--enable-source-maps",
"--import=./dist/register-transform.mjs",
fixturesPath("stacktrace.ts"),
Expand All @@ -71,7 +66,6 @@ test("should not warn and accurate stracktrace", async () => {

test("should call nextLoader for non-typescript files for striping", async () => {
const result = await spawnPromisified(process.execPath, [
"--experimental-strip-types",
"--no-warnings",
"--import=./dist/register-strip.mjs",
fixturesPath("hello.js"),
Expand All @@ -84,7 +78,6 @@ test("should call nextLoader for non-typescript files for striping", async () =>

test("should call nextLoader for non-typescript files for transform", async () => {
const result = await spawnPromisified(process.execPath, [
"--experimental-strip-types",
"--no-warnings",
"--import=./dist/register-transform.mjs",
fixturesPath("hello.js"),
Expand All @@ -97,7 +90,6 @@ test("should call nextLoader for non-typescript files for transform", async () =

test("should throw syntax error for invalid typescript", async (t) => {
const result = await spawnPromisified(process.execPath, [
"--experimental-strip-types",
"--no-warnings",
"--import=./dist/register-strip.mjs",
fixturesPath("invalid-syntax.ts"),
Expand Down
Loading