From f544f7a102f5e906051620793d2e327d08fa9287 Mon Sep 17 00:00:00 2001 From: Sebastien Ahkrin Date: Mon, 6 Jan 2020 03:26:38 +0100 Subject: [PATCH] lib: replace Float64Array global with primordials PR-URL: https://github.com/nodejs/node/pull/35397 Reviewed-By: Luigi Pinca Reviewed-By: Jiawen Geng Reviewed-By: Pranshu Srivastava Reviewed-By: Rich Trott Reviewed-By: Anto Aravinth Reviewed-By: Ujjwal Sharma --- lib/.eslintrc.yaml | 2 ++ lib/internal/buffer.js | 1 + lib/internal/process/per_thread.js | 1 + lib/internal/util/inspect.js | 1 + lib/internal/worker.js | 1 + lib/os.js | 1 + 6 files changed, 7 insertions(+) diff --git a/lib/.eslintrc.yaml b/lib/.eslintrc.yaml index 97cc264c8ff804..afa71051799947 100644 --- a/lib/.eslintrc.yaml +++ b/lib/.eslintrc.yaml @@ -23,6 +23,8 @@ rules: message: "Use `const { Error } = primordials;` instead of the global." - name: Float32Array message: "Use `const { Float32Array } = primordials;` instead of the global." + - name: Float64Array + message: "Use `const { Float64Array } = primordials;` instead of the global." - name: Int16Array message: "Use `const { Int16Array } = primordials;` instead of the global." - name: JSON diff --git a/lib/internal/buffer.js b/lib/internal/buffer.js index 03f12d809d5692..fa682575217994 100644 --- a/lib/internal/buffer.js +++ b/lib/internal/buffer.js @@ -3,6 +3,7 @@ const { BigInt, Float32Array, + Float64Array, MathFloor, Number, } = primordials; diff --git a/lib/internal/process/per_thread.js b/lib/internal/process/per_thread.js index d219cd7298fc15..cfc0e3463cedaf 100644 --- a/lib/internal/process/per_thread.js +++ b/lib/internal/process/per_thread.js @@ -7,6 +7,7 @@ const { ArrayIsArray, BigUint64Array, + Float64Array, NumberMAX_SAFE_INTEGER, ObjectDefineProperties, ObjectDefineProperty, diff --git a/lib/internal/util/inspect.js b/lib/internal/util/inspect.js index e3245010761164..e93456eba77ec7 100644 --- a/lib/internal/util/inspect.js +++ b/lib/internal/util/inspect.js @@ -12,6 +12,7 @@ const { DatePrototypeToString, ErrorPrototypeToString, Float32Array, + Float64Array, FunctionPrototypeCall, FunctionPrototypeToString, Int16Array, diff --git a/lib/internal/worker.js b/lib/internal/worker.js index 76d92c5963855e..59434c91e59e3a 100644 --- a/lib/internal/worker.js +++ b/lib/internal/worker.js @@ -4,6 +4,7 @@ const { ArrayIsArray, + Float64Array, JSONStringify, MathMax, ObjectCreate, diff --git a/lib/os.js b/lib/os.js index 395a372a00f71f..dc0d08376f2da0 100644 --- a/lib/os.js +++ b/lib/os.js @@ -22,6 +22,7 @@ 'use strict'; const { + Float64Array, ObjectDefineProperties, SymbolToPrimitive, } = primordials;