André Alves
71391987f7
lib: fix MIME overmatch in data URLs
...
This commit adds the delimiters ^ and $ to the regex that matches the
MIME types for `data:` URLs.
PR-URL: https://github.com/nodejs/node/pull/49104
Fixes: https://github.com/nodejs/node/issues/48957
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-08-13 23:24:22 +02:00
Antoine du Hamel
b5da2f4dad
esm: fix globalPreload warning
...
PR-URL: https://github.com/nodejs/node/pull/49069
Fixes: https://github.com/nodejs/node/issues/49026
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-08-13 14:37:32 +00:00
Guy Bedford
ee8b7f1f18
esm: unflag import.meta.resolve
...
PR-URL: https://github.com/nodejs/node/pull/49028
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-08-13 05:42:25 +00:00
Antoine du Hamel
3d20582c0f
module: make CJS load from ESM loader
...
PR-URL: https://github.com/nodejs/node/pull/47999
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-08-13 04:23:05 +00:00
Guy Bedford
569267d048
esm: import.meta.resolve exact module not found errors should return
...
PR-URL: https://github.com/nodejs/node/pull/49038
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-08-13 00:02:03 +00:00
Antoine du Hamel
6aafb6fbbb
esm: protect ERR_UNSUPPORTED_DIR_IMPORT against prototype pollution
...
PR-URL: https://github.com/nodejs/node/pull/49060
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-08-11 06:29:14 +00:00
RafaelGSS
b68e5e7981
policy: handle Module.constructor and main.extensions bypass
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs-private/node-private/pull/417
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=1960870
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=2043807
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
CVE-ID: CVE-2023-32002,CVE-2023-32006
2023-08-09 14:33:55 -03:00
Izaak Schroeder
6ad8318373
esm: add initialize hook, integrate with register
...
Follows @giltayar's proposed API:
> `register` can pass any data it wants to the loader, which will be
passed to the exported `initialize` function of the loader.
Additionally, if the user of `register` wants to communicate with the
loader, it can just create a `MessageChannel` and pass the port to the
loader as data.
The `register` API is now:
```ts
interface Options {
parentUrl?: string;
data?: any;
transferList?: any[];
}
function register(loader: string, parentUrl?: string): any;
function register(loader: string, options?: Options): any;
```
This API is backwards compatible with the old one (new arguments are
optional and at the end) and allows for passing data into the new
`initialize` hook. If this hook returns data it is passed back to
`register`:
```ts
function initialize(data: any): Promise<any>;
```
**NOTE**: Currently there is no mechanism for a loader to exchange
ownership of something back to the caller.
Refs: https://github.com/nodejs/loaders/issues/147
PR-URL: https://github.com/nodejs/node/pull/48842
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-08-03 05:10:59 +00:00
Antoine du Hamel
5c65565108
esm: fix typo parentUrl -> parentURL
...
PR-URL: https://github.com/nodejs/node/pull/48999
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Chemi Atlow <chemi@atlow.co.il >
2023-08-02 20:27:39 +00:00
Antoine du Hamel
053511f7ec
module: ensure successful import returns the same result
...
PR-URL: https://github.com/nodejs/node/pull/46662
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-07-26 20:34:20 +00:00
Darshan Sen
6cd678965f
sea: add support for V8 bytecode-only caching
...
Refs: https://github.com/nodejs/single-executable/issues/73
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/48191
Fixes: https://github.com/nodejs/single-executable/issues/73
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-07-26 10:10:35 +00:00
Izaak Schroeder
a2fc4a383e
esm: unflag Module.register and allow nested loader import()
...
Major functional changes:
- Allow `import()` to work within loaders that require other loaders,
- Unflag the use of `Module.register`.
A new interface `Customizations` has been created in order to unify
`ModuleLoader` (previously `DefaultModuleLoader`), `Hooks` and
`CustomizedModuleLoader` all of which now implement it:
```ts
interface LoadResult {
format: ModuleFormat;
source: ModuleSource;
}
interface ResolveResult {
format: string;
url: URL['href'];
}
interface Customizations {
allowImportMetaResolve: boolean;
load(url: string, context: object): Promise<LoadResult>
resolve(
originalSpecifier:
string, parentURL: string,
importAssertions: Record<string, string>
): Promise<ResolveResult>
resolveSync(
originalSpecifier:
string, parentURL: string,
importAssertions: Record<string, string>
) ResolveResult;
register(specifier: string, parentUrl: string): any;
forceLoadHooks(): void;
importMetaInitialize(meta, context, loader): void;
}
```
The `ModuleLoader` class now has `setCustomizations` which takes an
object of this shape and delegates its responsibilities to this object
if present.
Note that two properties `allowImportMetaResolve` and `resolveSync`
exist now as a mechanism for `import.meta.resolve` – since `Hooks`
does not implement `resolveSync` other loaders cannot use
`import.meta.resolve`; `allowImportMetaResolve` is a way of checking
for that case instead of invoking `resolveSync` and erroring.
Fixes https://github.com/nodejs/node/issues/48515
Closes https://github.com/nodejs/node/pull/48439
PR-URL: https://github.com/nodejs/node/pull/48559
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-07-19 10:33:47 +00:00
Antoine du Hamel
16b8c71a32
esm: add back globalPreload tests and fix failing ones
...
PR-URL: https://github.com/nodejs/node/pull/48779
Fixes: https://github.com/nodejs/node/issues/48778
Fixes: https://github.com/nodejs/node/issues/48516
Refs: https://github.com/nodejs/node/pull/46402
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-07-17 17:26:15 +02:00
Antoine du Hamel
ffb1929b6a
esm: fix emit deprecation on legacy main resolve
...
PR-URL: https://github.com/nodejs/node/pull/48664
Refs: https://github.com/nodejs/node/pull/48325
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-07-11 16:49:06 +00:00
Yagiz Nizipli
3205b1936a
lib: remove aix directory case for package reader
...
PR-URL: https://github.com/nodejs/node/pull/48605
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-07-07 15:31:33 +00:00
Antoine du Hamel
3ce51ae9c0
module: harmonize error code between ESM and CJS
...
PR-URL: https://github.com/nodejs/node/pull/48606
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Jan Krems <jan.krems@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-07-04 09:52:56 +00:00
Vinicius Lourenço
a2a8e31cbc
src,lib: reducing C++ calls of esm legacy main resolve
...
Instead of many C++ calls, now we make only one C++ call
to return a enum number that represents the selected state.
PR-URL: https://github.com/nodejs/node/pull/48325
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
2023-07-03 18:42:47 +00:00
Yagiz Nizipli
951da5282c
lib: merge cjs and esm package json reader caches
...
PR-URL: https://github.com/nodejs/node/pull/48477
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2023-06-29 18:45:31 +00:00
Yagiz Nizipli
578ffe1edb
lib: reduce url getters on makeRequireFunction
...
PR-URL: https://github.com/nodejs/node/pull/48492
Refs: https://github.com/nodejs/performance/issues/92
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-06-24 00:33:22 +00:00
RafaelGSS
daaa43ed96
policy: handle mainModule.__proto__ bypass
...
PR-URL: https://github.com/nodejs-private/node-private/pull/416
Fixes: https://hackerone.com/bugs?subject=nodejs&report_id=1877919
Reviewed-By: Rich Trott <rtrott@gmail.com >
CVE-ID: CVE-2023-30581
2023-06-20 17:31:28 -03:00
João Lenon
a40a6c890a
module: implement register utility
...
PR-URL: https://github.com/nodejs/node/pull/46826
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-06-12 00:00:46 +00:00
Antoine du Hamel
d2d4a310f1
typings: fix JSDoc in ESM loader modules
...
PR-URL: https://github.com/nodejs/node/pull/48424
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
2023-06-11 21:09:21 +02:00
Yagiz Nizipli
9d936fa250
module: reduce url invocations in esm/load.js
...
PR-URL: https://github.com/nodejs/node/pull/48337
Refs: https://github.com/nodejs/performance/issues/92
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-06-07 01:33:59 +00:00
Antoine du Hamel
9f3466bcb6
esm: remove support for arrays in import internal method
...
This avoids initializing arrays that we never use, and simplifies the
implementation overall.
PR-URL: https://github.com/nodejs/node/pull/48296
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-06-05 08:32:33 +00:00
Yagiz Nizipli
54e0cb5051
module: reduce the number of URL initializations
...
PR-URL: https://github.com/nodejs/node/pull/48272
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-06-03 13:52:54 -04:00
Antoine du Hamel
fa1c73213f
esm: handle globalPreload hook returning a nullish value
...
PR-URL: https://github.com/nodejs/node/pull/48249
Fixes: https://github.com/nodejs/node/issues/48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-06-01 12:10:45 +02:00
Antoine du Hamel
d28f1f1193
esm: handle more error types thrown from the loader thread
...
PR-URL: https://github.com/nodejs/node/pull/48247
Refs: https://github.com/nodejs/node/issues/48240
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-06-01 09:21:01 +00:00
Gil Tayar
ccada8bccc
module: change default resolver to not throw on unknown scheme
...
Fixes https://github.com/nodejs/loaders/issues/138
PR-URL: https://github.com/nodejs/node/pull/47824
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
2023-05-19 15:50:50 +00:00
Antoine du Hamel
cdd20cfd71
esm: do not use 'beforeExit' on the main thread
...
PR-URL: https://github.com/nodejs/node/pull/47964
Fixes: https://github.com/nodejs/node/issues/47929
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
2023-05-14 05:32:08 +00:00
Darshan Sen
7fe4745ca1
module: refactor to use normalizeRequirableId in the CJS module loader
...
`BuiltinModule.normalizeRequirableId()` was introduced in
https://github.com/nodejs/node/pull/47779 to fix a bug in the require
function of SEAs and Snapshots, so that built-in modules with the
`node:` scheme could be required correctly. This change makes more use
of this API instead of `BuiltinModule.canBeRequiredByUsers()` and
`BuiltinModule.canBeRequiredWithoutScheme()` to reduce chances of
such bugs.
Signed-off-by: Darshan Sen <raisinten@gmail.com >
PR-URL: https://github.com/nodejs/node/pull/47896
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
2023-05-08 08:17:13 +00:00
Chengzhong Wu
64549731b6
src: throw DataCloneError on transfering untransferable objects
...
The HTML StructuredSerializeWithTransfer algorithm defines that when
an untransferable object is in the transfer list, a DataCloneError is
thrown.
An array buffer that is already transferred is also considered as
untransferable.
PR-URL: https://github.com/nodejs/node/pull/47604
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2023-05-05 11:22:42 +00:00
Moshe Atlow
9658d84ddd
tools: fix jsdoc lint
...
PR-URL: https://github.com/nodejs/node/pull/47789
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Mestery <mestery@protonmail.com >
2023-05-02 00:48:20 +00:00
Antoine du Hamel
d6c0b81fd2
esm: rename URLCanParse to be consistent
...
PR-URL: https://github.com/nodejs/node/pull/47668
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-04-24 17:27:42 +02:00
Yagiz Nizipli
3e9ed7e95f
lib: improve esm resolve performance
...
PR-URL: https://github.com/nodejs/node/pull/46652
Refs: https://github.com/nodejs/performance/issues/39
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Erick Wendel <erick.workspace@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-04-23 23:52:26 +00:00
Joyee Cheung
f14d2e5a0c
loader: use default loader as cascaded loader in the in loader worker
...
Use the default loader as the cascaded loader in the loader worker.
Otherwise we spawn loader workers in the loader workers indefinitely.
PR-URL: https://github.com/nodejs/node/pull/47620
Fixes: https://github.com/nodejs/node/issues/47566
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
2023-04-21 12:27:54 +00:00
Antoine du Hamel
7dd3732480
esm: remove support for deprecated hooks
...
Those have been deprecated for a while, it's time.
PR-URL: https://github.com/nodejs/node/pull/47580
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-04-19 23:52:05 +00:00
Antoine du Hamel
ee08c701f7
esm: initialize import.meta on eval
...
PR-URL: https://github.com/nodejs/node/pull/47551
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-04-19 18:55:36 +00:00
Antoine du Hamel
2e0152ccf1
esm: propagate process.exit from the loader thread to the main thread
...
PR-URL: https://github.com/nodejs/node/pull/47548
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-04-19 04:30:28 +00:00
Yagiz Nizipli
93e550adf6
esm: avoid accessing lazy getters for urls
...
PR-URL: https://github.com/nodejs/node/pull/47542
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-04-15 14:51:32 +00:00
Yagiz Nizipli
17570c0a85
esm: avoid try/catch when validating urls
...
PR-URL: https://github.com/nodejs/node/pull/47541
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com >
2023-04-15 14:43:20 +00:00
Jacob Smith
4667b07cd2
esm: move hook execution to separate thread
...
PR-URL: https://github.com/nodejs/node/pull/44710
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com >
Co-authored-by: Geoffrey Booth <webadmin@geoffreybooth.com >
Co-authored-by: Michaël Zasso <targos@protonmail.com >
2023-04-13 09:35:17 +02:00
Joyee Cheung
5572f8fca0
module: do less CJS module loader initialization at run time
...
This patch:
- Builds the set of modules that can be required by users with/without
the `node:` prefix at snapshot building time. We only modify it when
`--expose-internals` but the default set is now in the snapshot. At
run time the CJS module loader only creates a frozen array out of it.
- `BuiltinModule.canBeRequiredWithoutScheme()` is now enough to
determine if an id can be required without `node:` without an
additional call to `BuiltinModule.canBeRequiredByUsers()`
- Replace the pending-to-deprecate methods on `Module` with an internal
implementation that only queries the CLI flags when being invoked.
So we can install these methods in the snapshot.
PR-URL: https://github.com/nodejs/node/pull/47194
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Chengzhong Wu <legendecas@gmail.com >
2023-04-05 11:13:23 +00:00
Chengzhong Wu
3a014dc38a
src: bootstrap prepare stack trace callback in shadow realm
...
Bootstrap per-realm callbacks like `prepare_stack_trace_callback` in
the ShadowRealm. This enables stack trace decoration in the ShadowRealm.
PR-URL: https://github.com/nodejs/node/pull/47107
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-04-04 01:13:37 +00:00
Antoine du Hamel
aa5eb58d3b
esm: skip file: URL conversion to path when possible
...
PR-URL: https://github.com/nodejs/node/pull/46305
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Guy Bedford <guybedford@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: James M Snell <jasnell@gmail.com >
2023-04-01 07:43:38 +00:00
Rafael Gonzaga
1726da9300
permission: add path separator to loader check
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs/node/pull/47030
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com >
2023-03-15 14:27:26 +00:00
Antoine du Hamel
0c4f8f255a
esm: fix import assertion warning
...
Refs: https://github.com/nodejs/node/pull/46901#discussion_r1122242913
PR-URL: https://github.com/nodejs/node/pull/46971
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Jacob Smith <jacob@frende.me >
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2023-03-07 10:32:47 +00:00
Antoine du Hamel
ab8942848b
lib: enforce use of trailing commas
...
PR-URL: https://github.com/nodejs/node/pull/46881
Reviewed-By: Debadree Chatterjee <debadree333@gmail.com >
Reviewed-By: Moshe Atlow <moshe@atlow.co.il >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-03-06 10:44:14 +01:00
Yagiz Nizipli
027841c964
url: use private properties for brand check
...
PR-URL: https://github.com/nodejs/node/pull/46904
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
2023-03-03 21:34:56 +00:00
Antoine du Hamel
5a7491b5ac
esm: add a runtime warning when using import assertions
...
PR-URL: https://github.com/nodejs/node/pull/46901
Refs: https://github.com/nodejs/node/issues/46830
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Mohammed Keyvanzadeh <mohammadkeyvanzade94@gmail.com >
Reviewed-By: Jacob Smith <jacob@frende.me >
2023-03-03 18:31:12 +00:00
Rafael Gonzaga
00c222593e
src,process: add permission model
...
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com >
PR-URL: https://github.com/nodejs/node/pull/44004
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Paolo Insogna <paolo@cowtech.it >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2023-02-23 18:11:51 +00:00