Commit Graph

7 Commits

Author SHA1 Message Date
Luigi Pinca 40715481bf
test: use tmpdir.refresh() in test-esm-loader-resolve-type.mjs
Use `tmpdir.refresh()` in
`test/es-module/test-esm-loader-resolve-type.mjs` so that the temporary
directory is removed when the test exits.

PR-URL: https://github.com/nodejs/node/pull/51206
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br>
2023-12-20 18:17:31 +00:00
Geoffrey Booth 63c3846d0a esm: refactor test-esm-loader-resolve-type
PR-URL: https://github.com/nodejs/node/pull/49493
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-09-06 22:30:09 +00:00
Geoffrey Booth a927adef9e esm: refactor test-esm-named-exports
PR-URL: https://github.com/nodejs/node/pull/49493
Reviewed-By: Jacob Smith <jacob@frende.me>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2023-09-06 22:30:08 +00:00
Michaël Zasso cf8c6994e0
test: refactor to avoid mutation of global by a loader
This makes the test compatible with off-thread loaders.

Co-Authored-By: Geoffrey Booth <webadmin@geoffreybooth.com>
PR-URL: https://github.com/nodejs/node/pull/46220
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2023-01-19 00:14:07 +00:00
Daeyeon Jeong 1600869eb7
test: fix comments in test files
This commit fixes typos found in test files.

PR-URL: https://github.com/nodejs/node/pull/42536
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2022-03-31 08:48:03 +02:00
Bradley Farias ceadb473e6 esm: support https remotely and http locally under flag
Co-authored-by: Jacob Smith <3012099+JakobJingleheimer@users.noreply.github.com>
Co-authored-by: James M Snell <jasnell@gmail.com>
Co-authored-by: Jordan Harband <ljharb@gmail.com>
Co-authored-by: James Sumners <james@sumners.email>
PR-URL: https://github.com/nodejs/node/pull/36328
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
2022-02-09 19:47:12 -08:00
Gabriel Bota 85d4cd3079
loader: return package format from defaultResolve if known
This is a proposed modification of defaultResolve to return the package
format in case it has been found during package resolution.
The format will be returned as described in the documentation:
https://nodejs.org/api/esm.html#resolvespecifier-context-defaultresolve
There is one new unit test as well:
test/es-module/test-esm-resolve-type.js

PR-URL: https://github.com/nodejs/node/pull/40980
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2021-12-13 20:44:00 +00:00