diff --git a/.github/renovate.json b/.github/renovate.json index 80c124c32d5..0aa5488e9de 100644 --- a/.github/renovate.json +++ b/.github/renovate.json @@ -1,19 +1,18 @@ { "$schema": "https://docs.renovatebot.com/renovate-schema.json", - "extends": [ - "config:base" - ], + "extends": ["config:base"], "labels": [":dependabot:", ":label: dependencies"], "packageRules": [ { "matchPackagePatterns": [ "@types", - "typescript", + "eslint-config-prettier", "eslint", "glint", "lint", "prettier", - "stylelint" + "stylelint", + "typescript" ], "groupName": "code-quality" }, @@ -36,10 +35,7 @@ "ember-cli-sri", "ember-css-modules" ], - "matchPackagePatterns": [ - "@embroider", - "postcss" - ], + "matchPackagePatterns": ["@embroider", "postcss"], "groupName": "build-tools" }, { @@ -53,23 +49,12 @@ "ember-page-title", "tracked-built-ins" ], - "matchPackagePatterns": [ - "glimmer", - "polyfill" - ], + "matchPackagePatterns": ["glimmer", "polyfill"], "groupName": "ember-core" }, { - "matchPackageNames": [ - "ember-cli-babel", - "ember-cli-htmlbars", - "@embroider/macros", - "ember-cli-terser" - ], - "matchPackagePatterns": [ - "babel", - "postcss" - ], + "matchPackageNames": ["ember-cli-babel", "ember-cli-htmlbars", "@embroider/macros", "ember-cli-terser"], + "matchPackagePatterns": ["babel", "postcss"], "groupName": "asset-compilation" }, { @@ -88,24 +73,15 @@ "@ember/test-helpers", "@ember/test-waiters" ], - "matchPackagePatterns": [ - "percy", - "quality", - "test" - ], + "matchPackagePatterns": ["percy", "quality", "test"], "groupName": "testing" }, { - "matchPackageNames": [ - "ember-inflector", - "ember-promise-helpers" - ], + "matchPackageNames": ["ember-inflector", "ember-promise-helpers"], "groupName": "data-utils" }, { - "matchManagers": [ - "github-actions" - ], + "matchManagers": ["github-actions"], "groupName": "github-actions" } ], @@ -115,13 +91,9 @@ "rangeStrategy": "bump", "prHourlyLimit": 10, "vulnerabilityAlerts": { - "labels": [ - ":label: security" - ], + "labels": [":label: security"], "automerge": false, - "assignees": [ - "@runspired" - ], + "assignees": ["@runspired"], "enabled": true }, "ignorePaths": ["node_modules/**", "**/node_modules/**"] diff --git a/.github/workflows/compat-tests.yml b/.github/workflows/compat-tests.yml index 78a2bef882e..9a7d0198993 100644 --- a/.github/workflows/compat-tests.yml +++ b/.github/workflows/compat-tests.yml @@ -42,7 +42,7 @@ jobs: env: UV_USE_IO_URING: 0 floating-dependencies: - timeout-minutes: 7 + timeout-minutes: 8 runs-on: ubuntu-latest steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index db4fd6b3fc0..ed77efc73d5 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -32,6 +32,8 @@ jobs: restore-lint-caches: true install: true repo-token: ${{ secrets.GITHUB_TOKEN }} + - name: Prettier + run: pnpm lint:prettier - name: Lint run: pnpm lint - name: Check Uncompiled Packages for TypeScript Compilation Errors diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 00000000000..d831b3e04bd --- /dev/null +++ b/.prettierignore @@ -0,0 +1,24 @@ +# In addition to gitignore... + +# generated files +pnpm-lock.yaml + +# we disagree with prettier and we are even more opinionated than they are +*.hbs +*.html +*.md + +# these files would be YUGE if we prettified them +MOCK_DATA.json +.mock-cache/ + +# unconventional +blueprints/ +vendor/ + +# prettier is reporting syntax errors in these +*.yml + +# we don't really care about these +main/public/ +tests/fastboot/public/ diff --git a/.prettierrc.js b/.prettierrc.js index 65bfc3b8d4c..451dfeada11 100644 --- a/.prettierrc.js +++ b/.prettierrc.js @@ -1,5 +1,12 @@ module.exports = { - singleQuote: true, trailingComma: 'es5', - printWidth: 120 -} + printWidth: 120, + overrides: [ + { + files: '*.{js,ts,cjs,cts,mjs,mts}', + options: { + singleQuote: true, + }, + }, + ], +}; diff --git a/.vscode/settings.json b/.vscode/settings.json index 5a0b1cd0524..3d96a190806 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,5 +2,6 @@ "files.associations": { "turbo.json": "jsonc" }, - "eslint.workingDirectories": [{ "mode": "auto" }, "packages/*", "tests/*"] + "eslint.workingDirectories": [{ "mode": "auto" }, "packages/*", "tests/*"], + "editor.formatOnSave": true } diff --git a/@types/ember-data-qunit-asserts/index.d.ts b/@types/ember-data-qunit-asserts/index.d.ts index a700d301da9..bd69d17bcc0 100644 --- a/@types/ember-data-qunit-asserts/index.d.ts +++ b/@types/ember-data-qunit-asserts/index.d.ts @@ -1,6 +1,6 @@ -import type { CacheOperation, NotificationType } from "@ember-data/store/-private/managers/notification-manager"; -import type { StableDocumentIdentifier } from "@ember-data/store/-types/cache/identifier"; -import type { StableRecordIdentifier } from "@warp-drive/core-types"; +import type { CacheOperation, NotificationType } from '@ember-data/store/-private/managers/notification-manager'; +import type { StableDocumentIdentifier } from '@ember-data/store/-types/cache/identifier'; +import type { StableRecordIdentifier } from '@warp-drive/core-types'; declare global { interface DeprecationConfig { @@ -20,7 +20,11 @@ declare global { interface Assert { expectDeprecation(options: DeprecationConfig, label?: string): void; - expectDeprecation(callback: () => void | Promise, options: DeprecationConfig | string | RegExp, label?: string): Promise; + expectDeprecation( + callback: () => void | Promise, + options: DeprecationConfig | string | RegExp, + label?: string + ): Promise; expectNoDeprecation( callback: () => void | Promise, label?: string, @@ -56,7 +60,10 @@ declare global { namespace QUnit { export interface Assert { expectDeprecation(options: { id: string; count: number; until?: string }): void; - expectDeprecation(callback: () => void | Promise, options: DeprecationConfig | string | RegExp): Promise; + expectDeprecation( + callback: () => void | Promise, + options: DeprecationConfig | string | RegExp + ): Promise; expectNoDeprecation( callback: () => void | Promise, label?: string, diff --git a/config/eslint/base.cjs b/config/eslint/base.cjs index 8dcbb9e9c9a..a191a8e4116 100644 --- a/config/eslint/base.cjs +++ b/config/eslint/base.cjs @@ -1,19 +1,5 @@ const path = require('path'); -let isRoot = false; -try { - const dir = process.cwd(); - const pkg = require(path.join(dir, './package.json')); - if (pkg.name === 'root') { - isRoot = true; - } -} catch (e) { - console.log(e); -} - -const prettierPath = path.join(process.cwd(), isRoot ? './.prettierrc.js' : '../../.prettierrc.js'); -const prettierConfig = require(prettierPath); - function rules() { return { eqeqeq: 'error', @@ -31,23 +17,18 @@ function rules() { 'prefer-rest-params': 'off', 'prefer-const': 'error', - - 'prettier/prettier': [ - 'error', - prettierConfig, - { - usePrettierrc: false, - }, - ], }; } function plugins() { - return ['prettier']; + return []; } function extend() { - return ['eslint:recommended', 'plugin:prettier/recommended']; + return [ + 'eslint:recommended', + 'prettier', // NOTE: must be last + ]; } function settings() { diff --git a/config/eslint/ignore.cjs b/config/eslint/ignore.cjs index 32b454dc023..ea7272fde81 100644 --- a/config/eslint/ignore.cjs +++ b/config/eslint/ignore.cjs @@ -32,5 +32,5 @@ function ignoreRules(allowAddon) { } module.exports = { - ignoreRules + ignoreRules, }; diff --git a/config/eslint/isolation.cjs b/config/eslint/isolation.cjs index c4b9c20c868..4e3b0290e75 100644 --- a/config/eslint/isolation.cjs +++ b/config/eslint/isolation.cjs @@ -40,18 +40,18 @@ const RESTRICTED_IMPORTS = [ 'ember-source/types', 'ember', 'qunit', - 'testem' + 'testem', ]; function rules(options) { return { 'no-restricted-imports': [ 'error', { - paths: options?.allowedImports ? RESTRICTED_IMPORTS.filter( - (path) => { - return !options.allowedImports.includes(path) - } - ) : RESTRICTED_IMPORTS, + paths: options?.allowedImports + ? RESTRICTED_IMPORTS.filter((path) => { + return !options.allowedImports.includes(path); + }) + : RESTRICTED_IMPORTS, }, ], 'no-restricted-globals': [ @@ -61,9 +61,9 @@ function rules(options) { message: 'Please use the `qunit` import instead of referencing `QUnit` directly.', }, ], - } + }; } module.exports = { - rules + rules, }; diff --git a/config/eslint/typescript.cjs b/config/eslint/typescript.cjs index 502cc0fa1fc..e205b541b72 100644 --- a/config/eslint/typescript.cjs +++ b/config/eslint/typescript.cjs @@ -1,24 +1,27 @@ function rules(config) { - return Object.assign({ - '@typescript-eslint/no-explicit-any': 'error', - '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], - '@typescript-eslint/prefer-includes': 'error', - '@typescript-eslint/prefer-ts-expect-error': 'error', - '@typescript-eslint/ban-ts-comment': 'off', - '@typescript-eslint/no-redundant-type-constituents': 'off', - '@typescript-eslint/no-unsafe-declaration-merging': 'off', - '@typescript-eslint/no-misused-promises': 'off', - 'no-unused-vars': 'off', - 'prefer-const': 'error', - 'prefer-rest-params': 'off', - 'no-shadow': 'off', - '@typescript-eslint/no-shadow': 'error', - 'no-loop-func': 'off', - '@typescript-eslint/no-loop-func': 'error', - 'no-throw-literal': 'off', - '@typescript-eslint/no-throw-literal': 'error', - // '@typescript-eslint/prefer-readonly-parameter-types': 'error', - }, config?.rules ?? {}); + return Object.assign( + { + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-unused-vars': ['error', { args: 'none' }], + '@typescript-eslint/prefer-includes': 'error', + '@typescript-eslint/prefer-ts-expect-error': 'error', + '@typescript-eslint/ban-ts-comment': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', + '@typescript-eslint/no-unsafe-declaration-merging': 'off', + '@typescript-eslint/no-misused-promises': 'off', + 'no-unused-vars': 'off', + 'prefer-const': 'error', + 'prefer-rest-params': 'off', + 'no-shadow': 'off', + '@typescript-eslint/no-shadow': 'error', + 'no-loop-func': 'off', + '@typescript-eslint/no-loop-func': 'error', + 'no-throw-literal': 'off', + '@typescript-eslint/no-throw-literal': 'error', + // '@typescript-eslint/prefer-readonly-parameter-types': 'error', + }, + config?.rules ?? {} + ); } function plugins() { @@ -26,10 +29,7 @@ function plugins() { } function extend() { - return [ - 'plugin:@typescript-eslint/recommended', - 'plugin:@typescript-eslint/recommended-requiring-type-checking' - ]; + return ['plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended-requiring-type-checking']; } function settings() { @@ -38,9 +38,9 @@ function settings() { parserOptions: { sourceType: 'module', ecmaVersion: 2022, - project: 'tsconfig.json' - } - } + project: 'tsconfig.json', + }, + }; } function defaults(config) { @@ -59,4 +59,4 @@ module.exports = { defaults, plugins, extend, -} +}; diff --git a/config/package.json b/config/package.json index f7b741ed15f..4d55a95346b 100644 --- a/config/package.json +++ b/config/package.json @@ -12,9 +12,7 @@ "eslint-config-prettier": "^9.0.0", "eslint-plugin-import": "^2.29.0", "eslint-plugin-n": "^16.2.0", - "eslint-plugin-prettier": "^5.0.1", "eslint-plugin-simple-import-sort": "^10.0.0", - "prettier": "^3.0.3", "typescript": "~5.2.2" }, "engines": { diff --git a/config/rollup/external.js b/config/rollup/external.js index eb6dcb4445b..587e89c1373 100644 --- a/config/rollup/external.js +++ b/config/rollup/external.js @@ -13,4 +13,4 @@ function external(manual = []) { module.exports = { external, -} +}; diff --git a/docs-generator/yuidoc.json b/docs-generator/yuidoc.json index 3597e783f53..a7725aa6389 100644 --- a/docs-generator/yuidoc.json +++ b/docs-generator/yuidoc.json @@ -6,10 +6,7 @@ "enabledEnvironments": [], "extension": ".js,.ts", "preprocessor": "./yui-docs-preprocessor.js", - "excludeTags": [ - "internal", - "feature" - ], + "excludeTags": ["internal", "feature"], "paths": [ "../packages/-ember-data/addon", "../packages/core-types/src", diff --git a/package.json b/package.json index 65dfbd9d112..060057d2200 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,8 @@ "build": "turbo _build --log-order=stream --filter=./packages/*", "build:docs": "mkdir -p packages/-ember-data/dist && cd ./docs-generator && node ./compile-docs.js", "lint": "FORCE_COLOR=2 pnpm run -r --workspace-concurrency=-1 --if-present --reporter=append-only --no-bail lint", + "lint:prettier": "prettier --check --cache --cache-location=.prettier-cache --log-level=warn .", + "lint:prettier:fix": "prettier --write --cache --cache-location=.prettier-cache --log-level=warn .", "preinstall": "npx only-allow pnpm", "check:types": "pnpm run -r --workspace-concurrency=-1 --if-present check:types", "test": "pnpm turbo test --concurrency=1", @@ -34,6 +36,7 @@ "test-external:ember-data-relationship-tracker": "node ./scripts/test-external-partner-project.js ember-data-relationship-tracker https://github.com/ef4/ember-data-relationship-tracker.git" }, "devDependencies": { + "bun-types": "^1.0.7", "chalk": "^4.1.2", "co": "^4.6.0", "command-line-args": "^5.2.1", @@ -43,13 +46,13 @@ "fromentries": "^1.3.2", "git-repo-info": "^2.1.1", "git-repo-version": "^1.0.2", + "globby": "^13.2.2", "lerna-changelog": "^2.2.0", "pnpm-sync-dependencies-meta-injected": "0.0.10", + "prettier": "^3.0.3", "rimraf": "^5.0.5", "semver": "^7.5.4", - "globby": "^13.2.2", "silent-error": "^1.1.1", - "bun-types": "^1.0.7", "url": "^0.11.3", "yuidocjs": "^0.10.2", "zlib": "1.0.5" diff --git a/packages/-ember-data/tsconfig.json b/packages/-ember-data/tsconfig.json index 8d78890ee0d..0ccc9efda1a 100644 --- a/packages/-ember-data/tsconfig.json +++ b/packages/-ember-data/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "addon/**/*", - ], + "include": ["addon/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -30,9 +28,7 @@ "emitDeclarationOnly": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types", - ], + "types": ["ember-source/types"], "paths": { "ember-data/version": ["./addon/version.d.ts"], @@ -40,7 +36,7 @@ "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ @@ -54,6 +50,6 @@ { "path": "../serializer" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/active-record/babel.config.json b/packages/active-record/babel.config.json index b5403ba922c..0e04314a08c 100644 --- a/packages/active-record/babel.config.json +++ b/packages/active-record/babel.config.json @@ -2,7 +2,7 @@ "plugins": [ "@babel/plugin-transform-runtime", ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }], - ["@babel/plugin-proposal-decorators", { "legacy": true }], + ["@babel/plugin-proposal-decorators", { "legacy": true }], "@babel/plugin-transform-class-properties" ] } diff --git a/packages/active-record/tsconfig.json b/packages/active-record/tsconfig.json index f27d473dddc..7478b33f9d5 100644 --- a/packages/active-record/tsconfig.json +++ b/packages/active-record/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "src/**/*" - ], + "include": ["src/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -30,16 +28,14 @@ "emitDeclarationOnly": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types" - ], + "types": ["ember-source/types"], "paths": { "@ember-data/deprecations": ["../private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ @@ -47,6 +43,6 @@ { "path": "../request-utils" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/adapter/tsconfig.json b/packages/adapter/tsconfig.json index 59f1c980503..94f18a0c820 100644 --- a/packages/adapter/tsconfig.json +++ b/packages/adapter/tsconfig.json @@ -1,8 +1,5 @@ { - "include": [ - "src/**/*", - "../../@types/**/*", - ], + "include": ["src/**/*", "../../@types/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -33,17 +30,14 @@ "emitDeclarationOnly": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types", - "@types/jquery", - ], + "types": ["ember-source/types", "@types/jquery"], "paths": { "@ember-data/deprecations": ["../private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ @@ -54,6 +48,6 @@ { "path": "../request-utils" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/core-types/tsconfig.json b/packages/core-types/tsconfig.json index 9b8abe814aa..ad00482519e 100644 --- a/packages/core-types/tsconfig.json +++ b/packages/core-types/tsconfig.json @@ -45,4 +45,4 @@ "baseUrl": "src" } -} \ No newline at end of file +} diff --git a/packages/debug/addon/index.js b/packages/debug/addon/index.js index ac986a40b01..159fa0cbc34 100644 --- a/packages/debug/addon/index.js +++ b/packages/debug/addon/index.js @@ -98,9 +98,11 @@ export default class extends DataAdapter { }); const __getResourceCache = store._instanceCache.getResourceCache; - const _releaseMethods = [() => { - store.notifications.unsubscribe(unsub); - }]; + const _releaseMethods = [ + () => { + store.notifications.unsubscribe(unsub); + }, + ]; const discoveredTypes = typesMapFor(store); Object.keys(store.identifierCache._cache.resourcesByType).forEach((type) => { diff --git a/packages/diagnostic/babel.config.json b/packages/diagnostic/babel.config.json index ac2f29b61c2..278b4a0eb62 100644 --- a/packages/diagnostic/babel.config.json +++ b/packages/diagnostic/babel.config.json @@ -1,5 +1,3 @@ { - "plugins": [ - ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }] - ] + "plugins": [["@babel/plugin-transform-typescript", { "allowDeclareFields": true }]] } diff --git a/packages/diagnostic/src/styles/dom-reporter.css b/packages/diagnostic/src/styles/dom-reporter.css index 2ebac3f4ef9..ef4c581fd57 100644 --- a/packages/diagnostic/src/styles/dom-reporter.css +++ b/packages/diagnostic/src/styles/dom-reporter.css @@ -25,7 +25,8 @@ html { font-size: 125%; } -html, body { +html, +body { width: 100%; height: 100%; margin: 0; @@ -34,22 +35,32 @@ html, body { } body { - font-size: .75rem; + font-size: 0.75rem; } #warp-drive__diagnostic { box-sizing: border-box; color: var(--font-color); - font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif; + font-family: + system-ui, + -apple-system, + BlinkMacSystemFont, + "Segoe UI", + Roboto, + Oxygen, + Ubuntu, + Cantarell, + "Open Sans", + "Helvetica Neue", + sans-serif; width: 100%; position: relative; min-height: 100%; line-height: 1.5em; background-color: var(--bg-color); background-size: 1.5em 1.5em; - background-image: - linear-gradient(to right, var(--bg-color-2) .1em, transparent 1px), - linear-gradient(to bottom, var(--bg-color-2) .1em, transparent 1px); + background-image: linear-gradient(to right, var(--bg-color-2) 0.1em, transparent 1px), + linear-gradient(to bottom, var(--bg-color-2) 0.1em, transparent 1px); } #warp-drive__diagnostic * { @@ -63,7 +74,7 @@ body { margin: 0; padding: 0; line-height: 1.25rem; - margin: .25rem 0 1rem; + margin: 0.25rem 0 1rem; } #warp-drive__diagnostic h1 { @@ -92,17 +103,17 @@ body { } #warp-drive__diagnostic-header ul li { - font-size: .85em; + font-size: 0.85em; float: right; - margin: .25em .5em; + margin: 0.25em 0.5em; } #warp-drive__diagnostic-header { height: 4.5rem; - padding: .5rem; + padding: 0.5rem; background: var(--bg-color-3); - box-shadow: 0 0 1rem rgba(0, 0, 0, .5); - border-bottom: .1rem solid hsl(var(--brand-blue), 50%); + box-shadow: 0 0 1rem rgba(0, 0, 0, 0.5); + border-bottom: 0.1rem solid hsl(var(--brand-blue), 50%); } #warp-drive__diagnostic h1 span.logo-main { @@ -119,22 +130,21 @@ body { color: var(--primary-color); } - #warp-drive__diagnostic table { border-collapse: separate; - border-spacing: 0 .1rem; + border-spacing: 0 0.1rem; width: 100%; padding: 1rem; } #warp-drive__diagnostic table tr { color: lightgrey; - font-size: .85em; + font-size: 0.85em; line-height: 1rem; text-align: left; vertical-align: middle; height: 1.2rem; - padding: .1rem; + padding: 0.1rem; } #warp-drive__diagnostic table tr td strong { @@ -146,18 +156,18 @@ body { } #warp-drive__diagnostic table tr td:first-of-type { - border-radius: .1rem 0 0 .1rem; - padding-left: .5rem; + border-radius: 0.1rem 0 0 0.1rem; + padding-left: 0.5rem; } #warp-drive__diagnostic table tr td:last-of-type { - padding-right: .5rem; - border-radius: 0 .1rem .1rem 0; + padding-right: 0.5rem; + border-radius: 0 0.1rem 0.1rem 0; } #warp-drive__diagnostic table tr:nth-last-of-type(even) { - background: rgba(0,0,0, .8); + background: rgba(0, 0, 0, 0.8); } #warp-drive__diagnostic table tr:nth-last-of-type(odd) { - background: rgba(0,0,0, .8); + background: rgba(0, 0, 0, 0.8); } #warp-drive__diagnostic table tr.passed td:nth-child(2) { color: green; @@ -173,6 +183,6 @@ body { } #warp-drive__diagnostic table td:nth-child(3) { color: yellow; - font-size: .75em; - line-height: .75rem; + font-size: 0.75em; + line-height: 0.75rem; } diff --git a/packages/diagnostic/tsconfig.json b/packages/diagnostic/tsconfig.json index e643c48e803..c14300ab125 100644 --- a/packages/diagnostic/tsconfig.json +++ b/packages/diagnostic/tsconfig.json @@ -25,6 +25,6 @@ "declaration": true, "declarationMap": true, "inlineSourceMap": true, - "inlineSources": true, + "inlineSources": true } } diff --git a/packages/graph/src/-private/debug/assert-polymorphic-type.ts b/packages/graph/src/-private/debug/assert-polymorphic-type.ts index 7ffeb77b12c..3f10c4dc769 100644 --- a/packages/graph/src/-private/debug/assert-polymorphic-type.ts +++ b/packages/graph/src/-private/debug/assert-polymorphic-type.ts @@ -16,7 +16,12 @@ import type { CacheCapabilitiesManager } from '@ember-data/store/-types/q/cache- information about the relationship, retrieved via `record.relationshipFor(key)`. */ -let assertPolymorphicType: (parentIdentifier: StableRecordIdentifier, parentDefinition: UpgradedMeta, addedIdentifier: StableRecordIdentifier, store: CacheCapabilitiesManager) => void; +let assertPolymorphicType: ( + parentIdentifier: StableRecordIdentifier, + parentDefinition: UpgradedMeta, + addedIdentifier: StableRecordIdentifier, + store: CacheCapabilitiesManager +) => void; let assertInheritedSchema: (definition: UpgradedMeta, type: string) => void; if (DEBUG) { @@ -58,7 +63,7 @@ if (DEBUG) { polymorphic?: boolean; inverse: string | null; }; - } + }; type RelationshipSchemaError = 'name' | 'type' | 'kind' | 'as' | 'async' | 'polymorphic' | 'inverse'; function expectedSchema(definition: UpgradedMeta) { @@ -70,8 +75,8 @@ if (DEBUG) { as: definition.type, async: definition.inverseIsAsync, polymorphic: definition.inverseIsPolymorphic || false, - inverse: definition.key - } + inverse: definition.key, + }, }); } @@ -94,7 +99,7 @@ if (DEBUG) { } \`\`\` -` +`; } function metaFrom(definition: UpgradedMeta) { @@ -105,8 +110,8 @@ if (DEBUG) { options: { async: definition.isAsync, polymorphic: definition.isPolymorphic, - inverse: definition.inverseKey - } + inverse: definition.inverseKey, + }, }; } function inverseMetaFrom(definition: UpgradedMeta) { @@ -118,8 +123,8 @@ if (DEBUG) { as: definition.isPolymorphic ? definition.type : undefined, async: definition.inverseIsAsync, polymorphic: definition.inverseIsPolymorphic, - inverse: definition.key - } + inverse: definition.key, + }, }; } function inverseDefinition(definition: UpgradedMeta): UpgradedMeta { @@ -152,18 +157,55 @@ if (DEBUG) { let errors2 = validateSchema(definitionWithPolymorphic(definition), meta2); if (errors2.size === 0 && errors1.size > 0) { - throw new Error(`The schema for the relationship '${type}.${definition.key}' is not configured to satisfy '${definition.inverseType}' and thus cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${definition.type}.${definition.inverseKey}'\n\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${type}' should include:${printSchema(meta1, errors1)}`); - + throw new Error( + `The schema for the relationship '${type}.${definition.key}' is not configured to satisfy '${ + definition.inverseType + }' and thus cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${ + definition.type + }.${ + definition.inverseKey + }'\n\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${type}' should include:${printSchema( + meta1, + errors1 + )}` + ); } else if (errors1.size > 0) { - throw new Error(`The schema for the relationship '${type}.${definition.key}' is not configured to satisfy '${definition.inverseType}' and thus cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${definition.type}.${definition.inverseKey}'\n\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${type}' should include:${printSchema(meta1, errors1)} and the relationships schema definition for '${definition.type}' should include:${printSchema(meta2, errors2)}`); - + throw new Error( + `The schema for the relationship '${type}.${definition.key}' is not configured to satisfy '${ + definition.inverseType + }' and thus cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${ + definition.type + }.${ + definition.inverseKey + }'\n\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${type}' should include:${printSchema( + meta1, + errors1 + )} and the relationships schema definition for '${definition.type}' should include:${printSchema( + meta2, + errors2 + )}` + ); } else if (errors2.size > 0) { - throw new Error(`The schema for the relationship '${type}.${definition.key}' satisfies '${definition.inverseType}' but cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${definition.type}.${definition.inverseKey}' because that relationship is not polymorphic.\n\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${definition.type}' should include:${printSchema(meta2, errors2)}`); - + throw new Error( + `The schema for the relationship '${type}.${definition.key}' satisfies '${ + definition.inverseType + }' but cannot utilize the '${definition.inverseType}.${definition.key}' relationship to connect with '${ + definition.type + }.${ + definition.inverseKey + }' because that relationship is not polymorphic.\n\nIf using this relationship in a polymorphic manner is desired, the relationships schema definition for '${ + definition.type + }' should include:${printSchema(meta2, errors2)}` + ); } - } + }; - assertPolymorphicType = function assertPolymorphicType(parentIdentifier: StableRecordIdentifier, parentDefinition: UpgradedMeta, addedIdentifier: StableRecordIdentifier, store: CacheCapabilitiesManager) { + assertPolymorphicType = function assertPolymorphicType( + parentIdentifier: StableRecordIdentifier, + parentDefinition: UpgradedMeta, + addedIdentifier: StableRecordIdentifier, + store: CacheCapabilitiesManager + ) { if (parentDefinition.inverseIsImplicit) { return; } @@ -171,15 +213,33 @@ if (DEBUG) { let meta = store.getSchemaDefinitionService().relationshipsDefinitionFor(addedIdentifier)[ parentDefinition.inverseKey ]; - assert(`No '${parentDefinition.inverseKey}' field exists on '${addedIdentifier.type}'. To use this type in the polymorphic relationship '${parentDefinition.inverseType}.${parentDefinition.key}' the relationships schema definition for ${addedIdentifier.type} should include:${expectedSchema(parentDefinition)}`, meta); + assert( + `No '${parentDefinition.inverseKey}' field exists on '${ + addedIdentifier.type + }'. To use this type in the polymorphic relationship '${parentDefinition.inverseType}.${ + parentDefinition.key + }' the relationships schema definition for ${addedIdentifier.type} should include:${expectedSchema( + parentDefinition + )}`, + meta + ); assert( `You should not specify both options.as and options.inverse as null on ${addedIdentifier.type}.${parentDefinition.inverseKey}, as if there is no inverse field there is no abstract type to conform to. You may have intended for this relationship to be polymorphic, or you may have mistakenly set inverse to null.`, !(meta.options.inverse === null && meta?.options.as?.length) ); let errors = validateSchema(parentDefinition, meta); assert( - `The schema for the relationship '${parentDefinition.inverseKey}' on '${addedIdentifier.type}' type does not correctly implement '${parentDefinition.type}' and thus cannot be assigned to the '${parentDefinition.key}' relationship in '${parentIdentifier.type}'. If using this record in this polymorphic relationship is desired, correct the errors in the schema shown below:${printSchema(meta, errors)}`, - errors.size === 0, + `The schema for the relationship '${parentDefinition.inverseKey}' on '${ + addedIdentifier.type + }' type does not correctly implement '${parentDefinition.type}' and thus cannot be assigned to the '${ + parentDefinition.key + }' relationship in '${ + parentIdentifier.type + }'. If using this record in this polymorphic relationship is desired, correct the errors in the schema shown below:${printSchema( + meta, + errors + )}`, + errors.size === 0 ); } else if (addedIdentifier.type !== parentDefinition.type) { // if we are not polymorphic @@ -189,13 +249,23 @@ if (DEBUG) { ]; if (meta?.options.as === parentDefinition.type) { // inverse is likely polymorphic but missing the polymorphic flag - let meta = store.getSchemaDefinitionService().relationshipsDefinitionFor({ type: parentDefinition.inverseType })[ - parentDefinition.key - ]; + let meta = store + .getSchemaDefinitionService() + .relationshipsDefinitionFor({ type: parentDefinition.inverseType })[parentDefinition.key]; let errors = validateSchema(definitionWithPolymorphic(inverseDefinition(parentDefinition)), meta); - assert(`The '<${addedIdentifier.type}>.${parentDefinition.inverseKey}' relationship cannot be used polymorphically because '<${parentDefinition.inverseType}>.${parentDefinition.key} is not a polymorphic relationship. To use this relationship in a polymorphic manner, fix the following schema issues on the relationships schema for '${parentDefinition.inverseType}':${printSchema(meta, errors)}`); + assert( + `The '<${addedIdentifier.type}>.${ + parentDefinition.inverseKey + }' relationship cannot be used polymorphically because '<${parentDefinition.inverseType}>.${ + parentDefinition.key + } is not a polymorphic relationship. To use this relationship in a polymorphic manner, fix the following schema issues on the relationships schema for '${ + parentDefinition.inverseType + }':${printSchema(meta, errors)}` + ); } else { - assert(`The '${addedIdentifier.type}' type does not implement '${parentDefinition.type}' and thus cannot be assigned to the '${parentDefinition.key}' relationship in '${parentIdentifier.type}'. If this relationship should be polymorphic, mark ${parentDefinition.inverseType}.${parentDefinition.key} as \`polymorphic: true\` and ${addedIdentifier.type}.${parentDefinition.inverseKey} as implementing it via \`as: '${parentDefinition.type}'\`.`); + assert( + `The '${addedIdentifier.type}' type does not implement '${parentDefinition.type}' and thus cannot be assigned to the '${parentDefinition.key}' relationship in '${parentIdentifier.type}'. If this relationship should be polymorphic, mark ${parentDefinition.inverseType}.${parentDefinition.key} as \`polymorphic: true\` and ${addedIdentifier.type}.${parentDefinition.inverseKey} as implementing it via \`as: '${parentDefinition.type}'\`.` + ); } } }; diff --git a/packages/graph/tsconfig.json b/packages/graph/tsconfig.json index ece63523275..9ea13a6f450 100644 --- a/packages/graph/tsconfig.json +++ b/packages/graph/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "src/**/*", - ], + "include": ["src/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -30,22 +28,20 @@ "emitDeclarationOnly": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types" - ], + "types": ["ember-source/types"], "paths": { "@ember-data/deprecations": ["../private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ { "path": "../request" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/holodeck/babel.config.json b/packages/holodeck/babel.config.json index ac2f29b61c2..278b4a0eb62 100644 --- a/packages/holodeck/babel.config.json +++ b/packages/holodeck/babel.config.json @@ -1,5 +1,3 @@ { - "plugins": [ - ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }] - ] + "plugins": [["@babel/plugin-transform-typescript", { "allowDeclareFields": true }]] } diff --git a/packages/holodeck/bin/cmd/pm2.js b/packages/holodeck/bin/cmd/pm2.js index 09c1b2df64d..e4767022f73 100755 --- a/packages/holodeck/bin/cmd/pm2.js +++ b/packages/holodeck/bin/cmd/pm2.js @@ -22,20 +22,17 @@ export default async function pm2Delegate(cmd, _args) { args: cmd === 'start' ? '-f' : '', }; - pm2[cmd]( - cmd === 'start' ? options : options.name, - (err, apps) => { - pm2.disconnect(); // Disconnects from PM2 - if (err) { - console.log(`not able to ${cmd} pm2 for ${options.name}`); - console.error(err); - reject(err); - } else { - console.log(`pm2 ${cmd} successful for ${options.name}`); - resolve(); - } + pm2[cmd](cmd === 'start' ? options : options.name, (err, apps) => { + pm2.disconnect(); // Disconnects from PM2 + if (err) { + console.log(`not able to ${cmd} pm2 for ${options.name}`); + console.error(err); + reject(err); + } else { + console.log(`pm2 ${cmd} successful for ${options.name}`); + resolve(); } - ); + }); }); }); } diff --git a/packages/holodeck/bin/cmd/spawn.js b/packages/holodeck/bin/cmd/spawn.js index 8f83f086639..5eae2352674 100644 --- a/packages/holodeck/bin/cmd/spawn.js +++ b/packages/holodeck/bin/cmd/spawn.js @@ -12,7 +12,7 @@ export async function spawn(args, options) { }); await proc.exited; if (proc.exitCode !== 0) { - throw proc.exitCode; + throw proc.exitCode; } return; } diff --git a/packages/holodeck/bin/holodeck.js b/packages/holodeck/bin/holodeck.js index 44ffccb8a3c..794b146381b 100755 --- a/packages/holodeck/bin/holodeck.js +++ b/packages/holodeck/bin/holodeck.js @@ -46,7 +46,7 @@ if (command === 'run') { const programPath = __dirname + '/cmd/_start.js'; await spawn(['node', programPath, ...args]); } - } else if (command === 'end') { +} else if (command === 'end') { console.log(chalk.grey(`\n\tEnding Subroutines (mode:${chalk.cyan(isBun ? 'bun' : 'node')})`)); if (!isBun || (BUN_SUPPORTS_HTTP2 && BUN_SUPPORTS_PM2)) { diff --git a/packages/holodeck/server/index.js b/packages/holodeck/server/index.js index 2db8aaad8e0..013dac4482c 100644 --- a/packages/holodeck/server/index.js +++ b/packages/holodeck/server/index.js @@ -8,7 +8,7 @@ import http2 from 'node:http2'; import { dirname } from 'node:path'; import zlib from 'node:zlib'; import { fileURLToPath } from 'url'; -import { HTTPException } from 'hono/http-exception' +import { HTTPException } from 'hono/http-exception'; const __dirname = dirname(fileURLToPath(import.meta.url)); diff --git a/packages/holodeck/tsconfig.json b/packages/holodeck/tsconfig.json index da0a5459d1c..b7ea0ae26ae 100644 --- a/packages/holodeck/tsconfig.json +++ b/packages/holodeck/tsconfig.json @@ -44,8 +44,5 @@ "baseUrl": "client" }, - "references": [ - { "path": "../request" }, - { "path": "../core-types" }, - ] -} \ No newline at end of file + "references": [{ "path": "../request" }, { "path": "../core-types" }] +} diff --git a/packages/json-api/tsconfig.json b/packages/json-api/tsconfig.json index 67175395685..c6db6050694 100644 --- a/packages/json-api/tsconfig.json +++ b/packages/json-api/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "src/**/*" - ], + "include": ["src/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -31,24 +29,22 @@ "emitDeclarationOnly": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types", - ], + "types": ["ember-source/types"], "paths": { "@ember-data/deprecations": ["../private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ { "path": "../graph" }, - { "path": "../request" }, + { "path": "../request" }, { "path": "../request-utils" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/legacy-compat/tsconfig.json b/packages/legacy-compat/tsconfig.json index 0bdb4f248af..2c94ca6c33a 100644 --- a/packages/legacy-compat/tsconfig.json +++ b/packages/legacy-compat/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "src/**/*" - ], + "include": ["src/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -30,16 +28,14 @@ "emitDeclarationOnly": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types" - ], + "types": ["ember-source/types"], "paths": { "@ember-data/deprecations": ["../private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ @@ -49,6 +45,6 @@ { "path": "../request-utils" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/model/src/-private/debug/assert-polymorphic-type.ts b/packages/model/src/-private/debug/assert-polymorphic-type.ts index c696ffca135..79fdb33247a 100644 --- a/packages/model/src/-private/debug/assert-polymorphic-type.ts +++ b/packages/model/src/-private/debug/assert-polymorphic-type.ts @@ -16,10 +16,20 @@ import type { UpgradedMeta } from '@ember-data/graph/-private/-edge-definition'; information about the relationship, retrieved via `record.relationshipFor(key)`. */ -let assertPolymorphicType: (parentIdentifier: StableRecordIdentifier, parentDefinition: UpgradedMeta, addedIdentifier: StableRecordIdentifier, store: Store) => void; +let assertPolymorphicType: ( + parentIdentifier: StableRecordIdentifier, + parentDefinition: UpgradedMeta, + addedIdentifier: StableRecordIdentifier, + store: Store +) => void; if (DEBUG) { - assertPolymorphicType = function assertPolymorphicType(parentIdentifier: StableRecordIdentifier, parentDefinition: UpgradedMeta, addedIdentifier: StableRecordIdentifier, store: Store) { + assertPolymorphicType = function assertPolymorphicType( + parentIdentifier: StableRecordIdentifier, + parentDefinition: UpgradedMeta, + addedIdentifier: StableRecordIdentifier, + store: Store + ) { if (parentDefinition.inverseIsImplicit) { return; } diff --git a/packages/model/src/-private/model.d.ts b/packages/model/src/-private/model.d.ts index 371f1fa2111..c88221e9670 100644 --- a/packages/model/src/-private/model.d.ts +++ b/packages/model/src/-private/model.d.ts @@ -23,7 +23,6 @@ export type ModelCreateArgs = { }; }; - class Model extends EmberObject { store: Store; errors: Errors; @@ -32,9 +31,15 @@ class Model extends EmberObject { toString(): string; save(): Promise; hasMany(key: keyof this & string): HasManyReference; - belongsTo(key: keyof this & string): BelongsToReference - eachRelationship(callback: (this: T, key: K, meta: RelationshipSchema) => void, binding?: T): void; - eachAttribute(callback: (this: T, key: K, meta: AttributeSchema) => void, binding?: T): void; + belongsTo(key: keyof this & string): BelongsToReference; + eachRelationship( + callback: (this: T, key: K, meta: RelationshipSchema) => void, + binding?: T + ): void; + eachAttribute( + callback: (this: T, key: K, meta: AttributeSchema) => void, + binding?: T + ): void; invalidErrorsChanged(errors: JsonApiError[]): void; rollbackAttributes(): void; changedAttributes(): Record; @@ -52,9 +57,18 @@ class Model extends EmberObject { static fields: Map; static attributes: Map; static relationshipsByName: Map; - static eachAttribute(callback: (this: ModelSchema, key: K, attribute: AttributeSchema) => void, binding?: T): void; - static eachRelationship(callback: (this: ModelSchema, key: K, relationship: RelationshipSchema) => void, binding?: T): void; - static eachTransformedAttribute(callback: (this: ModelSchema, key: K, type: string | null) => void, binding?: T): void; + static eachAttribute( + callback: (this: ModelSchema, key: K, attribute: AttributeSchema) => void, + binding?: T + ): void; + static eachRelationship( + callback: (this: ModelSchema, key: K, relationship: RelationshipSchema) => void, + binding?: T + ): void; + static eachTransformedAttribute( + callback: (this: ModelSchema, key: K, type: string | null) => void, + binding?: T + ): void; static toString(): string; static isModel: true; diff --git a/packages/request-utils/babel.config.json b/packages/request-utils/babel.config.json index b5403ba922c..0e04314a08c 100644 --- a/packages/request-utils/babel.config.json +++ b/packages/request-utils/babel.config.json @@ -2,7 +2,7 @@ "plugins": [ "@babel/plugin-transform-runtime", ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }], - ["@babel/plugin-proposal-decorators", { "legacy": true }], + ["@babel/plugin-proposal-decorators", { "legacy": true }], "@babel/plugin-transform-class-properties" ] } diff --git a/packages/request-utils/tsconfig.json b/packages/request-utils/tsconfig.json index 3f1c091964a..bbe2d3e90c8 100644 --- a/packages/request-utils/tsconfig.json +++ b/packages/request-utils/tsconfig.json @@ -41,11 +41,7 @@ "inlineSources": true, "baseUrl": "src", - "types": [ - "ember-source/types" - ] + "types": ["ember-source/types"] }, - "references": [ - { "path": "../core-types" }, - ] -} \ No newline at end of file + "references": [{ "path": "../core-types" }] +} diff --git a/packages/request/src/-private/debug.ts b/packages/request/src/-private/debug.ts index 4dea2273e12..4905b67b9b0 100644 --- a/packages/request/src/-private/debug.ts +++ b/packages/request/src/-private/debug.ts @@ -249,7 +249,7 @@ function validateKey(key: string, value: unknown, errors: string[]) { return; } const keys = Object.keys(value); - keys.forEach(k => { + keys.forEach((k) => { let v: unknown = (value as Record)[k]; if (typeof k !== 'string') { errors.push(`\tThe key ${String(k)} on ${key} should be a string key`); @@ -334,7 +334,7 @@ export function assertValidRequest( } // handle schema - const keys= Object.keys(request) as Array ; + const keys = Object.keys(request) as Array; const validationErrors: string[] = []; const isLegacyRequest: boolean = Boolean('op' in request && !request.url); keys.forEach((key) => { diff --git a/packages/request/tsconfig.json b/packages/request/tsconfig.json index 00d10b9c3ac..70a782227e6 100644 --- a/packages/request/tsconfig.json +++ b/packages/request/tsconfig.json @@ -42,10 +42,8 @@ "baseUrl": "src", "paths": { - "@ember-data/env": ["../../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../../private-build-infra/virtual-packages/env.d.ts"] } }, - "references": [ - { "path": "../core-types" }, - ] -} \ No newline at end of file + "references": [{ "path": "../core-types" }] +} diff --git a/packages/rest/babel.config.json b/packages/rest/babel.config.json index b5403ba922c..0e04314a08c 100644 --- a/packages/rest/babel.config.json +++ b/packages/rest/babel.config.json @@ -2,7 +2,7 @@ "plugins": [ "@babel/plugin-transform-runtime", ["@babel/plugin-transform-typescript", { "allowDeclareFields": true }], - ["@babel/plugin-proposal-decorators", { "legacy": true }], + ["@babel/plugin-proposal-decorators", { "legacy": true }], "@babel/plugin-transform-class-properties" ] } diff --git a/packages/rest/tsconfig.json b/packages/rest/tsconfig.json index b67568b7761..7478b33f9d5 100644 --- a/packages/rest/tsconfig.json +++ b/packages/rest/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "src/**/*" - ], + "include": ["src/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -30,16 +28,14 @@ "emitDeclarationOnly": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types", - ], + "types": ["ember-source/types"], "paths": { "@ember-data/deprecations": ["../private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ @@ -47,6 +43,6 @@ { "path": "../request-utils" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/schema-record/tsconfig.json b/packages/schema-record/tsconfig.json index 3f991627005..095fee03897 100644 --- a/packages/schema-record/tsconfig.json +++ b/packages/schema-record/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "src/**/*" - ], + "include": ["src/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -37,13 +35,13 @@ "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ { "path": "../request" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/serializer/tsconfig.json b/packages/serializer/tsconfig.json index f518084f738..21d464a058f 100644 --- a/packages/serializer/tsconfig.json +++ b/packages/serializer/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "src/**/*" - ], + "include": ["src/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -31,22 +29,20 @@ "emitDeclarationOnly": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types", - ], + "types": ["ember-source/types"], "paths": { "@ember-data/deprecations": ["../private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, "references": [ { "path": "../request" }, { "path": "../store" }, { "path": "../tracking" }, - { "path": "../core-types" }, + { "path": "../core-types" } ] } diff --git a/packages/store/tsconfig.json b/packages/store/tsconfig.json index d4230878282..5c111e78cfc 100644 --- a/packages/store/tsconfig.json +++ b/packages/store/tsconfig.json @@ -1,8 +1,5 @@ { - "include": [ - "src/**/*", - "../../@types/**/*", - ], + "include": ["src/**/*", "../../@types/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -31,21 +28,15 @@ "declarationDir": "unstable-preview-types", "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types" - ], + "types": ["ember-source/types"], "paths": { "@ember-data/deprecations": ["../private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["../private-build-infra/virtual-packages/packages.d.ts"], "@ember-data/canary-features": ["../private-build-infra/virtual-packages/canary-features.d.ts"], "@ember-data/debugging": ["../private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["../private-build-infra/virtual-packages/env.d.ts"] } }, - "references": [ - { "path": "../request" }, - { "path": "../tracking" }, - { "path": "../core-types" }, - ] + "references": [{ "path": "../request" }, { "path": "../tracking" }, { "path": "../core-types" }] } diff --git a/packages/tracking/tsconfig.json b/packages/tracking/tsconfig.json index 84ee5085577..663f731bf27 100644 --- a/packages/tracking/tsconfig.json +++ b/packages/tracking/tsconfig.json @@ -1,7 +1,5 @@ { - "include": [ - "src/**/*", - ], + "include": ["src/**/*"], "baseUrl": ".", "compilerOptions": { "lib": ["DOM", "ESNext"], @@ -29,16 +27,16 @@ "declarationMap": true, "inlineSourceMap": true, "inlineSources": true, - "types": [ - "ember-source/types", - ], + "types": ["ember-source/types"], "paths": { "@ember-data/deprecations": ["./node_modules/@ember-data/private-build-infra/virtual-packages/deprecations.d.ts"], "@ember-data/packages": ["./node_modules/@ember-data/private-build-infra/virtual-packages/packages.d.ts"], - "@ember-data/canary-features": ["./node_modules/@ember-data/private-build-infra/virtual-packages/canary-features.d.ts"], + "@ember-data/canary-features": [ + "./node_modules/@ember-data/private-build-infra/virtual-packages/canary-features.d.ts" + ], "@ember-data/debugging": ["./node_modules/@ember-data/private-build-infra/virtual-packages/debugging.d.ts"], - "@ember-data/env": ["./node_modules/@ember-data/private-build-infra/virtual-packages/env.d.ts"], + "@ember-data/env": ["./node_modules/@ember-data/private-build-infra/virtual-packages/env.d.ts"] } - }, + } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6c48c628675..63558e5d762 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -78,6 +78,9 @@ importers: pnpm-sync-dependencies-meta-injected: specifier: 0.0.10 version: 0.0.10 + prettier: + specifier: ^3.0.3 + version: 3.0.3 rimraf: specifier: ^5.0.5 version: 5.0.5 @@ -126,15 +129,9 @@ importers: eslint-plugin-n: specifier: ^16.2.0 version: 16.2.0(eslint@8.52.0) - eslint-plugin-prettier: - specifier: ^5.0.1 - version: 5.0.1(eslint-config-prettier@9.0.0)(eslint@8.52.0)(prettier@3.0.3) eslint-plugin-simple-import-sort: specifier: ^10.0.0 version: 10.0.0(eslint@8.52.0) - prettier: - specifier: ^3.0.3 - version: 3.0.3 typescript: specifier: ~5.2.2 version: 5.2.2 @@ -6248,18 +6245,6 @@ packages: dev: true optional: true - /@pkgr/utils@2.4.2: - resolution: {integrity: sha512-POgTXhjrTfbTV63DiFXav4lBHiICLKKwDeaKn9Nphwj7WH6m0hMMCaJkMyRWjgtPFyRKRVoMXXjczsTQRDEhYw==} - engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0} - dependencies: - cross-spawn: 7.0.3 - fast-glob: 3.3.1 - is-glob: 4.0.3 - open: 9.1.0 - picocolors: 1.0.0 - tslib: 2.6.2 - dev: false - /@pm2/agent@2.0.3: resolution: {integrity: sha512-xkqqCoTf5VsciMqN0vb9jthW7olVAi4KRFNddCc7ZkeJZ3i8QwZANr4NSH2H5DvseRFHq7MiPspRY/EWAFWWTg==} dependencies: @@ -8654,11 +8639,6 @@ packages: dependencies: is-windows: 1.0.2 - /big-integer@1.6.51: - resolution: {integrity: sha512-GPEid2Y9QU1Exl1rpO9B2IPJGHPSupF5GnVIP0blYvNOMer2bTvSWs1jGOUg04hTmu67nmLsQ9TBo1puaotBHg==} - engines: {node: '>=0.6'} - dev: false - /big.js@5.2.2: resolution: {integrity: sha512-vyL2OymJxmarO8gxMr0mhChsO9QGwhynfuu4+MHTAW6czfq9humCB7rKpUjDd9YUiDPU4mzpyupFSvOClAwbmQ==} @@ -8773,13 +8753,6 @@ packages: widest-line: 3.1.0 wrap-ansi: 7.0.0 - /bplist-parser@0.2.0: - resolution: {integrity: sha512-z0M+byMThzQmD9NILRniCUXYsYpjwnlO8N5uCFaCqIOpqRsJCrQL9NK3JsD67CN5a08nF5oIL2bD6loTdHOuKw==} - engines: {node: '>= 5.10.0'} - dependencies: - big-integer: 1.6.51 - dev: false - /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -9362,13 +9335,6 @@ packages: resolution: {integrity: sha512-zlIp+SCutbbugs6xDy+3WC3KO3zKySpF/bRfiTk/VJUdKt+WHAzlCtLplS7XglRYDFzhRhlzXMW/R5BHkw+u2Q==} dev: true - /bundle-name@3.0.0: - resolution: {integrity: sha512-PKA4BeSvBpQKQ8iPOGCSiell+N8P+Tf1DlwqmYhpe2gAhKPHn8EYOxVT+ShuGmhg8lN8XiSlS80yiExKXrURlw==} - engines: {node: '>=12'} - dependencies: - run-applescript: 5.0.0 - dev: false - /bytes@1.0.0: resolution: {integrity: sha512-/x68VkHLeTl3/Ll8IvxdwzhrT+IyKc52e/oyHhA2RwqPqswSnjVbSddfPRwAsJtbilMAPSRWwAlpxdYsSWOTKQ==} @@ -10388,24 +10354,6 @@ packages: engines: {node: '>=0.10.0'} dev: true - /default-browser-id@3.0.0: - resolution: {integrity: sha512-OZ1y3y0SqSICtE8DE4S8YOE9UZOJ8wO16fKWVP5J1Qz42kV9jcnMVFrEE/noXb/ss3Q4pZIH79kxofzyNNtUNA==} - engines: {node: '>=12'} - dependencies: - bplist-parser: 0.2.0 - untildify: 4.0.0 - dev: false - - /default-browser@4.0.0: - resolution: {integrity: sha512-wX5pXO1+BrhMkSbROFsyxUm0i/cJEScyNhA4PPxc41ICuv05ZZB/MX28s8aZx6xjmatvebIapF6hLEKEcpneUA==} - engines: {node: '>=14.16'} - dependencies: - bundle-name: 3.0.0 - default-browser-id: 3.0.0 - execa: 7.2.0 - titleize: 3.0.0 - dev: false - /defaults@1.0.4: resolution: {integrity: sha512-eFuaLoy/Rxalv2kr+lqMlUnrDWV+3j4pljOIJgLIhI058IQfWJ7vXhyEIHu+HtC738klGALYxOKDO0bQP3tg8A==} dependencies: @@ -10423,11 +10371,6 @@ packages: gopd: 1.0.1 has-property-descriptors: 1.0.1 - /define-lazy-prop@3.0.0: - resolution: {integrity: sha512-N+MeXYoqr3pOgn8xfyRPREN7gHakLYjhsHhWGT3fWAiL4IkAt0iDw14QiiEm2bE30c5XX5q0FtAA3CK5f9/BUg==} - engines: {node: '>=12'} - dev: false - /define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -11731,27 +11674,6 @@ packages: semver: 7.5.4 dev: false - /eslint-plugin-prettier@5.0.1(eslint-config-prettier@9.0.0)(eslint@8.52.0)(prettier@3.0.3): - resolution: {integrity: sha512-m3u5RnR56asrwV/lDC4GHorlW75DsFfmUcjfCYylTUs85dBRnB7VM6xG8eCMJdeDRnppzmxZVf1GEPJvl1JmNg==} - engines: {node: ^14.18.0 || >=16.0.0} - peerDependencies: - '@types/eslint': '>=8.0.0' - eslint: '>=8.0.0' - eslint-config-prettier: '*' - prettier: '>=3.0.0' - peerDependenciesMeta: - '@types/eslint': - optional: true - eslint-config-prettier: - optional: true - dependencies: - eslint: 8.52.0 - eslint-config-prettier: 9.0.0(eslint@8.52.0) - prettier: 3.0.3 - prettier-linter-helpers: 1.0.0 - synckit: 0.8.5 - dev: false - /eslint-plugin-simple-import-sort@10.0.0(eslint@8.52.0): resolution: {integrity: sha512-AeTvO9UCMSNzIHRkg8S6c3RPy5YEwKWSQPx3DYghLedo2ZQxowPFLGDN1AZ2evfg6r6mjBSZSLxLFsWSu3acsw==} peerDependencies: @@ -11949,21 +11871,6 @@ packages: signal-exit: 3.0.7 strip-final-newline: 2.0.0 - /execa@7.2.0: - resolution: {integrity: sha512-UduyVP7TLB5IcAQl+OzLyLcS/l32W/GLg+AhHJ+ow40FOk2U3SAllPwR44v4vmdFwIWqpdwxxpQbF1n5ta9seA==} - engines: {node: ^14.18.0 || ^16.14.0 || >=18.0.0} - dependencies: - cross-spawn: 7.0.3 - get-stream: 6.0.1 - human-signals: 4.3.1 - is-stream: 3.0.0 - merge-stream: 2.0.0 - npm-run-path: 5.1.0 - onetime: 6.0.0 - signal-exit: 3.0.7 - strip-final-newline: 3.0.0 - dev: false - /exists-sync@0.0.3: resolution: {integrity: sha512-/qPB5E0cRuA/Cs5vHrmKYSfhIBCPJs9Vm3e9aIejMwwbe6idMeNbGu1g5stvr/bXT6HywHckLPEkmY7HK6FlwA==} deprecated: Please replace with usage of fs.existsSync @@ -12077,10 +11984,6 @@ packages: /fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} - /fast-diff@1.3.0: - resolution: {integrity: sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==} - dev: false - /fast-glob@3.3.1: resolution: {integrity: sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==} engines: {node: '>=8.6.0'} @@ -13285,11 +13188,6 @@ packages: resolution: {integrity: sha512-B4FFZ6q/T2jhhksgkbEW3HBvWIfDW85snkQgawt07S7J5QXTk6BkNV+0yAeZrM5QpMAdYlocGoljn0sJ/WQkFw==} engines: {node: '>=10.17.0'} - /human-signals@4.3.1: - resolution: {integrity: sha512-nZXjEF2nbo7lIw3mgYjItAfgQXog3OjJogSbKa2CQIIvSGWcKgeJnQlNXip6NglNzYH45nSRiEVimMvYL8DDqQ==} - engines: {node: '>=14.18.0'} - dev: false - /humanize-ms@1.2.1: resolution: {integrity: sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ==} dependencies: @@ -13568,12 +13466,6 @@ packages: engines: {node: '>=8'} hasBin: true - /is-docker@3.0.0: - resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - hasBin: true - dev: false - /is-extendable@0.1.1: resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} engines: {node: '>=0.10.0'} @@ -13613,14 +13505,6 @@ packages: dependencies: is-extglob: 2.1.1 - /is-inside-container@1.0.0: - resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} - engines: {node: '>=14.16'} - hasBin: true - dependencies: - is-docker: 3.0.0 - dev: false - /is-interactive@1.0.0: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} @@ -13714,11 +13598,6 @@ packages: resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==} engines: {node: '>=8'} - /is-stream@3.0.0: - resolution: {integrity: sha512-LnQR4bZ9IADDRSkvpqMGvt/tEJWclzklNgSw48V5EAaAeDd6qGvN8ei6k5p0tvxSR171VmGyHuTiAOfxAbr8kA==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dev: false - /is-string@1.0.7: resolution: {integrity: sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==} engines: {node: '>= 0.4'} @@ -14605,11 +14484,6 @@ packages: resolution: {integrity: sha512-Ysbi9uYW9hFyfrThdDEQuykN4Ey6BuwPD2kpI5ES/nFTDn/98yxYNLZJcgUAKPT/mcrLLKaGzJR9YVxJrIdASQ==} engines: {node: '>=8'} - /mimic-fn@4.0.0: - resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} - engines: {node: '>=12'} - dev: false - /mimic-response@1.0.1: resolution: {integrity: sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==} engines: {node: '>=4'} @@ -14997,13 +14871,6 @@ packages: dependencies: path-key: 3.1.1 - /npm-run-path@5.1.0: - resolution: {integrity: sha512-sJOdmRGrY2sjNTRMbSvluQqg+8X7ZK61yvzBEIDhz4f8z1TZFYABsqjjCBd/0PUNE9M6QDgHJXQkGUEm7Q+l9Q==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - dependencies: - path-key: 4.0.0 - dev: false - /npmlog@6.0.2: resolution: {integrity: sha512-/vBvz5Jfr9dT/aFWd0FIRf+T/Q2WBsLENygUaFUqstqsycmZAP/t5BvFJTK0viFmSUxiUKTUplWy5vt+rvKIxg==} engines: {node: ^12.13.0 || ^14.15.0 || >=16.0.0} @@ -15134,23 +15001,6 @@ packages: dependencies: mimic-fn: 2.1.0 - /onetime@6.0.0: - resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} - engines: {node: '>=12'} - dependencies: - mimic-fn: 4.0.0 - dev: false - - /open@9.1.0: - resolution: {integrity: sha512-OS+QTnw1/4vrf+9hh1jc1jnYjzSG4ttTBB8UxOwAnInG3Uo4ssetzC1ihqaIHjLJnA5GGlRl6QlZXOTQhRBUvg==} - engines: {node: '>=14.16'} - dependencies: - default-browser: 4.0.0 - define-lazy-prop: 3.0.0 - is-inside-container: 1.0.0 - is-wsl: 2.2.0 - dev: false - /optionator@0.9.3: resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} @@ -15414,11 +15264,6 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - /path-key@4.0.0: - resolution: {integrity: sha512-haREypq7xkM7ErfgIyA0z+Bj4AGKlMSdlQE2jvJo6huWD1EdkKYV+G/T4nq0YEF2vgTT8kqMFKo1uHn950r4SQ==} - engines: {node: '>=12'} - dev: false - /path-name@1.0.0: resolution: {integrity: sha512-/dcAb5vMXH0f51yvMuSUqFpxUcA8JelbRmE5mW/p4CUJxrNgK24IkstnV7ENtg2IDGBOu6izKTG6eilbnbNKWQ==} @@ -15707,13 +15552,6 @@ packages: route-recognizer: 0.3.4 dev: true - /prettier-linter-helpers@1.0.0: - resolution: {integrity: sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==} - engines: {node: '>=6.0.0'} - dependencies: - fast-diff: 1.3.0 - dev: false - /prettier@2.8.8: resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} engines: {node: '>=10.13.0'} @@ -15723,7 +15561,7 @@ packages: resolution: {integrity: sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==} engines: {node: '>=14'} hasBin: true - dev: false + dev: true /pretty-bytes@5.6.0: resolution: {integrity: sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg==} @@ -16407,13 +16245,6 @@ packages: resolution: {integrity: sha512-nfMOlASu9OnRJo1mbEk2cz0D56a1MBNrJ7orjRZQG10XDyuvwksKbuXNp6qa+kbn839HwjwhBzhFmdsaEAfauA==} engines: {node: 6.* || >= 7.*} - /run-applescript@5.0.0: - resolution: {integrity: sha512-XcT5rBksx1QdIhlFOCtgZkB99ZEouFZ1E2Kc2LHqNW13U3/74YGdkQRmThTwxy4QIyookibDKYZOPqX//6BlAg==} - engines: {node: '>=12'} - dependencies: - execa: 5.1.1 - dev: false - /run-async@2.4.1: resolution: {integrity: sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==} engines: {node: '>=0.12.0'} @@ -17112,11 +16943,6 @@ packages: resolution: {integrity: sha512-BrpvfNAE3dcvq7ll3xVumzjKjZQ5tI1sEUIKr3Uoks0XUl45St3FlatVqef9prk4jRDzhW6WZg+3bk93y6pLjA==} engines: {node: '>=6'} - /strip-final-newline@3.0.0: - resolution: {integrity: sha512-dOESqjYr96iWYylGObzd39EuNTa5VJxyvVAEm5Jnh7KGo75V43Hk1odPQkNDyXNmUR6k+gEiDVXnjB8HJ3crXw==} - engines: {node: '>=12'} - dev: false - /strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -17211,14 +17037,6 @@ packages: transitivePeerDependencies: - supports-color - /synckit@0.8.5: - resolution: {integrity: sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q==} - engines: {node: ^14.18.0 || >=16.0.0} - dependencies: - '@pkgr/utils': 2.4.2 - tslib: 2.6.2 - dev: false - /systeminformation@5.21.13: resolution: {integrity: sha512-sGgMhQxxjKHSIJtv7g5s19IRpfCgLG3tZqGbFcfGFyMm1hJ3BmzTfaq0yyOO2oLHlbkM49mgMjnPPB8g573LMA==} engines: {node: '>=8.0.0'} @@ -17470,11 +17288,6 @@ packages: /tiny-readdir@2.2.0: resolution: {integrity: sha512-bO4IgID5M2x5YQFBru/wREgT30YuA8aoOd/F8Rd6LKRIn1gOe9aREjT74J9EVukHqI/2RB+4SM1RgXM0gwxoWw==} - /titleize@3.0.0: - resolution: {integrity: sha512-KxVu8EYHDPBdUYdKZdKtU2aj2XfEx9AfjXxE/Aj0vT06w2icA09Vus1rh6eSu1y01akYg6BjIK/hxyLJINoMLQ==} - engines: {node: '>=12'} - dev: false - /tmp-sync@1.1.2: resolution: {integrity: sha512-npRDYJiMaPWhcLf6q06v/vA3o/ZG4hfHDiBuj1N3Yeh3GTkFQb1YLFs6inDGMWIHjGidl4Oc1+oXHNKKj5vkDQ==} engines: {node: '>=0.8.0'} @@ -17903,11 +17716,6 @@ packages: has-value: 0.3.1 isobject: 3.0.1 - /untildify@4.0.0: - resolution: {integrity: sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw==} - engines: {node: '>=8'} - dev: false - /update-browserslist-db@1.0.13(browserslist@4.22.1): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index c0e7cb151af..bcfbc43e1e3 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,4 +1,4 @@ packages: - - 'packages/*' - - 'tests/*' - - 'config' + - "packages/*" + - "tests/*" + - "config" diff --git a/scripts/copy-declarations.mjs b/scripts/copy-declarations.mjs index 4f773e35fc1..94edd3cb403 100644 --- a/scripts/copy-declarations.mjs +++ b/scripts/copy-declarations.mjs @@ -40,7 +40,15 @@ async function main() { const relativeInputPath = path.relative(process.cwd(), inputPath); const relativeOutputPath = path.relative(process.cwd(), outputPath); - console.log(chalk.grey(chalk.bold(`\nCopying ${chalk.cyan('**/*.d.ts')} files\n\tfrom: ${chalk.yellow(relativeInputPath)}\n\tto: ${chalk.yellow(relativeOutputPath)}`))); + console.log( + chalk.grey( + chalk.bold( + `\nCopying ${chalk.cyan('**/*.d.ts')} files\n\tfrom: ${chalk.yellow(relativeInputPath)}\n\tto: ${chalk.yellow( + relativeOutputPath + )}` + ) + ) + ); const files = await globby([`${inputPath}/**/*.d.ts`]); diff --git a/scripts/explain.mjs b/scripts/explain.mjs index a939b14ad06..da9fa104d1d 100644 --- a/scripts/explain.mjs +++ b/scripts/explain.mjs @@ -2,18 +2,8 @@ import chalk from 'chalk'; /** @type {import('bun-types')} */ -const MarkerLines = new Set([ - 'devDependencies:', - 'dependencies:', - 'peerDependencies:', -]); -const GraphMarkers = new Set([ - '├', - '│', - '└', - '─', - '┬', -]); +const MarkerLines = new Set(['devDependencies:', 'dependencies:', 'peerDependencies:']); +const GraphMarkers = new Set(['├', '│', '└', '─', '┬']); async function main() { const args = Bun.argv.slice(2); @@ -24,7 +14,7 @@ async function main() { const output = Bun.spawnSync(['pnpm', 'why', pkgName], { cwd: process.cwd(), env: process.env, - shell: true + shell: true, }); const versions = {}; diff --git a/tests/fastboot/public/api/people.json b/tests/fastboot/public/api/people.json index 066c1f0abc1..c936e321509 100644 --- a/tests/fastboot/public/api/people.json +++ b/tests/fastboot/public/api/people.json @@ -29,4 +29,4 @@ "children": [], "parent": "3:has-2-children-and-parent" } -] \ No newline at end of file +] diff --git a/tests/main/public/assets/users/list.json b/tests/main/public/assets/users/list.json index 5391c783051..c3ce2908e59 100644 --- a/tests/main/public/assets/users/list.json +++ b/tests/main/public/assets/users/list.json @@ -6,11 +6,13 @@ "expiration": 120000, "total": 1 }, - "data": [{ - "type": "user", - "id": "1", - "attributes": { - "name": "Chris Thoburn" + "data": [ + { + "type": "user", + "id": "1", + "attributes": { + "name": "Chris Thoburn" + } } - }] + ] } diff --git a/turbo.json b/turbo.json index ab5d4bdd216..97f7184ecdd 100644 --- a/turbo.json +++ b/turbo.json @@ -3,11 +3,7 @@ // Additive to package.json and turbo.json // // https://turbo.build/repo/docs/core-concepts/caching/file-inputs#specifying-additional-inputs - "globalDependencies": [ - "pnpm-lock.yaml", - "patches/*", - ".github/*" - ], + "globalDependencies": ["pnpm-lock.yaml", "patches/*", ".github/*"], "pipeline": { ///////////////////////////////////////////////// ///////////////////////////////////////////////// @@ -129,4 +125,4 @@ "dependsOn": ["build:production"] } } -} \ No newline at end of file +}