GeezerVison is showing github.com — lib: replace WeakMap global by the primordials · nodejs/node@90196b8
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: lib/.eslintrc.yaml +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 29 | 29 | message: "Use `const { Reflect } = primordials;` instead of the global." | 30 | 30 | - name: Symbol | 31 | 31 | message: "Use `const { Symbol } = primordials;` instead of the global." | | 32 | + - name: WeakMap | | 33 | + message: "Use `const { WeakMap } = primordials;` instead of the global." | 32 | 34 | no-restricted-syntax: | 33 | 35 | # Config copied from .eslintrc.js | 34 | 36 | - error | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/console/constructor.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -15,6 +15,7 @@ const { | 15 | 15 | ReflectOwnKeys, | 16 | 16 | Symbol, | 17 | 17 | SymbolHasInstance, | | 18 | + WeakMap, | 18 | 19 | } = primordials; | 19 | 20 |
| 20 | 21 | const { trace } = internalBinding('trace_events'); | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/errors.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -18,6 +18,7 @@ const { | 18 | 18 | ObjectKeys, | 19 | 19 | Symbol, | 20 | 20 | SymbolFor, | | 21 | + WeakMap, | 21 | 22 | } = primordials; | 22 | 23 |
| 23 | 24 | const messages = new Map(); | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/process/promises.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 |
| 3 | 3 | const { | 4 | 4 | ObjectDefineProperty, | | 5 | + WeakMap, | 5 | 6 | } = primordials; | 6 | 7 |
| 7 | 8 | const { | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/source_map/source_map_cache.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 7 | 7 | ObjectGetOwnPropertyDescriptor, | 8 | 8 | ObjectPrototypeHasOwnProperty, | 9 | 9 | MapPrototypeEntries, | | 10 | + WeakMap, | 10 | 11 | WeakMapPrototypeGet, | 11 | 12 | uncurryThis, | 12 | 13 | } = primordials; | |
Collapse file Copy file name to clipboardExpand all lines: lib/internal/vm/module.js +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 6 | 6 | ObjectDefineProperty, | 7 | 7 | SafePromise, | 8 | 8 | Symbol, | | 9 | + WeakMap, | 9 | 10 | } = primordials; | 10 | 11 |
| 11 | 12 | const { isContext } = internalBinding('contextify'); | |
Collapse file Copy file name to clipboardExpand all lines: lib/repl.js +2Lines changed: 2 additions & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -58,6 +58,8 @@ const { | 58 | 58 | Promise, | 59 | 59 | PromiseRace, | 60 | 60 | Symbol, | | 61 | + WeakMap, | | 62 | + WeakSet, | 61 | 63 | } = primordials; | 62 | 64 |
| 63 | 65 | const { | |
|