Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 3 additions & 9 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,7 @@ def configure_node_lib_files(o):
o['variables']['node_library_files'] = SearchFiles('lib', 'js')

def configure_node_cctest_sources(o):
o['variables']['node_cctest_sources'] = [ 'src/node_snapshot_stub.cc' ] + \
o['variables']['node_cctest_sources'] = [] + \
SearchFiles('test/cctest', 'cc') + \
SearchFiles('test/cctest', 'h')

Expand Down Expand Up @@ -1886,10 +1886,6 @@ def configure_node(o):
o['variables']['arm_fpu'] = options.arm_fpu or 'neon'

if options.node_snapshot_main is not None:
if options.shared:
# This should be possible to fix, but we will need to refactor the
# libnode target to avoid building it twice.
error('--node-snapshot-main is incompatible with --shared')
if options.without_node_snapshot:
error('--node-snapshot-main is incompatible with ' +
'--without-node-snapshot')
Expand All @@ -1900,17 +1896,15 @@ def configure_node(o):
if options.without_node_snapshot or options.node_builtin_modules_path:
o['variables']['node_use_node_snapshot'] = 'false'
else:
o['variables']['node_use_node_snapshot'] = b(
not cross_compiling and not options.shared)
o['variables']['node_use_node_snapshot'] = b(not cross_compiling)

# Do not use code cache when Node.js is built for collecting coverage of itself, this allows more
# precise coverage for the JS built-ins.
if options.without_node_code_cache or options.without_node_snapshot or options.node_builtin_modules_path or options.coverage:
o['variables']['node_use_node_code_cache'] = 'false'
else:
# TODO(refack): fix this when implementing embedded code-cache when cross-compiling.
o['variables']['node_use_node_code_cache'] = b(
not cross_compiling and not options.shared)
o['variables']['node_use_node_code_cache'] = b(not cross_compiling)

if options.write_snapshot_as_array_literals is not None:
o['variables']['node_write_snapshot_as_array_literals'] = b(options.write_snapshot_as_array_literals)
Expand Down
4 changes: 2 additions & 2 deletions deps/amaro/dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion deps/amaro/dist/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"강동윤 <kdy1997.dev@gmail.com>"
],
"description": "wasm module for swc",
"version": "1.15.30",
"version": "1.15.40",
"license": "Apache-2.0",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion deps/amaro/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "amaro",
"version": "1.1.9",
"version": "1.1.10",
"description": "Node.js TypeScript wrapper",
"license": "MIT",
"type": "commonjs",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,8 @@ GTEST_API_ bool ExitedUnsuccessfully(int exit_status);
goto GTEST_CONCAT_TOKEN_(gtest_label_, __LINE__); \
} \
if (gtest_dt != nullptr) { \
std::unique_ptr< ::testing::internal::DeathTest> gtest_dt_ptr(gtest_dt); \
const std::unique_ptr< ::testing::internal::DeathTest> gtest_dt_ptr( \
gtest_dt); \
switch (gtest_dt->AssumeRole()) { \
case ::testing::internal::DeathTest::OVERSEE_TEST: \
if (!gtest_dt->Passed(predicate(gtest_dt->Wait()))) { \
Expand Down
4 changes: 2 additions & 2 deletions doc/api/net.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ added:

### `blockList.fromJSON(value)`

> Stability: 1 - Experimental
> Stability: 1.2 - Release candidate

<!-- YAML
added:
Expand All @@ -207,7 +207,7 @@ blockList.fromJSON(JSON.stringify(data));

### `blockList.toJSON()`

> Stability: 1 - Experimental
> Stability: 1.2 - Release candidate

<!-- YAML
added:
Expand Down
11 changes: 11 additions & 0 deletions doc/api/worker_threads.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,17 @@

<!--introduced_in=v10.5.0-->

<!-- YAML
added: v10.5.0
changes:
- version: v12.11.0
pr-url: https://github.com/nodejs/node/pull/29512

Check warning on line 9 in doc/api/worker_threads.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: This API is no longer experimental.
- version: v11.7.0
pr-url: https://github.com/nodejs/node/pull/25361

Check warning on line 12 in doc/api/worker_threads.md

View workflow job for this annotation

GitHub Actions / lint-pr-url

pr-url doesn't match the URL of the current PR.
description: This API is no longer behind the `--experimental-worker` CLI flag.
-->

> Stability: 2 - Stable

<!-- source_link=lib/worker_threads.js -->
Expand Down
1 change: 1 addition & 0 deletions lib/internal/fs/glob.js
Original file line number Diff line number Diff line change
Expand Up @@ -947,5 +947,6 @@ function matchGlobPattern(path, pattern, windows = isWindows) {
module.exports = {
__proto__: null,
Glob,
createMatcher,
matchGlobPattern,
};
7 changes: 6 additions & 1 deletion lib/internal/navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ function getNavigatorPlatform(arch, platform) {
}

class Navigator {
// Private properties are used to avoid brand validations.
// Private properties are used to avoid brand validations: reading a private
// field from a non-Navigator receiver throws a TypeError on its own.
#availableParallelism;
#locks;
#userAgent;
Expand Down Expand Up @@ -113,6 +114,10 @@ class Navigator {
* @returns {string}
*/
get language() {
// `language` does not read a private field, so brand-check explicitly
// to keep parity with the other getters when called on a non-Navigator
// receiver (e.g. `Navigator.prototype.language`).
this.#languages; // eslint-disable-line no-unused-expressions
// The default locale might be changed dynamically, so always invoke the
// binding.
return getDefaultLocale() || 'en-US';
Expand Down
46 changes: 28 additions & 18 deletions lib/internal/test_runner/coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const {
ERR_SOURCE_MAP_MISSING_SOURCE,
},
} = require('internal/errors');
const { matchGlobPattern } = require('internal/fs/glob');
const { createMatcher } = require('internal/fs/glob');
const { constants: { kMockSearchParam } } = require('internal/test_runner/mock/loader');

const kCoverageFileRegex = /^coverage-(\d+)-(\d{13})-(\d+)\.json$/;
Expand Down Expand Up @@ -85,6 +85,9 @@ class TestCoverage {

#sourceLines = new SafeMap();
#typeScriptLines = new SafeSet();
#skipCache = new SafeMap();
#excludeMatchers = null;
#includeMatchers = null;

getLines(fileUrl, source) {
// Split the file source into lines. Make sure the lines maintain their
Expand Down Expand Up @@ -534,35 +537,42 @@ class TestCoverage {
}

shouldSkipFileCoverage(url) {
const cached = this.#skipCache.get(url);
if (cached !== undefined) return cached;
const result = this.#computeShouldSkipFileCoverage(url);
this.#skipCache.set(url, result);
return result;
}

#computeShouldSkipFileCoverage(url) {
// This check filters out core modules, which start with 'node:' in
// coverage reports, as well as any invalid coverages which have been
// observed on Windows.
if (!StringPrototypeStartsWith(url, 'file:')) return true;

const absolutePath = fileURLToPath(url);
const relativePath = relative(this.options.cwd, absolutePath);
const {
coverageExcludeGlobs: excludeGlobs,
coverageIncludeGlobs: includeGlobs,
} = this.options;
// The exclude/include globs are fixed for the lifetime of this
// TestCoverage instance, so compile each glob to a matcher once and reuse
// it for every file. Building a fresh Minimatch per call (the previous
// behavior) dominated the coverage report time, scaling with
// files * globs.
this.#excludeMatchers ??= ArrayPrototypeMap(
this.options.coverageExcludeGlobs ?? [], (pattern) => createMatcher(pattern));
this.#includeMatchers ??= ArrayPrototypeMap(
this.options.coverageIncludeGlobs ?? [], (pattern) => createMatcher(pattern));

// This check filters out files that match the exclude globs.
if (excludeGlobs?.length > 0) {
for (let i = 0; i < excludeGlobs.length; ++i) {
if (
matchGlobPattern(relativePath, excludeGlobs[i]) ||
matchGlobPattern(absolutePath, excludeGlobs[i])
) return true;
}
for (let i = 0; i < this.#excludeMatchers.length; ++i) {
const matcher = this.#excludeMatchers[i];
if (matcher.match(relativePath) || matcher.match(absolutePath)) return true;
}

// This check filters out files that do not match the include globs.
if (includeGlobs?.length > 0) {
for (let i = 0; i < includeGlobs.length; ++i) {
if (
matchGlobPattern(relativePath, includeGlobs[i]) ||
matchGlobPattern(absolutePath, includeGlobs[i])
) return false;
if (this.#includeMatchers.length > 0) {
for (let i = 0; i < this.#includeMatchers.length; ++i) {
const matcher = this.#includeMatchers[i];
if (matcher.match(relativePath) || matcher.match(absolutePath)) return false;
}
return true;
}
Expand Down
Loading
Loading