From 7cf2dad7152a01854b111e38a6a213cf4ed43ba6 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Fri, 27 Feb 2026 11:25:22 +0100 Subject: [PATCH 1/5] lib: improve argument handling in Blob constructor MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As specified in WebIDL (), the fields of a dictionary need to be read in lexicographical order. PR-URL: https://github.com/nodejs/node/pull/61980 Reviewed-By: Jason Zhang Reviewed-By: Mattias Buelens Reviewed-By: René Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig --- lib/internal/blob.js | 2 +- test/wpt/status/FileAPI/blob.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/internal/blob.js b/lib/internal/blob.js index 46abb4f793c465..e42773a8d03dcc 100644 --- a/lib/internal/blob.js +++ b/lib/internal/blob.js @@ -149,8 +149,8 @@ class Blob { } validateDictionary(options, 'options'); let { - type = '', endings = 'transparent', + type = '', } = options ?? kEmptyObject; endings = `${endings}`; diff --git a/test/wpt/status/FileAPI/blob.json b/test/wpt/status/FileAPI/blob.json index 3bbd15087a02ac..a82a9cb0cfdb11 100644 --- a/test/wpt/status/FileAPI/blob.json +++ b/test/wpt/status/FileAPI/blob.json @@ -10,7 +10,6 @@ "blobParts not an object: BigInt with BigInt.prototype[Symbol.iterator]", "blobParts not an object: Symbol with Symbol.prototype[Symbol.iterator]", "Getters and value conversions should happen in order until an exception is thrown.", - "options properties should be accessed in lexicographic order.", "Arguments should be evaluated from left to right." ], "flaky": [ From db278835bc2a3131538fc570241a5adeb536038c Mon Sep 17 00:00:00 2001 From: Richard Lau Date: Fri, 27 Feb 2026 16:16:21 +0000 Subject: [PATCH 2/5] test: skip strace test with shared openssl `parallel/test-strace-openat-openssl` was added to check explicitly for a list of known files that would be opened for a set workload (`require("crypto")`). This is not reliable when Node.js is linked to an external/shared OpenSSL library (e.g. it might be configured to load configuration files from a different default location and/or load more than one configuration file) so skip this test when Node.js is built in that way. PR-URL: https://github.com/nodejs/node/pull/61987 Fixes: https://github.com/nodejs/node/issues/61966 Reviewed-By: Antoine du Hamel Reviewed-By: Yagiz Nizipli Reviewed-By: Luigi Pinca Reviewed-By: Colin Ihrig Reviewed-By: Rafael Gonzaga --- test/parallel/test-strace-openat-openssl.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/parallel/test-strace-openat-openssl.js b/test/parallel/test-strace-openat-openssl.js index 234c12f126f093..399c1db443f9f0 100644 --- a/test/parallel/test-strace-openat-openssl.js +++ b/test/parallel/test-strace-openat-openssl.js @@ -11,6 +11,9 @@ if (!common.isLinux) common.skip('linux only'); if (common.isASan) common.skip('strace does not work well with address sanitizer builds'); +if (process.config.variables.node_shared_openssl) { + common.skip('external shared openssl may open other files'); +} if (spawnSync('strace').error !== undefined) { common.skip('missing strace'); } From 89f4b6cddbba1ef990ac366ba512498e948ed864 Mon Sep 17 00:00:00 2001 From: Marco Ippolito Date: Fri, 27 Feb 2026 17:32:43 +0100 Subject: [PATCH 3/5] module: remove --experimental-transform-types PR-URL: https://github.com/nodejs/node/pull/61803 Refs: https://github.com/nodejs/typescript/issues/51 Reviewed-By: Paolo Insogna Reviewed-By: Benjamin Gruenbaum Reviewed-By: Jordan Harband Reviewed-By: Zeyu "Alex" Yang Reviewed-By: Geoffrey Booth Reviewed-By: Chengzhong Wu Reviewed-By: Pietro Marchini --- .../fixtures/transform-types-benchmark.js | 28 ---- .../fixtures/transform-types-benchmark.ts | 30 ---- benchmark/ts/transform-typescript.js | 26 ---- doc/api/cli.md | 12 -- doc/api/module.md | 46 +------ doc/api/process.md | 6 +- doc/api/typescript.md | 11 +- doc/api/util.md | 3 +- doc/node-config-schema.json | 4 - doc/node.1 | 6 - lib/internal/bootstrap/node.js | 4 +- lib/internal/modules/typescript.js | 38 +---- src/compile_cache.cc | 8 +- src/compile_cache.h | 4 +- src/node_options.cc | 7 - test/es-module/test-typescript-transform.mjs | 129 ----------------- test/es-module/test-typescript.mjs | 24 ---- .../options-as-flags/test-config.json | 2 +- test/fixtures/rc/override-property.json | 4 +- test/fixtures/rc/sneaky-flag.json | 2 +- test/fixtures/rc/strip-types.json | 5 + test/fixtures/rc/transform-types.json | 5 - .../source_map_assert_source_line.snapshot | 14 -- .../output/source_map_assert_source_line.ts | 14 -- .../typescript/cts/test-import-require.cts | 5 - .../ts/transformation/test-decorator.ts | 10 -- .../ts/transformation/test-enum-stacktrace.ts | 4 - .../typescript/ts/transformation/test-enum.ts | 4 - .../ts/transformation/test-legacy-module.ts | 12 -- .../transformation/test-modern-typescript.ts | 12 -- .../ts/transformation/test-namespace.ts | 7 - .../test-transformed-typescript.js | 36 ----- .../ts/transformation/test-unused-import.ts | 3 - .../module-hooks/test-module-hooks-preload.js | 2 - ...load-import-inline-typescript-override.mjs | 3 +- ...-resolve-load-import-inline-typescript.mjs | 4 +- ...load-require-inline-typescript-override.js | 3 +- ...-resolve-load-require-inline-typescript.js | 2 +- test/parallel/test-cli-options-as-flags.js | 2 - ...est-compile-cache-typescript-strip-miss.js | 107 -------------- ...test-compile-cache-typescript-transform.js | 130 ------------------ test/parallel/test-config-file.js | 28 ++-- test/parallel/test-module-strip-types.js | 58 -------- test/parallel/test-node-output-sourcemaps.mjs | 1 - test/parallel/test-runner-cli.js | 4 +- test/parallel/test-util-getcallsites.js | 51 ------- .../test-output-coverage-with-mock.mjs | 1 - .../test-output-typescript-coverage.mjs | 1 - 48 files changed, 50 insertions(+), 872 deletions(-) delete mode 100644 benchmark/fixtures/transform-types-benchmark.js delete mode 100644 benchmark/fixtures/transform-types-benchmark.ts delete mode 100644 benchmark/ts/transform-typescript.js delete mode 100644 test/es-module/test-typescript-transform.mjs create mode 100644 test/fixtures/rc/strip-types.json delete mode 100644 test/fixtures/rc/transform-types.json delete mode 100644 test/fixtures/source-map/output/source_map_assert_source_line.snapshot delete mode 100644 test/fixtures/source-map/output/source_map_assert_source_line.ts delete mode 100644 test/fixtures/typescript/cts/test-import-require.cts delete mode 100644 test/fixtures/typescript/ts/transformation/test-decorator.ts delete mode 100644 test/fixtures/typescript/ts/transformation/test-enum-stacktrace.ts delete mode 100644 test/fixtures/typescript/ts/transformation/test-enum.ts delete mode 100644 test/fixtures/typescript/ts/transformation/test-legacy-module.ts delete mode 100644 test/fixtures/typescript/ts/transformation/test-modern-typescript.ts delete mode 100644 test/fixtures/typescript/ts/transformation/test-namespace.ts delete mode 100644 test/fixtures/typescript/ts/transformation/test-transformed-typescript.js delete mode 100644 test/fixtures/typescript/ts/transformation/test-unused-import.ts delete mode 100644 test/parallel/test-compile-cache-typescript-strip-miss.js delete mode 100644 test/parallel/test-compile-cache-typescript-transform.js diff --git a/benchmark/fixtures/transform-types-benchmark.js b/benchmark/fixtures/transform-types-benchmark.js deleted file mode 100644 index c0946942179fe3..00000000000000 --- a/benchmark/fixtures/transform-types-benchmark.js +++ /dev/null @@ -1,28 +0,0 @@ -var Color; -(function (Color) { - Color[Color["Red"] = 0] = "Red"; - Color[Color["Green"] = 1] = "Green"; - Color[Color["Blue"] = 2] = "Blue"; -})(Color || (Color = {})); -var Geometry; -(function (Geometry) { - class Circle { - constructor(center, radius) { - this.center = center; - this.radius = radius; - } - area() { - return Math.PI * Math.pow(this.radius, 2); - } - } - Geometry.Circle = Circle; -})(Geometry || (Geometry = {})); -function processShape(color, shape) { - const colorName = Color[color]; - const area = shape.area().toFixed(2); - return `A ${colorName} circle with area ${area}`; -} - -const point = { x: 0, y: 0 }; -const circle = new Geometry.Circle(point, 5); -export const result = processShape(Color.Blue, circle); diff --git a/benchmark/fixtures/transform-types-benchmark.ts b/benchmark/fixtures/transform-types-benchmark.ts deleted file mode 100644 index 69c13af4ee4d7c..00000000000000 --- a/benchmark/fixtures/transform-types-benchmark.ts +++ /dev/null @@ -1,30 +0,0 @@ -enum Color { - Red, - Green, - Blue -} - -namespace Geometry { - export interface Point { - x: number; - y: number; - } - - export class Circle { - constructor(public center: Point, public radius: number) { } - - area(): number { - return Math.PI * this.radius ** 2; - } - } -} - -function processShape(color: Color, shape: Geometry.Circle): string { - const colorName = Color[color]; - const area = shape.area().toFixed(2); - return `A ${colorName} circle with area ${area}`; -} - -const point: Geometry.Point = { x: 0, y: 0 }; -const circle = new Geometry.Circle(point, 5); -export const result = processShape(Color.Blue, circle); diff --git a/benchmark/ts/transform-typescript.js b/benchmark/ts/transform-typescript.js deleted file mode 100644 index 59a78eccae3ff1..00000000000000 --- a/benchmark/ts/transform-typescript.js +++ /dev/null @@ -1,26 +0,0 @@ -'use strict'; - -const common = require('../common'); -const path = require('path'); -const assert = require('node:assert'); - -const js = path.resolve(__dirname, '../fixtures/transform-types-benchmark.js'); -const ts = path.resolve(__dirname, '../fixtures/transform-types-benchmark.ts'); - -const bench = common.createBenchmark(main, { - filepath: [js, ts], - n: [1e4], -}, { - flags: ['--experimental-transform-types', '--disable-warning=ExperimentalWarning'], -}); - -async function main({ n, filepath }) { - let output; - bench.start(); - for (let i = 0; i < n; i++) { - const { result } = await import(`${filepath}?${i}`); - output = result; - } - bench.end(n); - assert.ok(output); -} diff --git a/doc/api/cli.md b/doc/api/cli.md index b21170e02b76a7..5e34051f1ce0e3 100644 --- a/doc/api/cli.md +++ b/doc/api/cli.md @@ -1315,17 +1315,6 @@ Enable module mocking in the test runner. This feature requires `--allow-worker` if used with the [Permission Model][]. -### `--experimental-transform-types` - - - -> Stability: 1.2 - Release candidate - -Enables the transformation of TypeScript-only syntax into JavaScript code. -Implies `--enable-source-maps`. - ### `--experimental-vm-modules` > Stability: 1.2 - Release candidate @@ -253,9 +257,6 @@ added: * `options` {Object} * `mode` {string} **Default:** `'strip'`. Possible values are: * `'strip'` Only strip type annotations without performing the transformation of TypeScript features. - * `'transform'` Strip type annotations and transform TypeScript features to JavaScript. - * `sourceMap` {boolean} **Default:** `false`. Only when `mode` is `'transform'`, if `true`, a source map - will be generated for the transformed code. * `sourceUrl` {string} Specifies the source url used in the source map. * Returns: {string} The code with type annotations stripped. `module.stripTypeScriptTypes()` removes type annotations from TypeScript code. It @@ -264,10 +265,6 @@ added: By default, it will throw an error if the code contains TypeScript features that require transformation such as `Enums`, see [type-stripping][] for more information. - When mode is `'transform'`, it also transforms TypeScript features to JavaScript, - see [transform TypeScript features][] for more information. - When mode is `'strip'`, source maps are not generated, because locations are preserved. - If `sourceMap` is provided, when mode is `'strip'`, an error will be thrown. _WARNING_: The output of this function should not be considered stable across Node.js versions, due to changes in the TypeScript parser. @@ -306,40 +303,6 @@ console.log(strippedCode); // Prints: const a = 1\n\n//# sourceURL=source.ts; ``` -When `mode` is `'transform'`, the code is transformed to JavaScript: - -```mjs -import { stripTypeScriptTypes } from 'node:module'; -const code = ` - namespace MathUtil { - export const add = (a: number, b: number) => a + b; - }`; -const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true }); -console.log(strippedCode); -// Prints: -// var MathUtil; -// (function(MathUtil) { -// MathUtil.add = (a, b)=>a + b; -// })(MathUtil || (MathUtil = {})); -// # sourceMappingURL=data:application/json;base64, ... -``` - -```cjs -const { stripTypeScriptTypes } = require('node:module'); -const code = ` - namespace MathUtil { - export const add = (a: number, b: number) => a + b; - }`; -const strippedCode = stripTypeScriptTypes(code, { mode: 'transform', sourceMap: true }); -console.log(strippedCode); -// Prints: -// var MathUtil; -// (function(MathUtil) { -// MathUtil.add = (a, b)=>a + b; -// })(MathUtil || (MathUtil = {})); -// # sourceMappingURL=data:application/json;base64, ... -``` - ### `module.syncBuiltinESMExports()` + +* Type: {Object} + +An object for getting and setting SQLite database limits at runtime. +Each property corresponds to an SQLite limit and can be read or written. + +```js +const db = new DatabaseSync(':memory:'); + +// Read current limit +console.log(db.limits.length); + +// Set a new limit +db.limits.sqlLength = 100000; + +// Reset a limit to its compile-time maximum +db.limits.sqlLength = Infinity; +``` + +Available properties: `length`, `sqlLength`, `column`, `exprDepth`, +`compoundSelect`, `vdbeOp`, `functionArg`, `attach`, `likePatternLength`, +`variableNumber`, `triggerDepth`. + +Setting a property to `Infinity` resets the limit to its compile-time maximum value. + ### `database.open()`