diff --git a/package.json b/package.json index ff131382fc1..f4c8c8e982d 100644 --- a/package.json +++ b/package.json @@ -1,19 +1,15 @@ { "name": "root", - "version": "4.9.0-alpha.13", + "version": "4.9.0-alpha.14", "private": true, "repository": { "type": "git", "url": "git+ssh://git@github.com:emberjs/data.git" }, - "pre-commit": [ - "lint:js:changed" - ], "scripts": { "build-v2-addons": "pnpm --filter @ember-data/tracking build", "build:docs": "mkdir -p packages/-ember-data/dist && cd ./docs-generator && node ./compile-docs.js", "lint:js": "eslint --cache --ext=js,ts .", - "lint:js:changed": "node ./scripts/lint-changed-js.js", "preinstall": "npx only-allow pnpm", "problems": "tsc -p tsconfig.json --noEmit --pretty false", "test": "pnpm --filter main-test-app --filter graph-test-app run test", @@ -128,9 +124,6 @@ "json-typescript": "^1.1.2", "lerna-changelog": "^2.2.0", "loader.js": "^4.7.0", - "npm-git-info": "^1.0.3", - "pre-commit": "^1.2.2", - "pretender": "^3.4.7", "prettier": "^2.7.1", "qunit": "^2.19.3", "qunit-dom": "^2.0.0", @@ -174,4 +167,4 @@ "@embroider/macros@1.9.0": "patches/@embroider__macros@1.9.0.patch" } } -} \ No newline at end of file +} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cd923963c72..f592405947a 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -102,9 +102,6 @@ importers: json-typescript: ^1.1.2 lerna-changelog: ^2.2.0 loader.js: ^4.7.0 - npm-git-info: ^1.0.3 - pre-commit: ^1.2.2 - pretender: ^3.4.7 prettier: ^2.7.1 qunit: ^2.19.3 qunit-dom: ^2.0.0 @@ -212,9 +209,6 @@ importers: json-typescript: 1.1.2 lerna-changelog: 2.2.0 loader.js: 4.7.0 - npm-git-info: 1.0.3 - pre-commit: 1.2.2 - pretender: 3.4.7 prettier: 2.7.1 qunit: 2.19.3 qunit-dom: 2.0.0 @@ -6579,16 +6573,6 @@ packages: /concat-map/0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - /concat-stream/1.6.2: - resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} - engines: {'0': node >= 0.8} - dependencies: - buffer-from: 1.1.2 - inherits: 2.0.4 - readable-stream: 2.3.7 - typedarray: 0.0.6 - dev: true - /configstore/5.0.1: resolution: {integrity: sha512-aMKprgk5YhBNyH25hj8wGt2+D52Sw1DRRIzqBwLp2Ya9mFmY8KPvvtvmna8SxVR9JMZ4kzMD68N22vlaRpkeFA==} engines: {node: '>=8'} @@ -6859,14 +6843,6 @@ packages: object-assign: 4.1.1 vary: 1.1.2 - /cross-spawn/5.1.0: - resolution: {integrity: sha512-pTgQJ5KC0d2hcY8eyL1IzlBPYjTkyH72XRZPnLyKus2mBfNjQs3klqbJU2VILqZryAZUt9JOb3h/mWMy23/f5A==} - dependencies: - lru-cache: 4.1.5 - shebang-command: 1.2.0 - which: 1.2.14 - dev: true - /cross-spawn/6.0.5: resolution: {integrity: sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==} engines: {node: '>=4.8'} @@ -11348,13 +11324,6 @@ packages: engines: {node: '>=8'} dev: true - /lru-cache/4.1.5: - resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} - dependencies: - pseudomap: 1.0.2 - yallist: 2.1.2 - dev: true - /lru-cache/6.0.0: resolution: {integrity: sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==} engines: {node: '>=10'} @@ -12135,11 +12104,6 @@ packages: resolution: {integrity: sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==} engines: {node: '>=0.10.0'} - /os-shim/0.1.3: - resolution: {integrity: sha512-jd0cvB8qQ5uVt0lvCIexBaROw1KyKm5sbulg2fWOHjETisuCzWyt+eTZKEMs8v6HwzoGs8xik26jg7eCM6pS+A==} - engines: {node: '>= 0.4.0'} - dev: true - /os-tmpdir/1.0.2: resolution: {integrity: sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==} engines: {node: '>=0.10.0'} @@ -12442,15 +12406,6 @@ packages: picocolors: 1.0.0 source-map-js: 1.0.2 - /pre-commit/1.2.2: - resolution: {integrity: sha512-qokTiqxD6GjODy5ETAIgzsRgnBWWQHQH2ghy86PU7mIn/wuWeTwF3otyNQZxWBwVn8XNr8Tdzj/QfUXpH+gRZA==} - requiresBuild: true - dependencies: - cross-spawn: 5.1.0 - spawn-sync: 1.0.15 - which: 1.2.14 - dev: true - /prelude-ls/1.1.2: resolution: {integrity: sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==} engines: {node: '>= 0.8.0'} @@ -12505,10 +12460,6 @@ packages: engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} dev: true - /process-nextick-args/2.0.1: - resolution: {integrity: sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==} - dev: true - /process-relative-require/1.0.0: resolution: {integrity: sha512-r8G5WJPozMJAiv8sDdVWKgJ4In/zBXqwJdMCGAXQt2Kd3HdbAuJVzWYM4JW150hWoaI9DjhtbjcsCCHIMxm8RA==} dependencies: @@ -12572,10 +12523,6 @@ packages: forwarded: 0.2.0 ipaddr.js: 1.9.1 - /pseudomap/1.0.2: - resolution: {integrity: sha512-b/YwNhb8lk1Zz2+bXXpS/LK9OisiZZ1SNsSLxN1x2OXVEhW2Ckr/7mWE5vrC1ZTiJlD9g19jWszTmJsB+oEpFQ==} - dev: true - /psl/1.9.0: resolution: {integrity: sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==} dev: true @@ -12709,18 +12656,6 @@ packages: isarray: 0.0.1 string_decoder: 0.10.31 - /readable-stream/2.3.7: - resolution: {integrity: sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==} - dependencies: - core-util-is: 1.0.3 - inherits: 2.0.4 - isarray: 1.0.0 - process-nextick-args: 2.0.1 - safe-buffer: 5.1.2 - string_decoder: 1.1.1 - util-deprecate: 1.0.2 - dev: true - /readable-stream/3.6.0: resolution: {integrity: sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==} engines: {node: '>= 6'} @@ -13522,14 +13457,6 @@ packages: /spawn-args/0.2.0: resolution: {integrity: sha512-73BoniQDcRWgnLAf/suKH6V5H54gd1KLzwYN9FB6J/evqTV33htH9xwV/4BHek+++jzxpVlZQKKZkqstPQPmQg==} - /spawn-sync/1.0.15: - resolution: {integrity: sha512-9DWBgrgYZzNghseho0JOuh+5fg9u6QWhAWa51QC7+U5rCheZ/j1DrEZnyE0RBBRqZ9uEXGPgSSM0nky6burpVw==} - requiresBuild: true - dependencies: - concat-stream: 1.6.2 - os-shim: 0.1.3 - dev: true - /split-string/3.1.0: resolution: {integrity: sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==} engines: {node: '>=0.10.0'} @@ -13629,12 +13556,6 @@ packages: /string_decoder/0.10.31: resolution: {integrity: sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==} - /string_decoder/1.1.1: - resolution: {integrity: sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==} - dependencies: - safe-buffer: 5.1.2 - dev: true - /string_decoder/1.3.0: resolution: {integrity: sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==} dependencies: @@ -14322,10 +14243,6 @@ packages: is-typedarray: 1.0.0 dev: true - /typedarray/0.0.6: - resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - dev: true - /typescript-memoize/1.1.1: resolution: {integrity: sha512-GQ90TcKpIH4XxYTI2F98yEQYZgjNMOGPpOgdjIBhaLaWji5HPWlRnZ4AeA1hfBxtY7bCGDJsqDDHk/KaHOl5bA==} @@ -14779,13 +14696,6 @@ packages: is-string: 1.0.7 is-symbol: 1.0.4 - /which/1.2.14: - resolution: {integrity: sha512-16uPglFkRPzgiUXYMi1Jf8Z5EzN1iB4V0ZtMXcHZnwsBtQhhHeCqoWw7tsUY42hJGNDWtUsVLTjakIa5BgAxCw==} - hasBin: true - dependencies: - isexe: 2.0.0 - dev: true - /which/1.3.1: resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==} hasBin: true @@ -14930,10 +14840,6 @@ packages: engines: {node: '>=10'} dev: true - /yallist/2.1.2: - resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} - dev: true - /yallist/3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} diff --git a/scripts/lint-changed-js.js b/scripts/lint-changed-js.js deleted file mode 100644 index 3d8f2572f68..00000000000 --- a/scripts/lint-changed-js.js +++ /dev/null @@ -1,48 +0,0 @@ -const ESLINT = '.eslintrc.js'; -const fs = require('fs'); -const path = require('path'); - -const execa = require('execa'); - -const projectRoot = path.resolve(__dirname, '../'); -const eslintPath = path.join(projectRoot, ESLINT); -const eslintInfo = require(eslintPath); -const tmpDir = path.join(projectRoot, 'tmp'); -const tmpEslint = path.join(tmpDir, ESLINT); - -function unlinkTemp() { - if (fs.existsSync(tmpEslint)) { - fs.unlinkSync(tmpEslint); - } -} - -// grab only the staged files -let LIST = execa.sync('git diff-index --cached --diff-filter=d --name-only HEAD', { shell: true }).stdout; - -if (LIST) { - LIST = LIST.split(/\r?\n/); - // filter for javascript - LIST = LIST.filter((item) => item.match(/^[^.].*\.[js|ts]$/)).join(); - if (LIST) { - try { - if (!fs.existsSync(tmpDir)) { - fs.mkdirSync(tmpDir); - } - //update eslint config to include qunit - eslintInfo.extends.push('plugin:qunit/recommended'); - fs.writeFileSync(tmpEslint, `module.exports = ${JSON.stringify(eslintInfo)}`); - // execut the linter with additional qunit rules - execa.sync(`pnpm eslint --config ${tmpEslint} --ext=js,ts ${LIST}`, { - stdio: 'inherit', - shell: true, - }); - } catch (e) { - unlinkTemp(); - console.log(e); - process.exit(1); - } - } -} -console.log(`✅ Commit passes lint.`); -unlinkTemp(); -process.exit();