From 542aae4bf0652c6b37bf57dc7d0d58573d491410 Mon Sep 17 00:00:00 2001 From: Sebastien Ahkrin Date: Thu, 2 Jan 2020 14:48:55 +0100 Subject: [PATCH] lib: replace WeakSet global by the primordials PR-URL: https://github.com/nodejs/node/pull/31157 Reviewed-By: Ruben Bridgewater Reviewed-By: Benjamin Gruenbaum Reviewed-By: James M Snell Reviewed-By: Colin Ihrig Reviewed-By: David Carlier Reviewed-By: Rich Trott Reviewed-By: Trivikram Kamat --- lib/.eslintrc.yaml | 2 ++ lib/repl.js | 1 + 2 files changed, 3 insertions(+) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index f3a0d9f1d3e5c9..b84a0ef6350196 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -31,6 +31,8 @@ rules: message: "Use `const { Symbol } = primordials;` instead of the global." - name: WeakMap message: "Use `const { WeakMap } = primordials;` instead of the global." + - name: WeakSet + message: "Use `const { WeakSet } = primordials;` instead of the global." no-restricted-syntax: # Config copied from .eslintrc.js - error diff --git a/lib/repl.js b/lib/repl.js index d9efb8c5ece523..6acaf8baccd8ee 100644 --- a/lib/repl.js +++ b/lib/repl.js @@ -56,6 +56,7 @@ const { Promise, PromiseRace, Symbol, + WeakSet, } = primordials; const {