Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update lint and some build deps #117

Merged
merged 2 commits into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@
"docs:watch": "typedoc --options ./typedoc.config.json --watch"
},
"devDependencies": {
"typedoc": "^0.25.0",
"typedoc-github-wiki-theme": "^1.0.1",
"typedoc-gitlab-wiki-theme": "^1.0.0",
"typedoc-plugin-markdown": "^3.14.0",
"typedoc": "^0.26.7",
"typedoc-github-wiki-theme": "^2.0.0",
"typedoc-gitlab-wiki-theme": "^2.0.1",
"typedoc-plugin-markdown": "^4.2.7",
"typedoc-plugin-markdown-pages": "^0.3.0",
"typedoc-plugin-mdn-links": "^3.0.3",
"typescript": "^5.0.0"
"typedoc-plugin-mdn-links": "^3.2.12",
"typescript": "^5.6.2"
},
"engines": {
"node": ">= 18"
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
},
"devDependencies": {
"@glint/core": "^1.2.1",
"concurrently": "^8.2.2",
"concurrently": "^9.0.1",
"prettier": "^3.0.3",
"prettier-plugin-ember-template-tag": "^2.0.0",
"release-plan": "^0.8.0"
"release-plan": "^0.9.2"
},
"volta": {
"node": "20.11.1",
Expand Down
2,402 changes: 1,190 additions & 1,212 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

20 changes: 10 additions & 10 deletions reactiveweb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@
},
"dependencies": {
"@embroider/addon-shim": "^1.8.6",
"@embroider/macros": "^1.13.4",
"decorator-transforms": "^1.0.3",
"@embroider/macros": "^1.16.6",
"decorator-transforms": "^2.0.0",
"ember-async-data": "^1.0.3",
"ember-cached-decorator-polyfill": "^1.0.2",
"ember-resources": ">= 6.4.2"
Expand All @@ -79,25 +79,25 @@
"@glint/environment-ember-loose": "^1.2.1",
"@glint/environment-ember-template-imports": "^1.2.1",
"@glint/template": "^1.2.1",
"@nullvoxpopuli/eslint-configs": "^3.2.2",
"@nullvoxpopuli/eslint-configs": "^4.2.0",
"@rollup/plugin-babel": "^6.0.4",
"@tsconfig/ember": "^3.0.1",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"babel-plugin-ember-template-compilation": "^2.2.0",
"concurrently": "^8.2.2",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"babel-plugin-ember-template-compilation": "^2.3.0",
"concurrently": "^9.0.1",
"ember-source": "~5.5.0",
"ember-template-lint": "^6.0.0",
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ember": "^12.0.0",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.0.1",
"prettier": "^3.0.3",
"prettier-plugin-ember-template-tag": "^2.0.0",
"rollup": "^4.9.5",
"rollup": "^4.21.3",
"rollup-plugin-copy": "^3.5.0",
"typescript": "^5.0.4"
"typescript": "^5.6.2"
},
"publishConfig": {
"registry": "https://registry.npmjs.org"
Expand Down
3 changes: 2 additions & 1 deletion reactiveweb/rollup.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Addon } from "@embroider/addon-dev/rollup";

import { babel } from "@rollup/plugin-babel";
import copy from "rollup-plugin-copy";
import { Addon } from "@embroider/addon-dev/rollup";

const addon = new Addon({
srcDir: "src",
Expand Down
23 changes: 20 additions & 3 deletions reactiveweb/src/-private/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,26 @@ export interface Class<Instance> {
new (...args: unknown[]): Instance;
}

// This is a bit of a lie, because we don't have an easy way to
// represent an object with no properties.
export type EmptyObject = {};
// --- Type utilities for component signatures --- //
// Type-only "symbol" to use with `EmptyObject` below, so that it is *not*
// equivalent to an empty interface.
declare const Empty: unique symbol;

/**
* This provides us a way to have a "fallback" which represents an empty object,
* without the downsides of how TS treats `{}`. Specifically: this will
* correctly leverage "excess property checking" so that, given a component
* which has no named args, if someone invokes it with any named args, they will
* get a type error.
*
* @internal This is exported so declaration emit works (if it were not emitted,
* declarations which fall back to it would not work). It is *not* intended for
* public usage, and the specific mechanics it uses may change at any time.
* The location of this export *is* part of the public API, because moving it
* will break existing declarations, but is not legal for end users to import
* themselves, so ***DO NOT RELY ON IT***.
*/
export type EmptyObject = { [Empty]?: true };

export type GetOrElse<Obj, K, Fallback> = K extends keyof Obj ? Obj[K] : Fallback;

Expand Down
1 change: 0 additions & 1 deletion reactiveweb/src/ember-concurrency.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
/* eslint-disable @typescript-eslint/ban-types */
/* eslint-disable ember/no-get */
import { assert } from '@ember/debug';
import { associateDestroyableChild, registerDestructor } from '@ember/destroyable';
Expand Down
2 changes: 1 addition & 1 deletion reactiveweb/src/link.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ function linkDecoratorFactory(child: Class<unknown>) {

function linkDecorator(
_prototype: object,
key: string | Symbol,
key: string | symbol,
descriptor: Stage1DecoratorDescriptor | undefined,
explicitChild?: Class<unknown>
): void {
Expand Down
2 changes: 2 additions & 0 deletions reactiveweb/src/resource/modifier/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ export function modifier<S extends { Element?: Element; Args?: object }>(
export function modifier(fn: (element: Element, ...args: unknown[]) => void): ModifierLike<{
Element: Element;
Args: {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
Named: {};
Positional: [];
};
Expand All @@ -211,6 +212,7 @@ export function modifier(fn: (element: Element, ...args: unknown[]) => void): Mo
return fn as unknown as ModifierLike<{
Element: Element;
Args: {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
Named: {};
Positional: [];
};
Expand Down
1 change: 0 additions & 1 deletion reactiveweb/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/ban-types */
import type { ArgsWrapper, Thunk } from 'ember-resources';

export const DEFAULT_THUNK = () => [];
Expand Down
9 changes: 0 additions & 9 deletions reactiveweb/unpublished-development-types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,3 @@
import 'ember-source/types';
import 'ember-source/types/preview';
import '@glint/environment-ember-loose';

declare module '@glint/environment-ember-loose/registry' {
// Remove this once entries have been added! 👇
// eslint-disable-next-line @typescript-eslint/no-empty-interface
export default interface Registry {
// Add any registry entries from other addons here that your addon itself uses (in non-strict mode templates)
// See https://typed-ember.gitbook.io/glint/using-glint/ember/using-addons
}
}
28 changes: 14 additions & 14 deletions tests/min-supported/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,22 +37,22 @@
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^3.2.1",
"@embroider/compat": "^3.2.3",
"@embroider/core": "^3.3.0",
"@embroider/webpack": "^4.0.4",
"@embroider/compat": "^3.6.1",
"@embroider/core": "^3.4.15",
"@embroider/webpack": "^4.0.5",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@glint/environment-ember-loose": "^1.2.1",
"@glint/template": "^1.2.1",
"@tsconfig/ember": "^3.0.1",
"@types/qunit": "^2.19.7",
"@types/rsvp": "^4.0.6",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.2.2",
"concurrently": "^9.0.1",
"ember-async-data": "0.7.1",
"ember-auto-import": "^2.6.3",
"ember-auto-import": "^2.8.0",
"ember-cli": "~4.12.1",
"ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^8.2.0",
Expand All @@ -73,7 +73,7 @@
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ember": "^12.0.0",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-qunit": "^8.0.1",
"graphql": "^16.9.0",
Expand All @@ -83,11 +83,11 @@
"qunit": "^2.20.0",
"qunit-dom": "^3.0.0",
"reactiveweb": "workspace:*",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.0.2",
"stylelint": "^16.9.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-prettier": "^5.0.2",
"tracked-built-ins": "^3.3.0",
"typescript": "^5.2.2",
"typescript": "^5.6.2",
"webpack": "^5.89.0"
},
"engines": {
Expand All @@ -98,12 +98,12 @@
},
"dependencies": {
"@ember/test-waiters": "^3.1.0",
"@nullvoxpopuli/eslint-configs": "^3.2.2",
"@nullvoxpopuli/eslint-configs": "^4.2.0",
"ember-cached-decorator-polyfill": "^1.0.2",
"ember-concurrency": "^3.1.1",
"ember-modify-based-class-resource": "^1.1.0",
"ember-resources": "^6.5.1",
"msw": "^2.4.1"
"msw": "^2.4.7"
},
"msw": {
"workerDirectory": "public"
Expand Down
30 changes: 15 additions & 15 deletions tests/test-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@
"@ember/optional-features": "^2.0.0",
"@ember/string": "^3.1.1",
"@ember/test-helpers": "^4.0.2",
"@embroider/compat": "^3.4.3",
"@embroider/core": "^3.4.3",
"@embroider/webpack": "^4.0.4",
"@embroider/compat": "^3.6.1",
"@embroider/core": "^3.4.15",
"@embroider/webpack": "^4.0.5",
"@glimmer/component": "^1.1.2",
"@glimmer/tracking": "^1.1.2",
"@glint/core": "^1.2.1",
Expand All @@ -50,11 +50,11 @@
"@tsconfig/ember": "^3.0.1",
"@types/qunit": "^2.19.7",
"@types/rsvp": "^4.0.6",
"@typescript-eslint/eslint-plugin": "^6.9.0",
"@typescript-eslint/parser": "^6.9.0",
"@typescript-eslint/eslint-plugin": "^8.6.0",
"@typescript-eslint/parser": "^8.6.0",
"broccoli-asset-rev": "^3.0.0",
"concurrently": "^8.2.2",
"ember-auto-import": "^2.7.2",
"concurrently": "^9.0.1",
"ember-auto-import": "^2.8.0",
"ember-cli": "~5.4.0",
"ember-cli-app-version": "^6.0.1",
"ember-cli-babel": "^8.2.0",
Expand All @@ -74,7 +74,7 @@
"eslint": "^8.52.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-ember": "^12.0.0",
"eslint-plugin-n": "^16.2.0",
"eslint-plugin-n": "^17.10.2",
"eslint-plugin-prettier": "^5.0.1",
"eslint-plugin-qunit": "^8.0.1",
"graphql": "^16.9.0",
Expand All @@ -84,11 +84,11 @@
"qunit": "^2.20.0",
"qunit-dom": "^3.0.0",
"reactiveweb": "workspace:*",
"stylelint": "^15.11.0",
"stylelint-config-standard": "^34.0.0",
"stylelint-prettier": "^4.0.2",
"stylelint": "^16.9.0",
"stylelint-config-standard": "^36.0.1",
"stylelint-prettier": "^5.0.2",
"tracked-built-ins": "^3.3.0",
"typescript": "^5.2.2",
"typescript": "^5.6.2",
"webpack": "^5.89.0"
},
"engines": {
Expand All @@ -99,12 +99,12 @@
},
"dependencies": {
"@ember/test-waiters": "^3.1.0",
"@embroider/macros": "^1.13.4",
"@nullvoxpopuli/eslint-configs": "^3.2.2",
"@embroider/macros": "^1.16.6",
"@nullvoxpopuli/eslint-configs": "^4.2.0",
"ember-concurrency": "^3.1.1",
"ember-modify-based-class-resource": "^1.1.0",
"ember-resources": "^6.5.1",
"msw": "^2.4.1"
"msw": "^2.4.7"
},
"msw": {
"workerDirectory": "public"
Expand Down
1 change: 1 addition & 0 deletions tests/test-app/tests/utils/ember-concurrency/js-test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-expressions */
/* eslint-disable @typescript-eslint/no-explicit-any */
import { tracked } from '@glimmer/tracking';
import { settled } from '@ember/test-helpers';
Expand Down
1 change: 1 addition & 0 deletions tests/test-app/tests/utils/function/js-test.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-expressions */
import { tracked } from '@glimmer/tracking';
import { destroy, isDestroyed, isDestroying } from '@ember/destroyable';
import { settled } from '@ember/test-helpers';
Expand Down
1 change: 1 addition & 0 deletions tests/test-app/types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import '@glint/environment-ember-loose';
import type PageTitle from 'ember-page-title/template-registry';

declare module '@glint/environment-ember-loose/registry' {
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
export default interface Registry extends PageTitle {
/* your local loose-mode entries here */
}
Expand Down