Commit Graph

6805 Commits

Author SHA1 Message Date
Philip Chimento 5c8a66d34b Update indentation in editorconfig
We have .mjs files now in the regexp-generator tool. Extend the same
indentation from .js files to cover them as well.
2024-11-11 17:26:56 -08:00
Philip Chimento 9a0aa4c719 regexp-generator: Fix indentation
Our config files specify two-space indents for JS files. These scripts
were probably written before that was a thing. Update the indentation of
the script and the generated tests all in one go.
2024-11-11 17:26:56 -08:00
Philip Chimento 7e1f1e749d regexp-generator: Update ECMA-262 quote in header
While we're touching this we may as well update the quote from ECMA-262 to
match what it currently says.
2024-11-11 17:26:56 -08:00
Philip Chimento 3aec6e3729 regexp-generator: Make package private
As per the package.json docs, these are optional if the package is not
being published.
2024-11-11 17:26:56 -08:00
Philip Chimento 684aec777f regexp-generator: Include these generated tests in make.py
This is necessary so that updates to the tests without corresponding
updates to the generator script will be flagged in CI runs.
2024-11-11 17:26:56 -08:00
Philip Chimento 031ed02ad1 regexp-generator: Update front matter
Add the `generated` flag, and update the link to the generator script.
2024-11-11 17:26:56 -08:00
Philip Chimento 54e02bdd56 regexp-generator: Remove dead code
These are unused parameters and variables, and all have no effect on the
output.
2024-11-11 17:26:56 -08:00
Philip Chimento 07ddc3b41b regexp-generator: Implement downstream changes
The optimizations from commit e558b29b were never incorporated into the
upstream test generator. This does so now.

As far as I can tell, the changes to the Unicode ranges are purely
cosmetic. Some are formatted as 6-digit hex numbers instead of 4-digit.
Others move the low-surrogates range 0xDC00-0xDCFF to the beginning of the
array, but the union of the ranges is still the same.
2024-11-11 17:26:56 -08:00
Philip Chimento 879326855b regexp-generator: Use ES modules, update dependencies
This code hasn't been touched in a while, so it's probably good to bring
in the newest versions of the dependencies. We can easily tell if there
was any incompatible effect on the output.

The latest version of filenamify requires using ES modules. We also have
to adapt to a breaking change in regexpu-core (see
https://github.com/mathiasbynens/regexpu-core/pull/49).

Also convert the dependencies to devDependencies, since this tool is not
necessary for executing test262.
2024-11-11 17:26:56 -08:00
Philip Chimento 754ecf1ad3 regexp-generator: Expand README
Add some minimal instructions for regenerating the tests.
2024-11-11 17:26:56 -08:00
Philip Chimento a65ca0e6a3 regexp-generator: Add 'npm run clean' script 2024-11-11 17:26:56 -08:00
Philip Chimento e8342c37d5 regexp-generator: Ensure folder exists before generating 2024-11-11 17:26:56 -08:00
Philip Chimento c8c800c845 regexp-generator: Update output path
Instead of an output/ folder, output the tests directly into the folder
where they live.
2024-11-11 17:26:56 -08:00
Philip Chimento 99be4228ef Add files from bocoup/test262-regexp-generator
Old upstream: https://github.com/bocoup/test262-regexp-generator
2024-11-11 17:26:56 -08:00
Philip Chimento 24e46d9bc9 Combine push and PR actions
This reduces duplication, with the tradeoff of having some steps in the
linter job that are mutually exclusive depending on the job trigger.
2024-11-11 16:48:38 -08:00
Philip Chimento 5be2025369 Use changed-files action in ESMeta job as well
Since we are using it in the other jobs, we may as well use it here. As a
bonus, it will make the job work even if the target of the pull request
isn't the main branch.
2024-11-11 16:48:38 -08:00
Philip Chimento 7f4aa49ccd Test tools only if they were modified
Most of the time, we are not committing changes to the tools. Move the
unit tests for the lint and generation tools to a separate PR workflow,
that is only run if anything in the tools/ folder is modified in the PR.

This saves time in the normal case.
2024-11-11 16:48:38 -08:00
Philip Chimento b292eb95c3 Remove ci_build.sh
After the previous commit, it doesn't do much. Just write its contents
directly in the workflow step.
2024-11-11 16:48:38 -08:00
Philip Chimento c73968aaaf Migrate test generation workflow to GitHub Actions
This runs faster and allows for future improvements.

Similar to the linter workflow, we remove the Circle-CI-specific stuff
from the file in tools/scripts/, and into .github/workflows/.

We use another external action (tj-actions/verify-changed-files) to check
that generating the tests didn't create any new changes. This is basically
a companion action to the tj-actions/changed-files used in the linter job.
2024-11-11 16:48:38 -08:00
Philip Chimento 15b7a780b3 Add annotations in the PR for linter errors
This should help contributors notice and fix linter errors when they
occur. Apparently it's as easy as printing a magic string to stdout, who
knew!

The lint tool doesn't give line numbers so we place the annotations at
line 1 for the time being.
2024-11-11 16:48:38 -08:00
Philip Chimento 0df1565532 Remove ci_lint.sh
After the previous commit, it doesn't do much, only passes the linting
exceptions file on the command line. Instead, make the lint.exceptions
file the default for that argument (if it exists), and remove the shell
script.
2024-11-11 16:48:38 -08:00
Philip Chimento 7fc86bca6a Migrate linter workflow to GitHub Actions
This runs faster and allows for future improvements.

I'm following a general principle of keeping code that isn't portable
between CI providers inside the config file for the CI provider. So in
this case we remove the Circle-CI-specific stuff from the file in
tools/scripts/, and into .github/workflows/. We use an external action
(tj-actions/changed-files) to gather the list of files to lint.
2024-11-11 16:48:38 -08:00
Philip Chimento 6b38428da1 Remove obsolete deploy scripts
We do not use these anymore. Generated tests are included in PRs and not
deployed separately. The deploy key encryption relies on TravisCI which we
don't use anymore, anyway.
2024-11-11 16:48:38 -08:00
Philip Chimento 71f7cfab83 Update indentation in editorconfig
Applying only to .travis.yml seems to be a relic from when that was the
only YAML file in the repo. Extend it to all YAML files.
2024-11-11 16:48:38 -08:00
Philip Chimento 80c49657d3 Temporal: Fix name of constructor
I mistakenly committed something slightly different in my code review
suggestion than what I had modified locally.
2024-11-08 11:18:43 +01:00
André Bargull e7024c1761 Disable grouping for numeric units in Intl.DurationFormat 2024-11-07 14:19:18 -08:00
Tim Chevalier 1128b6fcd2 Temporal: Add test case for rounding up to a non-24-hour ZonedDateTime 2024-11-07 14:13:27 -08:00
Tim Chevalier 81df127d54
Temporal: Add test case for rounding Duration relative to a ZonedDateTime (#4306)
This is the test for the change in tc39/proposal-temporal#3036 and is a variation of the test from tc39/proposal-temporal#2814 .
2024-11-07 12:22:28 -08:00
André Bargull 26a396da14 Add test coverage for Date.prototype.toTemporalInstant 2024-11-07 11:45:32 +01:00
Ioanna M Dimitriou H 437f9a7631
Migrate staging tests for JSON-parse-with-source (#4265)
Co-authored-by: Philip Chimento <pchimento@igalia.com>
Co-authored-by: Ms2ger <Ms2ger@igalia.com>
2024-11-06 16:59:30 +01:00
Tim Chevalier b2809feedf
Temporal: Add test for Duration/p/toString() with total time units out of range (#4313) 2024-11-06 16:47:58 +01:00
Jordan Harband 38d52c9a60 `Error.isError`: fix remaining issues from #4304
Fixes #4304
2024-11-06 13:05:41 +01:00
Jordan Harband a2f43d68d4
Error.isError: Fix test bugs (#4308) 2024-11-05 11:17:39 -05:00
Tim Chevalier ab69bd4dd8
Temporal: Add test for date with offset transition (#4301)
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-11-01 13:43:05 -07:00
Tim Chevalier 01eb47d4f2 Add tests for adding negative durations to/subtracting durations from the last representable year/month of the ISO calendar
See https://github.com/tc39/proposal-temporal/issues/3029
2024-11-01 12:57:28 -07:00
Tim Chevalier 45f352d37b
Temporal: Add test for setting minimum valid year-month with non-ISO8601 calendar (#2998) (#4300) 2024-11-01 11:14:22 -07:00
Tim Chevalier b7822bb0b8
Temporal: Move tests for ZonedDateTime/p/{since, until} out of staging (#4293)
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-11-01 11:02:32 -07:00
Tim Chevalier ccf8977b1c Temporal: Split up ZonedDateTime/old/string-parsing.js and move out of staging 2024-10-31 16:05:30 -07:00
Tim Chevalier 8cc0560713
Temporal: Move all tests out of ZonedDateTime/old/with.js under staging into separate files under test/built-ins (#4297)
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-10-31 13:34:57 -07:00
Tim Chevalier 0f6b269400 Temporal: Move ZonedDateTime order-of-operations tests out of staging 2024-10-31 13:13:20 -07:00
Tim Chevalier bf46ed66b6 Temporal: move tests for ZonedDateTime/p/{toInstant, toPlainDate, toPlainTime, toString} 2024-10-31 13:08:38 -07:00
Tim Chevalier 7a4426e2b2 Temporal: Move remaining tests from Temporal/ZonedDateTime/old under staging into separate files under test/built-ins
Includes withPlainDateTime and withTimeZone
2024-10-31 11:58:25 -07:00
Ben Allen 38d2924fb6
402: Replace currency-digits.js Intl.NumberFormat test (#4285)
ISO 4217 no longer normative for currency minor digits. New test verifies that
currency data (from whatever source) is used by verifying that `maximumFractionDigits` and `minimumFractionDigits`
are identical. See https://github.com/tc39/ecma402/pull/922
2024-10-31 11:39:44 -07:00
Tim Chevalier de68177f59 Temporal: Move ZonedDateTime/prototype/round tests and one other ZonedDateTime test out of staging 2024-10-30 17:58:43 -07:00
Tim Chevalier 70ef1acd1c Fix test for required properties 2024-10-30 17:18:26 -07:00
Tim Chevalier 7fb465496f Feedback from code review 2024-10-30 17:18:26 -07:00
Tim Chevalier d2d84950c3 Update test/built-ins/Temporal/ZonedDateTime/from/argument-propertybag-invalid-offset-string.js
Co-authored-by: Philip Chimento <philip.chimento@gmail.com>
2024-10-30 17:18:26 -07:00
Tim Chevalier a93fe76f52 Temporal: Move ZonedDateTime property bag tests out of staging 2024-10-30 17:18:26 -07:00
Tim Chevalier 87344d96f2 Feedback from code review 2024-10-30 17:03:46 -07:00
Tim Chevalier bfb957f669 Temporal: Move more ZonedDateTime tests out of staging 2024-10-30 17:03:46 -07:00