Marco Ippolito
89f4b6cddb
module: remove --experimental-transform-types
...
PR-URL: https://github.com/nodejs/node/pull/61803
Refs: https://github.com/nodejs/typescript/issues/51
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2026-02-27 16:32:43 +00:00
sangwook
04c8828863
lib: fix TypeScript support check in jitless mode
...
WebAssembly is disabled when Node.js is run with --jitless. The
internal TypeScript stripper relies on WebAssembly, and previously
failed obscurely with a ReferenceError in this mode.
This commit adds an explicit check for WebAssembly support when
loading the TypeScript parser. If WebAssembly is unavailable,
it now throws a descriptive ERR_WEBASSEMBLY_NOT_SUPPORTED error.
Fixes: https://github.com/nodejs/node/issues/61353
PR-URL: https://github.com/nodejs/node/pull/61382
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2026-01-17 21:00:38 +00:00
Antoine du Hamel
5f77aebdfb
test: ensure assertions are reachable in test/es-module
...
PR-URL: https://github.com/nodejs/node/pull/60501
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-11-07 09:24:01 +01:00
Marco Ippolito
6584d5f811
module: remove experimental warning from type stripping
...
PR-URL: https://github.com/nodejs/node/pull/58643
Refs: https://github.com/nodejs/typescript/issues/24
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jordan Harband <ljharb@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2025-06-11 10:12:04 +00:00
Marco Ippolito
cee63dcf35
module: add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX
...
PR-URL: https://github.com/nodejs/node/pull/56610
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Ethan Arrowood <ethan@arrowood.dev >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2025-01-17 12:42:50 +00:00
Marco Ippolito
ba5992831b
module: unflag --experimental-strip-types
...
PR-URL: https://github.com/nodejs/node/pull/56350
Fixes: https://github.com/nodejs/typescript/issues/17
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com >
2024-12-26 18:46:06 +00:00
Marco Ippolito
c0edd30414
test: enable ts test on win arm64
...
PR-URL: https://github.com/nodejs/node/pull/56349
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
2024-12-26 07:55:27 +00:00
Marco Ippolito
56d58654ed
test: check typescript loader
...
PR-URL: https://github.com/nodejs/node/pull/54657
Refs: https://github.com/nodejs/node/issues/54645
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2024-12-23 20:34:19 +00:00
Joyee Cheung
b6c9dbe7e1
module: only emit require(esm) warning under --trace-require-module
...
require(esm) is relatively stable now and the experimental warning
has run its course - it's now more troublesome than useful.
This patch changes it to no longer emit a warning unless
`--trace-require-module` is explicitly used. The flag supports
two modes:
- `--trace-require-module=all`: emit warnings for all usages
- `--trace-require-module=no-node-modules`: emit warnings for
usages that do not come from a `node_modules` folder.
PR-URL: https://github.com/nodejs/node/pull/56194
Fixes: https://github.com/nodejs/node/issues/55417
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-12-11 15:10:33 +00:00
Geoffrey Booth
94c327c753
module: remove --experimental-default-type
...
PR-URL: https://github.com/nodejs/node/pull/56092
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2024-12-02 22:43:55 +00:00
Antoine du Hamel
f98d9c125c
process: fix process.features.typescript when Amaro is unavailable
...
PR-URL: https://github.com/nodejs/node/pull/55323
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-10-11 11:27:16 +00:00
Aviv Keller
bbdfeebd9e
process: add process.features.typescript
...
PR-URL: https://github.com/nodejs/node/pull/54295
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-10-05 07:08:11 +00:00
Kevin Toshihiro Uehara
2755551c3c
test: adding more tests for strip-types
...
PR-URL: https://github.com/nodejs/node/pull/54929
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
2024-10-02 01:23:49 +00:00
Christos Koutsiaris
fbc6fcb018
test: remove duplicated test descriptions
...
PR-URL: https://github.com/nodejs/node/pull/54140
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2024-09-27 10:05:33 +00:00
Joyee Cheung
06206af181
module: unflag --experimental-require-module
...
This unflags --experimental-require-module so require(esm) can be
used without the flag. For now, when require() actually encounters
an ESM, it will still emit an experimental warning. To opt out
of the feature, --no-experimental-require-module can be used.
There are some tests specifically testing ERR_REQUIRE_ESM. Some
of them are repurposed to test --no-experimental-require-module.
Some of them are modified to just expect loading require(esm) to
work, when it's appropriate.
PR-URL: https://github.com/nodejs/node/pull/55085
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: LiviaMedeiros <livia@cirno.name >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Filip Skokan <panva.ip@gmail.com >
Reviewed-By: Michael Dawson <midawson@redhat.com >
Reviewed-By: Richard Lau <rlau@redhat.com >
2024-09-26 14:21:37 +00:00
Marco Ippolito
bb405210c5
test_runner: support typescript module mocking
...
PR-URL: https://github.com/nodejs/node/pull/54878
Fixes: https://github.com/nodejs/node/issues/54428
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Erick Wendel <erick.workspace@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
2024-09-19 13:36:52 +00:00
Antoine du Hamel
53cdffea20
esm: throw ERR_REQUIRE_ESM instead of ERR_INTERNAL_ASSERTION
...
PR-URL: https://github.com/nodejs/node/pull/54868
Fixes: https://github.com/nodejs/node/issues/54773
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2024-09-11 21:48:02 +00:00
Marco Ippolito
e35902cddb
module: fix discrepancy between .ts and .js
...
PR-URL: https://github.com/nodejs/node/pull/54461
Fixes: https://github.com/nodejs/node/issues/54457
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
2024-08-22 08:48:33 +00:00
Marco Ippolito
5d6c76adee
module: fix strip-types interaction with detect-module
...
PR-URL: https://github.com/nodejs/node/pull/54164
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Jake Yuesong Li <jake.yuesong@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Zeyu "Alex" Yang <himself65@outlook.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
2024-08-03 17:15:11 +00:00
Antoine du Hamel
1e3a3470a5
build: add --without-amaro build flag
...
PR-URL: https://github.com/nodejs/node/pull/54136
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2024-08-02 10:37:36 +00:00
Marco Ippolito
35f92d953c
module: add --experimental-strip-types
...
PR-URL: https://github.com/nodejs/node/pull/53725
Refs: https://github.com/nodejs/loaders/issues/217
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruy Adorno <ruy@vlt.sh >
2024-07-24 16:30:06 +00:00