From f7f5189753278fb415cb0031aeeccbed90b6008a Mon Sep 17 00:00:00 2001 From: Denis Pushkarev Date: Tue, 8 Nov 2022 05:13:55 +0700 Subject: [PATCH] move `modules-by-versions` check to `tests/compat-data/` and run on ci --- package.json | 8 ++++---- tests/compat-data/index.mjs | 1 + .../compat-data/modules-by-versions.mjs | 0 tests/eslint/eslint.config.js | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) create mode 100644 tests/compat-data/index.mjs rename scripts/check-compat-data-modules-by-versions.mjs => tests/compat-data/modules-by-versions.mjs (100%) diff --git a/package.json b/package.json index 38f5c0afd806..16d4c5273a29 100644 --- a/package.json +++ b/package.json @@ -23,10 +23,9 @@ "check-compat-tests": "zx scripts/check-compat-tests.mjs", "check-dependencies": "npm run zxi scripts/check-dependencies/check-dependencies.mjs", "check-mapping": "zx scripts/check-compat-data-mapping.mjs", - "check-modules-by-versions": "zx scripts/check-compat-data-modules-by-versions.mjs", "check-unused-modules": "zx scripts/check-unused-modules.mjs", "check-v8-protectors": "node --trace-protector-invalidation packages/core-js", - "check": "run-s check-v8-protectors check-unused-modules check-compat-tests check-modules-by-versions check-mapping check-dependencies", + "check": "run-s check-v8-protectors check-unused-modules check-compat-tests check-mapping check-dependencies", "compat-bun": "bun tests/compat/bun-runner.js", "compat-deno": "deno run --allow-read tests/compat/deno-runner.mjs", "compat-hermes": "zx tests/compat/hermes-adapter.mjs", @@ -41,11 +40,12 @@ "test-observables": "npm run zxi cd tests/observables/runner.mjs", "test-entries": "zx tests/entries/index.mjs", "test-builder": "zx tests/builder/builder.mjs", + "test-compat-data": "zx tests/compat-data/index.mjs", "test-compat-tools": "zx tests/compat-tools/index.mjs", "test262": "npm run zxi tests/test262/runner.mjs", - "test": "run-s init test-lint bundle test-unit test-promises test-observables test-entries test-compat-tools test-builder check", + "test": "run-s init test-lint bundle test-unit test-promises test-observables test-entries test-compat-data test-compat-tools test-builder check", "ci-karma": "run-s init bundle test-unit-karma", - "ci-tests": "run-s init bundle test-unit-node test-entries test-compat-tools test-builder", + "ci-tests": "run-s init bundle test-unit-node test-entries test-compat-data test-compat-tools test-builder", "ci-promises-and-observables": "run-s init test-promises test-observables", "clean-dependencies": "node scripts/clean-dependencies.mjs", "refresh": "npm run clean-dependencies && npm it", diff --git a/tests/compat-data/index.mjs b/tests/compat-data/index.mjs new file mode 100644 index 000000000000..ad9b2b916bd3 --- /dev/null +++ b/tests/compat-data/index.mjs @@ -0,0 +1 @@ +import './modules-by-versions.mjs'; diff --git a/scripts/check-compat-data-modules-by-versions.mjs b/tests/compat-data/modules-by-versions.mjs similarity index 100% rename from scripts/check-compat-data-modules-by-versions.mjs rename to tests/compat-data/modules-by-versions.mjs diff --git a/tests/eslint/eslint.config.js b/tests/eslint/eslint.config.js index 7c720fee38fb..f431e7138f04 100644 --- a/tests/eslint/eslint.config.js +++ b/tests/eslint/eslint.config.js @@ -1276,7 +1276,7 @@ module.exports = [ 'packages/core-js-compat/src/**', 'scripts/**', 'tests/compat/*.mjs', - 'tests/@(compat-tools|eslint|entries|observables|promises-aplus|unit-@(karma|node))/**', + 'tests/@(compat-@(data|tools)|eslint|entries|observables|promises-aplus|unit-@(karma|node))/**', ], rules: nodeDev, },