<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node-new.git/lib/module.js, branch Ninja.py-StringIO</title>
<subtitle>github.com: nodejs/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/'/>
<entry>
<title>lib: rework logic of stripping BOM+Shebang from commonjs</title>
<updated>2019-05-26T18:04:29+00:00</updated>
<author>
<name>Gus Caplan</name>
<email>me@gus.host</email>
</author>
<published>2019-05-19T03:48:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=e2c0c0c68074c539ae2ae30debdeafb9f94d989b'/>
<id>e2c0c0c68074c539ae2ae30debdeafb9f94d989b</id>
<content type='text'>
Fixes https://github.com/nodejs/node/issues/27767

PR-URL: https://github.com/nodejs/node/pull/27768
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes https://github.com/nodejs/node/issues/27767

PR-URL: https://github.com/nodejs/node/pull/27768
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Rich Trott &lt;rtrott@gmail.com&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: add back lib/module.js redirection</title>
<updated>2018-03-15T12:50:35+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2018-03-14T04:51:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=54de79b16e6eaf0b85fb40133dfc0f15016ef103'/>
<id>54de79b16e6eaf0b85fb40133dfc0f15016ef103</id>
<content type='text'>
The previous commit deleted lib/module.js so that git
recognize the file move `lib/module.js` -&gt;
`lib/internal/modules/cjs/loader.js`. This commit add the
redirection back.

PR-URL: https://github.com/nodejs/node/pull/19177
Refs: https://github.com/nodejs/node/pull/19112
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The previous commit deleted lib/module.js so that git
recognize the file move `lib/module.js` -&gt;
`lib/internal/modules/cjs/loader.js`. This commit add the
redirection back.

PR-URL: https://github.com/nodejs/node/pull/19177
Refs: https://github.com/nodejs/node/pull/19112
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: restructure cjs and esm loaders</title>
<updated>2018-03-15T12:50:35+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2018-03-06T18:30:18+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=c2b01881dcb3bf302f9d83157e719cc5240a9042'/>
<id>c2b01881dcb3bf302f9d83157e719cc5240a9042</id>
<content type='text'>
Create `lib/internal/modules` and restructure the module loaders
to make the purpose of those files clearer.

Also make it clear in the code that the object exported by
`lib/internal/modules/cjs/loader.js` is `CJSModule` instead of the
ambiguous `Module`.

Before:

```
lib
├── ...
├── internal
│       ├── loaders
│       │     ├── CreateDynamicModule.js
│       │     ├── DefaultResolve.js
│       │     ├── Loader.js
│       │     ├── ModuleJob.js
│       │     ├── ModuleMap.js
│       │     └── Translators.js
│       └── module.js
└── module.js
```

After:

```
lib
├── ...
├── internal
│       ├── ...
│       └── modules
│              ├── cjs
│              │     ├── helpers.js
│              │     └── loader.js
│              └── esm
│                    ├── CreateDynamicModule.js
│                    ├── DefaultResolve.js
│                    ├── Loader.js
│                    ├── ModuleJob.js
│                    ├── ModuleMap.js
│                    └── Translators.js
└── module.js # deleted in this commit to work with git file mode
```

PR-URL: https://github.com/nodejs/node/pull/19177
Refs: https://github.com/nodejs/node/pull/19112
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create `lib/internal/modules` and restructure the module loaders
to make the purpose of those files clearer.

Also make it clear in the code that the object exported by
`lib/internal/modules/cjs/loader.js` is `CJSModule` instead of the
ambiguous `Module`.

Before:

```
lib
├── ...
├── internal
│       ├── loaders
│       │     ├── CreateDynamicModule.js
│       │     ├── DefaultResolve.js
│       │     ├── Loader.js
│       │     ├── ModuleJob.js
│       │     ├── ModuleMap.js
│       │     └── Translators.js
│       └── module.js
└── module.js
```

After:

```
lib
├── ...
├── internal
│       ├── ...
│       └── modules
│              ├── cjs
│              │     ├── helpers.js
│              │     └── loader.js
│              └── esm
│                    ├── CreateDynamicModule.js
│                    ├── DefaultResolve.js
│                    ├── Loader.js
│                    ├── ModuleJob.js
│                    ├── ModuleMap.js
│                    └── Translators.js
└── module.js # deleted in this commit to work with git file mode
```

PR-URL: https://github.com/nodejs/node/pull/19177
Refs: https://github.com/nodejs/node/pull/19112
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: put bootstrappers in lib/internal/bootstrap/</title>
<updated>2018-03-15T12:50:34+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2018-03-06T14:42:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=8484b40b3d38e18c524b7dd560c16ab30c94e427'/>
<id>8484b40b3d38e18c524b7dd560c16ab30c94e427</id>
<content type='text'>
Create `lib/internal/bootstrap/` and put bootstrappers there:

Before:

```
lib/internal
├── ...
├── bootstrap_loaders.js
└── bootstrap_node.js
```

After:

```
lib/internal
├── ...
└── bootstrap
    ├── loaders.js
    └── node.js
```

PR-URL: https://github.com/nodejs/node/pull/19177
Refs: https://github.com/nodejs/node/pull/19112
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Create `lib/internal/bootstrap/` and put bootstrappers there:

Before:

```
lib/internal
├── ...
├── bootstrap_loaders.js
└── bootstrap_node.js
```

After:

```
lib/internal
├── ...
└── bootstrap
    ├── loaders.js
    └── node.js
```

PR-URL: https://github.com/nodejs/node/pull/19177
Refs: https://github.com/nodejs/node/pull/19112
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: check file ext before dir as documented</title>
<updated>2018-03-11T01:56:56+00:00</updated>
<author>
<name>Bradley Farias</name>
<email>bradley.meck@gmail.com</email>
</author>
<published>2017-08-24T14:59:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1ed36aeb53266f8f01e1cd442069024d258f632a'/>
<id>1ed36aeb53266f8f01e1cd442069024d258f632a</id>
<content type='text'>
The documented resolution algorithm started to search for package.json
files prior to searching for file extensions when searching for a
specifier. Oddly, it did not search for index files at same time it
searched for package.json. This restores the documented behavior of
searching for file extensions prior to searching directories.

PR-URL: https://github.com/nodejs/node/pull/15015
Fixes: https://github.com/nodejs/node/issues/14990
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Evan Lucas &lt;evanlucas@me.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Khaidi Chu &lt;i@2333.moe&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The documented resolution algorithm started to search for package.json
files prior to searching for file extensions when searching for a
specifier. Oddly, it did not search for index files at same time it
searched for package.json. This restores the documented behavior of
searching for file extensions prior to searching directories.

PR-URL: https://github.com/nodejs/node/pull/15015
Fixes: https://github.com/nodejs/node/issues/14990
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Matteo Collina &lt;matteo.collina@gmail.com&gt;
Reviewed-By: Evan Lucas &lt;evanlucas@me.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Khaidi Chu &lt;i@2333.moe&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>src: move internal loaders out of bootstrap_node.js</title>
<updated>2018-03-06T14:12:46+00:00</updated>
<author>
<name>Joyee Cheung</name>
<email>joyeec9h3@gmail.com</email>
</author>
<published>2018-03-03T20:55:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=2a9eb316a1e86d8b191aa2cdfd25d45508456573'/>
<id>2a9eb316a1e86d8b191aa2cdfd25d45508456573</id>
<content type='text'>
- Moves the creation of `process.binding()`, `process._linkedBinding()`
  `internalBinding()` and `NativeModule` into a separate file
  `lib/internal/bootstrap_loaders.js`, and documents them there.
  This file will be compiled and run before `bootstrap_node.js`, which
  means we now bootstrap the internal module &amp; binding system before
  actually bootstrapping Node.js.
- Rename the special ID that can be used to require `NativeModule`
  as `internal/bootstrap_loaders` since it is setup there. Also put
  `internalBinding` in the object exported by `NativeModule.require`
  instead of putting it inside the `NativeModule.wrapper`
- Use the original `getBinding()` to get the source code of native
  modules instead of getting it from `process.binding('native')`
  so that users cannot fake native modules by modifying the binding
  object.
- Names the bootstrapping functions so their names show up
  in the stack trace.

PR-URL: https://github.com/nodejs/node/pull/19112
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Moves the creation of `process.binding()`, `process._linkedBinding()`
  `internalBinding()` and `NativeModule` into a separate file
  `lib/internal/bootstrap_loaders.js`, and documents them there.
  This file will be compiled and run before `bootstrap_node.js`, which
  means we now bootstrap the internal module &amp; binding system before
  actually bootstrapping Node.js.
- Rename the special ID that can be used to require `NativeModule`
  as `internal/bootstrap_loaders` since it is setup there. Also put
  `internalBinding` in the object exported by `NativeModule.require`
  instead of putting it inside the `NativeModule.wrapper`
- Use the original `getBinding()` to get the source code of native
  modules instead of getting it from `process.binding('native')`
  so that users cannot fake native modules by modifying the binding
  object.
- Names the bootstrapping functions so their names show up
  in the stack trace.

PR-URL: https://github.com/nodejs/node/pull/19112
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Anatoli Papirovski &lt;apapirovski@mac.com&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib: port errors to new system</title>
<updated>2018-03-05T18:51:30+00:00</updated>
<author>
<name>Michaël Zasso</name>
<email>targos@protonmail.com</email>
</author>
<published>2018-02-27T13:55:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=1e8d110e640c658e4f6ed7540db62d063269ba6c'/>
<id>1e8d110e640c658e4f6ed7540db62d063269ba6c</id>
<content type='text'>
This is a first batch of updates that touches non-underscored modules in
lib.

PR-URL: https://github.com/nodejs/node/pull/19034
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a first batch of updates that touches non-underscored modules in
lib.

PR-URL: https://github.com/nodejs/node/pull/19034
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Joyee Cheung &lt;joyeec9h3@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: replace magic numbers by constants</title>
<updated>2018-02-16T18:32:03+00:00</updated>
<author>
<name>Sergey Golovin</name>
<email>golovim@gmail.com</email>
</author>
<published>2018-02-14T17:52:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=c86fe511f4924ebbf7291fd938e5cd952199145b'/>
<id>c86fe511f4924ebbf7291fd938e5cd952199145b</id>
<content type='text'>
- add new constants
- replace "magic" numbers in "module" by constants

PR-URL: https://github.com/nodejs/node/pull/18785
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Minwoo Jung &lt;minwoo@nodesource.com&gt;
Reviewed-By: Weijia Wang &lt;starkwang@126.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Matheus Marchini &lt;matheus@sthima.com&gt;
Reviewed-By: Jon Moss &lt;me@jonathanmoss.me&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- add new constants
- replace "magic" numbers in "module" by constants

PR-URL: https://github.com/nodejs/node/pull/18785
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Minwoo Jung &lt;minwoo@nodesource.com&gt;
Reviewed-By: Weijia Wang &lt;starkwang@126.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
Reviewed-By: Matheus Marchini &lt;matheus@sthima.com&gt;
Reviewed-By: Jon Moss &lt;me@jonathanmoss.me&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lib,src: audit process.env in lib/ for setuid binary</title>
<updated>2018-02-16T16:42:21+00:00</updated>
<author>
<name>Jose M. Palacios Diaz</name>
<email>jmpd1988@gmail.com</email>
</author>
<published>2018-02-01T16:13:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=916cfeca774e83925466f9a171f11c9bc73e4756'/>
<id>916cfeca774e83925466f9a171f11c9bc73e4756</id>
<content type='text'>
Wrap SafeGetenv() in util binding with the purpose of protecting
the cases when env vars are accessed with the privileges of another
user in jsland.

PR-URL: https://github.com/nodejs/node/pull/18511
Fixes: https://github.com/nodejs/node/issues/9160
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Wrap SafeGetenv() in util binding with the purpose of protecting
the cases when env vars are accessed with the privileges of another
user in jsland.

PR-URL: https://github.com/nodejs/node/pull/18511
Fixes: https://github.com/nodejs/node/issues/9160
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Anna Henningsen &lt;anna@addaleax.net&gt;
Reviewed-By: Ben Noordhuis &lt;info@bnoordhuis.nl&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>module: remove unused code in module.js</title>
<updated>2018-02-16T00:20:44+00:00</updated>
<author>
<name>Rich Trott</name>
<email>rtrott@gmail.com</email>
</author>
<published>2018-02-13T23:02:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node-new.git/commit/?id=3b9cc424a4240c10003dca71c5a7478232e3d0d8'/>
<id>3b9cc424a4240c10003dca71c5a7478232e3d0d8</id>
<content type='text'>
Remove unnecessary condition in lib/module.js.

Refs: https://github.com/nodejs/node/pull/18593#issuecomment-364927965

PR-URL: https://github.com/nodejs/node/pull/18768
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove unnecessary condition in lib/module.js.

Refs: https://github.com/nodejs/node/pull/18593#issuecomment-364927965

PR-URL: https://github.com/nodejs/node/pull/18768
Reviewed-By: James M Snell &lt;jasnell@gmail.com&gt;
Reviewed-By: Colin Ihrig &lt;cjihrig@gmail.com&gt;
Reviewed-By: Gus Caplan &lt;me@gus.host&gt;
Reviewed-By: Tobias Nießen &lt;tniessen@tnie.de&gt;
Reviewed-By: Ruben Bridgewater &lt;ruben@bridgewater.de&gt;
Reviewed-By: Richard Lau &lt;riclau@uk.ibm.com&gt;
Reviewed-By: Benjamin Gruenbaum &lt;benjamingr@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
