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
2 changes: 1 addition & 1 deletion .github/workflows/timezone-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
with:
author: Node.js GitHub Bot <github-bot@iojs.org>
body: |
This PR was generated by tools/timezone-update.yml.
This PR was generated by `.github/workflows/timezone-update.yml` and `tools/update-timezone.mjs`.
Updates the ICU files as per the instructions present in https://github.com/nodejs/node/blob/main/doc/contributing/maintaining/maintaining-icu.md#time-zone-data
Expand Down
2 changes: 0 additions & 2 deletions deps/crates/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 15 additions & 4 deletions deps/crates/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,36 @@ crate-type = ["staticlib"]

[dependencies]
# Pin all temporal dependencies to the last version support rustc 1.82
icu_calendar = "~2.0.0"
icu_calendar_data = "~2.0.0"
icu_collections = "~2.0.0"
icu_locale = "~2.0.0"
icu_locale_core = "~2.0.0"
icu_locale_data = "~2.0.0"
icu_provider = "~2.0.0"
timezone_provider = "=0.1.0"

[dependencies.temporal_capi]
version = "=0.1.0"
features = ["zoneinfo64"]
default-features = false

[dependencies.temporal_rs]
version = "=0.1.0"
default-features = false
# This is necessary to enable a spec-compliance quirk when upgrading to v0.1.2
# features = ["float64_representable_durations"]

# Disable `icu_calendar_data` and `icu_locale_data` crates with disabling
# `compiled_data` features. However these datasets are still enabled until
# https://github.com/boa-dev/temporal/pull/694 lands.
[dependencies.icu_calendar]
version = "~2.0.0"
features = [
"ixdtf", # Parser for Internet eXtended DateTime Format
]
default-features = false

[dependencies.icu_locale]
version = "~2.0.0"
default-features = false

[patch.crates-io]
# Float https://github.com/unicode-org/icu4x/pull/7658 until crate is updated.
resb = { path="patches/resb" }
2 changes: 1 addition & 1 deletion doc/api/environment_variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ There following two functions allow you to directly interact with `.env` files:

* [`process.loadEnvFile`][] loads an `.env` file and populates `process.env` with its variables

* [`util.parseEnv`][] parses the row content of an `.env` file and returns its value in an object
* [`util.parseEnv`][] parses the raw content of an `.env` file and returns its value in an object

[CLI Environment Variables documentation]: cli.md#environment-variables_1
[`--env-file-if-exists=file`]: cli.md#--env-file-if-existsfile
Expand Down
38 changes: 38 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const { default: js } = await importEslintTool('@eslint/js');
const { default: babelEslintParser } = await importEslintTool('@babel/eslint-parser');
const babelPluginSyntaxImportSource = resolveEslintTool('@babel/plugin-syntax-import-source');
const { default: jsdoc } = await importEslintTool('eslint-plugin-jsdoc');
const { default: regexpPlugin } = await importEslintTool('eslint-plugin-regexp');
const { default: markdown } = await importEslintTool('@eslint/markdown');
const { default: stylisticJs } = await importEslintTool('@stylistic/eslint-plugin');

Expand Down Expand Up @@ -84,6 +85,7 @@ export default [
// #region general config
js.configs.recommended,
jsdoc.configs['flat/recommended'],
regexpPlugin.configs.recommended,
{
files: ['**/*.js'],
languageOptions: {
Expand Down Expand Up @@ -275,6 +277,42 @@ export default [
'jsdoc/reject-any-type': 'off',
'jsdoc/reject-function-type': 'off',

// RegExp recommended rules that we disable.
// Todo: Investigate which rules should be enabled.
'prefer-regex-literals': 'off',
'regexp/control-character-escape': 'off',
'regexp/match-any': 'off',
'regexp/negation': 'off',
'regexp/no-contradiction-with-assertion': 'off',
'regexp/no-dupe-characters-character-class': 'off',
'regexp/no-dupe-disjunctions': 'off',
'regexp/no-empty-alternative': 'off',
'regexp/no-legacy-features': 'off',
'regexp/no-misleading-capturing-group': 'off',
'regexp/no-obscure-range': 'off',
'regexp/no-potentially-useless-backreference': 'off',
'regexp/no-super-linear-backtracking': 'off',
'regexp/no-trivially-nested-quantifier': 'off',
'regexp/no-unused-capturing-group': 'off',
'regexp/no-useless-assertions': 'off',
'regexp/no-useless-character-class': 'off',
'regexp/no-useless-escape': 'off',
'regexp/no-useless-flag': 'off',
'regexp/no-useless-lazy': 'off',
'regexp/no-useless-non-capturing-group': 'off',
'regexp/no-useless-quantifier': 'off',
'regexp/no-useless-range': 'off',
'regexp/optimal-lookaround-quantifier': 'off',
'regexp/optimal-quantifier-concatenation': 'off',
'regexp/prefer-character-class': 'off',
'regexp/prefer-d': 'off',
'regexp/prefer-question-quantifier': 'off',
'regexp/prefer-star-quantifier': 'off',
'regexp/prefer-w': 'off',
'regexp/sort-flags': 'off',
'regexp/strict': 'off',
'regexp/use-ignore-case': 'off',

// Stylistic rules.
'@stylistic/js/arrow-parens': 'error',
'@stylistic/js/arrow-spacing': 'error',
Expand Down
3 changes: 3 additions & 0 deletions lib/internal/test_runner/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,9 @@ function countCompletedTest(test, harness = test.root.harness) {
}
if (test.reportedType === 'suite') {
harness.counters.suites++;
if (!test.passed) {
harness.success = false;
}
return;
}
// Check SKIP and TODO tests first, as those should not be counted as
Expand Down
3 changes: 2 additions & 1 deletion src/node_sqlite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2157,7 +2157,8 @@ void DatabaseSync::ApplyChangeset(const FunctionCallbackInfo<Value>& args) {

Local<Function> filterFunc = filterValue.As<Function>();

context.filterCallback = [&](std::string_view item) -> bool {
context.filterCallback =
[env, db, filterFunc](std::string_view item) -> bool {
// If there was an error in the previous call to the filter's
// callback, we skip calling it again.
if (db->ignore_next_sqlite_error_) {
Expand Down
10 changes: 10 additions & 0 deletions test/fixtures/test-runner/describe_error.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
'use strict';
const { describe, it } = require('node:test');

describe('should fail', () => {
throw new Error('error in describe');
});

describe('should pass', () => {
it('ok', () => {});
});
8 changes: 8 additions & 0 deletions test/parallel/test-runner-exit-code.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,14 @@ if (process.argv[2] === 'child') {
assert.strictEqual(child.status, 1);
assert.strictEqual(child.signal, null);

// An error thrown inside describe() should cause a non-zero exit code.
child = spawnSync(process.execPath, [
'--test',
fixtures.path('test-runner', 'describe_error.js'),
]);
assert.strictEqual(child.status, 1);
assert.strictEqual(child.signal, null);

// With process isolation (default), the test name shown is the file path
// because the parent runner only knows about file-level tests
const neverEndingSync = fixtures.path('test-runner', 'never_ending_sync.js');
Expand Down
65 changes: 65 additions & 0 deletions tools/eslint/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions tools/eslint/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"eslint": "^10.0.2",
"eslint-formatter-tap": "^9.0.1",
"eslint-plugin-jsdoc": "^62.7.1",
"eslint-plugin-regexp": "^3.0.0",
"globals": "^17.3.0"
}
}
Loading