Skip to content

Commit c8ebf57

Browse files
committed
chore: misc fixes from 4x branch
1 parent 06ba47b commit c8ebf57

File tree

18 files changed

+36
-44
lines changed

18 files changed

+36
-44
lines changed

packages/-ember-data/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"@ember/test-waiters": "^3.1.0",
150150
"@glimmer/component": "^1.1.2",
151151
"@glimmer/tracking": "^1.1.2",
152-
"@types/qunit": "^2.19.10",
152+
"@types/qunit": "2.19.10",
153153
"@ember/test-helpers": "4.0.4",
154154
"@warp-drive/internal-config": "workspace:*",
155155
"ember-source": "~5.12.0",

packages/experiments/src/persisted-cache/cache.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ export class PersistedCache implements Cache {
393393
* @method changedAttrs
394394
* @internal
395395
* @param identifier
396-
* @returns
396+
* @return
397397
*/
398398
changedAttrs(identifier: StableRecordIdentifier): ChangedAttributesHash {
399399
return this._cache.changedAttrs(identifier);
@@ -524,7 +524,7 @@ export class PersistedCache implements Cache {
524524
* @method getErrors
525525
* @internal
526526
* @param identifier
527-
* @returns
527+
* @return
528528
*/
529529
getErrors(identifier: StableRecordIdentifier): ApiError[] {
530530
return this._cache.getErrors(identifier);

packages/model/src/-private/many-array.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ type PromiseProxyRecord = { then(): void; content: OpaqueRecordInstance | null |
468468

469469
function assertRecordPassedToHasMany(record: OpaqueRecordInstance | PromiseProxyRecord) {
470470
assert(
471-
`All elements of a hasMany relationship must be instances of Model, you passed $${typeof record}`,
471+
`All elements of a hasMany relationship must be instances of Model, you passed ${typeof record}`,
472472
(function () {
473473
try {
474474
recordIdentifierFor(record);

packages/model/src/-private/util.ts

-14
Original file line numberDiff line numberDiff line change
@@ -25,20 +25,6 @@ export function isElementDescriptor(args: unknown[]): args is [object, string, D
2525
);
2626
}
2727

28-
export type DataDecorator = (
29-
target: object,
30-
key: string,
31-
desc?: DecoratorPropertyDescriptor
32-
) => DecoratorPropertyDescriptor;
33-
export type DataDecoratorFactory = (...args: unknown[]) => DataDecorator;
34-
35-
export function computedMacroWithOptionalParams(fn: DataDecorator | DataDecoratorFactory) {
36-
return (...maybeDesc: unknown[]) =>
37-
isElementDescriptor(maybeDesc)
38-
? (fn as DataDecoratorFactory)()(...maybeDesc)
39-
: fn(...(maybeDesc as [object, string, DecoratorPropertyDescriptor?]));
40-
}
41-
4228
export function normalizeModelName(type: string): string {
4329
if (DEPRECATE_NON_STRICT_TYPES) {
4430
const result = dasherize(type);

packages/store/eslint.config.mjs

+8-1
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,23 @@
22
import { globalIgnores } from '@warp-drive/internal-config/eslint/ignore.js';
33
import * as node from '@warp-drive/internal-config/eslint/node.js';
44
import * as typescript from '@warp-drive/internal-config/eslint/typescript.js';
5+
import * as js from '@warp-drive/internal-config/eslint/browser.js';
6+
import { externals } from './vite.config.mjs';
57

68
/** @type {import('eslint').Linter.FlatConfig[]} */
79
export default [
810
// all ================
911
globalIgnores(),
1012

13+
js.browser({
14+
srcDirs: ['src'],
15+
allowedImports: externals,
16+
}),
17+
1118
// browser (js/ts) ================
1219
typescript.browser({
1320
srcDirs: ['src'],
14-
allowedImports: ['@ember/debug', '@ember/object'],
21+
allowedImports: externals,
1522
}),
1623

1724
// node (module) ================

packages/store/src/-private/caches/resource-utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ function isResource(resource: unknown): resource is Record<string, unknown> {
44

55
function hasProp<T extends string, K extends { [J in T]: string }>(resource: unknown, prop: T): resource is K {
66
return Boolean(
7-
isResource(resource) && prop in resource && typeof resource[prop] === 'string' && (resource[prop] as string).length
7+
isResource(resource) && prop in resource && typeof resource[prop] === 'string' && resource[prop].length
88
);
99
}
1010

packages/store/src/-private/managers/notification-manager.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @module @ember-data/store
33
*/
4-
// eslint-disable-next-line no-restricted-imports
4+
55
import { _backburner } from '@ember/runloop';
66

77
import { LOG_NOTIFICATIONS } from '@warp-drive/build-config/debugging';

packages/tracking/src/-private.ts

+1
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ export function createSignal<T extends object>(obj: T, key: string): Signal {
426426
}
427427
const modelName =
428428
tryGet('$type') ?? tryGet('modelName') ?? tryGet<{ modelName?: string }>('constructor')?.modelName ?? '';
429+
429430
const className = obj.constructor?.name ?? obj.toString?.() ?? 'unknown';
430431
_signal._debug_base = `${className}${modelName && !className.startsWith('SchemaRecord') ? `:${modelName}` : ''}`;
431432
}

packages/unpublished-test-infra/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
"@ember/test-helpers": "4.0.4",
105105
"@glimmer/component": "^1.1.2",
106106
"@types/semver": "^7.5.8",
107-
"@types/qunit": "^2.19.10",
107+
"@types/qunit": "2.19.10",
108108
"@ember-data/request": "workspace:*",
109109
"@ember-data/request-utils": "workspace:*",
110110
"@ember-data/store": "workspace:*",

pnpm-lock.yaml

+12-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/ember-data__model/package.json

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@
7575
"@ember/test-helpers": "4.0.4",
7676
"@ember/test-waiters": "^3.1.0",
7777
"@embroider/addon-shim": "^1.8.9",
78+
"@embroider/macros": "^1.16.6",
7879
"@glimmer/component": "^1.1.2",
7980
"@glimmer/tracking": "^1.1.2",
8081
"@warp-drive/core-types": "workspace:*",

tests/ember-data__serializer/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@
9393
"ember-cli-inject-live-reload": "^2.1.0",
9494
"ember-load-initializers": "^2.1.2",
9595
"ember-maybe-import-regenerator": "^1.0.0",
96-
"ember-qunit": "^8.0.2",
96+
"ember-qunit": "8.0.2",
9797
"ember-resolver": "^11.0.1",
9898
"ember-source": "~5.12.0",
9999
"loader.js": "^4.7.0",

tests/embroider-basic-compat/ember-cli-build.js

-3
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,6 @@ module.exports = async function (defaults) {
2121

2222
setConfig(app, __dirname, {
2323
compatWith: process.env.EMBER_DATA_FULL_COMPAT ? '99.0' : null,
24-
deprecations: {
25-
DEPRECATE_CATCH_ALL: false,
26-
},
2724
});
2825

2926
const { Webpack } = require('@embroider/webpack');

tests/embroider-basic-compat/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@
111111
"ember-inflector": "4.0.3",
112112
"ember-load-initializers": "^2.1.2",
113113
"ember-maybe-import-regenerator": "^1.0.0",
114-
"ember-qunit": "^8.0.2",
114+
"ember-qunit": "8.0.2",
115115
"ember-resolver": "^11.0.1",
116116
"ember-simple-tree": "^0.8.4",
117117
"ember-source": "~5.12.0",

tests/fastboot/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
"ember-inflector": "4.0.3",
9191
"ember-load-initializers": "^2.1.2",
9292
"ember-maybe-import-regenerator": "^1.0.0",
93-
"ember-qunit": "^8.0.2",
93+
"ember-qunit": "8.0.2",
9494
"ember-resolver": "^11.0.1",
9595
"ember-simple-tree": "^0.8.4",
9696
"ember-source": "~5.12.0",

tests/main/config/ember-try.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ module.exports = function () {
1111
name: 'ember-lts-4.4',
1212
npm: {
1313
devDependencies: {
14-
'@ember/test-helpers': '3.3.0',
1514
'ember-source': '~4.4.0',
1615
},
1716
},
@@ -36,9 +35,8 @@ module.exports = function () {
3635
name: 'ember-lts-3.28',
3736
npm: {
3837
devDependencies: {
39-
'@ember/test-helpers': '3.3.0',
38+
'ember-cli': '~4.12.3',
4039
'ember-source': '~3.28.0',
41-
'ember-cli': '~4.12.2',
4240
},
4341
},
4442
},
@@ -47,7 +45,6 @@ module.exports = function () {
4745
npm: {
4846
devDependencies: {
4947
'ember-source': urls[0],
50-
'@glimmer/component': '^1.1.2',
5148
},
5249
},
5350
},

tests/main/package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@
106106
"@glint/environment-ember-loose": "1.5.0",
107107
"@glint/environment-ember-template-imports": "1.5.0",
108108
"@glint/template": "1.5.0",
109-
"@types/qunit": "^2.19.10",
109+
"@types/qunit": "2.19.10",
110110
"@warp-drive/core-types": "workspace:*",
111111
"@warp-drive/schema-record": "workspace:*",
112112
"@warp-drive/build-config": "workspace:*",
@@ -135,7 +135,7 @@
135135
"ember-load-initializers": "^2.1.2",
136136
"ember-maybe-import-regenerator": "^1.0.0",
137137
"ember-template-imports": "4.1.3",
138-
"ember-qunit": "^8.0.2",
138+
"ember-qunit": "8.0.2",
139139
"ember-resolver": "^11.0.1",
140140
"ember-source": "~5.12.0",
141141
"ember-source-channel-url": "^3.0.0",

tests/warp-drive__schema-record/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@
8686
"@glint/environment-ember-loose": "1.5.0",
8787
"@glint/environment-ember-template-imports": "1.5.0",
8888
"@glint/template": "1.5.0",
89-
"@types/qunit": "^2.19.10",
89+
"@types/qunit": "2.19.10",
9090
"@warp-drive/core-types": "workspace:*",
9191
"@warp-drive/internal-config": "workspace:*",
9292
"@warp-drive/schema-record": "workspace:*",

0 commit comments

Comments
 (0)