Skip to content

Commit

Permalink
yarn run up (#236)
Browse files Browse the repository at this point in the history
  • Loading branch information
quisido authored Oct 20, 2024
1 parent 01f1e3e commit f17b09a
Show file tree
Hide file tree
Showing 103 changed files with 6,915 additions and 7,340 deletions.
894 changes: 0 additions & 894 deletions .yarn/releases/yarn-4.3.0.cjs

This file was deleted.

934 changes: 934 additions & 0 deletions .yarn/releases/yarn-4.5.1.cjs

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,9 @@ packageExtensions:
recharts@*:
dependencies:
prop-types: ^15.0.0
vitest@*:
dependencies:
"@types/chai": ^5.0.0
"@types/debug": ^4.1.12

yarnPath: .yarn/releases/yarn-4.3.0.cjs
yarnPath: .yarn/releases/yarn-4.5.1.cjs
2 changes: 1 addition & 1 deletion eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import configs from '@quisido/eslint-config';

/** @type {readonly import('eslint').Linter.FlatConfig[]} */
/** @type {readonly import('eslint').Linter.Config[]} */
export default [
...configs,

Expand Down
48 changes: 24 additions & 24 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"author": "quisi.do <[email protected]>",
"description": "quisi.do",
"homepage": "https://quisi.do/",
"packageManager": "yarn@4.3.0",
"packageManager": "yarn@4.5.1",
"private": true,
"type": "module",
"bugs": {
Expand Down Expand Up @@ -43,7 +43,7 @@
"pack:dry-run": "yarn workspaces foreach --all --exclude \"@quisi/do\" --interlaced --jobs unlimited --parallel --topological-dev --verbose pack --dry-run",
"postlighthouse": "yarn packages/next run postlighthouse",
"prepack": "yarn workspaces foreach --all --exclude \"@quisi/do\" --interlaced --jobs unlimited --parallel --topological-dev --verbose run prepack",
"prepack:limited": "yarn workspaces foreach --all --exclude \"@quisi/do\" --topological-dev run prepack",
"prepack:limited": "yarn workspaces foreach --all --exclude \"@quisi/do\" --topological-dev --verbose run prepack",
"prepublish": "concurrently --kill-others-on-fail --names eslint,prepublish,publint,test,vitest \"yarn run eslint\" \"yarn run prepublish:workspaces\" \"yarn run publint\" \"yarn run test\" \"yarn run vitest:run\"",
"prepublish:workspaces": "yarn workspaces foreach --all --exclude \"@quisi/do\" --verbose run prepublish",
"publint": "publint",
Expand All @@ -62,38 +62,38 @@
"packages/*"
],
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@eslint/js": "^9.5.0",
"@arethetypeswrong/cli": "^0.16.4",
"@babel/core": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@babel/preset-typescript": "^7.25.7",
"@eslint/js": "^9.13.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@monorepo-template/test": "workspace:^",
"@quisido/eslint-config": "workspace:^",
"@quisido/vitest-config": "workspace:^",
"@types/babel__core": "^7.20.5",
"@types/babel__preset-env": "^7.9.7",
"@types/eslint": "^8.56.10",
"@types/eslint": "^9.6.1",
"@types/eslint__js": "^8.42.3",
"@types/node": "^20.14.9",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@vitest/coverage-istanbul": "^1.6.0",
"@yarnpkg/sdks": "^3.1.3",
"@types/node": "^22.7.7",
"@typescript-eslint/eslint-plugin": "^8.10.0",
"@typescript-eslint/parser": "^8.10.0",
"@vitest/coverage-istanbul": "^2.1.3",
"@yarnpkg/sdks": "^3.2.0",
"babel-plugin-replace-import-extension": "^1.1.4",
"browserslist": "^4.23.1",
"browserslist": "^4.24.0",
"cjs-ts": "workspace:^",
"concurrently": "^8.2.2",
"dd-trace": "^5.17.0",
"eslint": "^9.5.0",
"concurrently": "^9.0.1",
"dd-trace": "^5.24.0",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-react": "^7.34.3",
"prettier": "^3.3.2",
"publint": "^0.2.10",
"typescript": "~5.4.5",
"typescript-eslint": "^7.14.1",
"vitest": "^1.6.0"
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-react": "^7.37.1",
"prettier": "^3.3.3",
"publint": "^0.2.11",
"typescript": "^5.6.3",
"typescript-eslint": "^8.10.0",
"vitest": "^2.1.3"
},
"resolutions": {
"buildcheck@npm:~0.0.6": "patch:buildcheck@npm%3A0.0.6#~/.yarn/patches/buildcheck-npm-0.0.6-46e0f23ecf.patch",
Expand Down
2 changes: 1 addition & 1 deletion packages/authn-shared/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import configs from '@quisido/eslint-config';

/** @type {readonly import('eslint').Linter.FlatConfig[]} */
/** @type {readonly import('eslint').Linter.Config[]} */
export default [
...configs,

Expand Down
38 changes: 19 additions & 19 deletions packages/authn-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,36 +36,36 @@
"prepack": "yarn run tsc",
"prepublish": "concurrently --kill-others-on-fail --names attw,eslint,publint,vitest \"yarn run attw\" \"yarn run eslint\" \"yarn run publint\" \"yarn run vitest:run\"",
"publint": "publint",
"tsc": "tsc --generateCpuProfile tsc-output.cpuprofile --project tsconfig.prepack.json",
"tsc": "tsc --project tsconfig.prepack.json",
"vitest": "vitest",
"vitest:run": "vitest run",
"vitest:watch": "vitest watch"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.15.3",
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@arethetypeswrong/cli": "^0.16.4",
"@babel/core": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@quisido/eslint-config": "workspace:^",
"@quisido/vitest-config": "workspace:^",
"@typescript-eslint/eslint-plugin": "^7.14.1",
"@typescript-eslint/parser": "^7.14.1",
"@vitest/coverage-istanbul": "^1.6.0",
"@typescript-eslint/eslint-plugin": "^8.10.0",
"@typescript-eslint/parser": "^8.10.0",
"@vitest/coverage-istanbul": "^2.1.3",
"babel-plugin-replace-import-extension": "^1.1.4",
"cjs-ts": "workspace:^",
"concurrently": "^8.2.2",
"eslint": "^9.5.0",
"concurrently": "^9.0.1",
"eslint": "^9.13.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-prettier": "^5.2.1",
"fmrs": "workspace:^",
"prettier": "^3.3.2",
"publint": "^0.2.10",
"tslib": "^2.6.3",
"typescript": "~5.4.5",
"vite": "^5.3.2",
"vitest": "^1.6.0"
"prettier": "^3.3.3",
"publint": "^0.2.11",
"tslib": "^2.8.0",
"typescript": "^5.6.3",
"vite": "^5.4.9",
"vitest": "^2.1.3"
}
}
2 changes: 1 addition & 1 deletion packages/authn/eslint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import configs from '@quisido/eslint-config';

/** @type {readonly import('eslint').Linter.FlatConfig[]} */
/** @type {readonly import('eslint').Linter.Config[]} */
export default [
...configs,

Expand Down
32 changes: 16 additions & 16 deletions packages/authn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,29 +45,29 @@
"cloudflare-utils": "workspace:^",
"fmrs": "workspace:^",
"form-urlencoded": "^6.1.5",
"tslib": "^2.6.3"
"tslib": "^2.8.0"
},
"devDependencies": {
"@babel/core": "^7.24.7",
"@babel/preset-env": "^7.24.7",
"@babel/preset-react": "^7.24.7",
"@babel/preset-typescript": "^7.24.7",
"@cloudflare/workers-types": "^4.20240712.0",
"@babel/core": "^7.25.8",
"@babel/preset-env": "^7.25.8",
"@babel/preset-react": "^7.25.7",
"@babel/preset-typescript": "^7.25.7",
"@cloudflare/workers-types": "^4.20241018.0",
"@microsoft/eslint-formatter-sarif": "^3.1.0",
"@quisido/eslint-config": "workspace:^",
"@quisido/vitest-config": "workspace:^",
"@types/cookie": "^0.6.0",
"@types/eslint": "^8.56.10",
"@vitest/coverage-istanbul": "^1.6.0",
"@types/eslint": "^9.6.1",
"@vitest/coverage-istanbul": "^2.1.3",
"babel-plugin-replace-import-extension": "^1.1.4",
"cjs-ts": "workspace:^",
"concurrently": "^8.2.2",
"cookie": "^0.6.0",
"eslint": "^9.5.0",
"publint": "^0.2.10",
"typescript": "~5.4.5",
"vite": "^5.3.2",
"vitest": "^1.6.0",
"wrangler": "^3.62.0"
"concurrently": "^9.0.1",
"cookie": "^1.0.1",
"eslint": "^9.13.0",
"publint": "^0.2.11",
"typescript": "^5.6.3",
"vite": "^5.4.9",
"vitest": "^2.1.3",
"wrangler": "^3.81.0"
}
}
6 changes: 1 addition & 5 deletions packages/authn/src/features/error-response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import type Worker from '@quisido/worker';
import ErrorResponseInit from './error-response-init.js';

export default class ErrorResponse extends Response {
public constructor(
worker: Worker,
code: ErrorCode,
returnPath?: string | undefined,
) {
public constructor(worker: Worker, code: ErrorCode, returnPath?: string) {
super(null, new ErrorResponseInit(worker, code, returnPath));
}
}
2 changes: 1 addition & 1 deletion packages/authn/src/features/handle-fetch-error.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ErrorResponse from './error-response.js';
export default function handleFetchError(
this: Worker,
err: unknown,
returnPath?: string | undefined,
returnPath?: string,
): Response {
if (err instanceof FatalError) {
/**
Expand Down
14 changes: 9 additions & 5 deletions packages/authn/src/features/oauth/handle-return-path.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ interface Options {

export default async function handleReturnPath(
this: Worker,
{ pathname, returnPath }: Options,
{ returnPath }: Options,
): Promise<Response> {
// Throttle
const ip: string = getIp.call(this);
Expand All @@ -23,10 +23,14 @@ export default async function handleReturnPath(

return await this.catchSnapshot(
async (): Promise<Response> => {
switch (pathname) {
case AuthenticationPathname.Patreon:
return await handlePatreonFetchRequest.call(this, { returnPath });
}
/**
* Whenever we support more than one authentication pathname:
* switch (pathname) {
* case AuthenticationPathname.Patreon:
* return await handlePatreonFetchRequest.call(this, { returnPath });
* }
*/
return await handlePatreonFetchRequest.call(this, { returnPath });
},
(err: unknown) => {
return handleFetchError.call(this, err, returnPath);
Expand Down
2 changes: 1 addition & 1 deletion packages/authn/src/features/oauth/should-throttle-oauth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export default function shouldThrottleOAuth(this: Worker, ip: string): boolean {
try {
throttleIp.call(this, ip, IP_THROTTLE_LIMIT);
return false;
} catch (err: unknown) {
} catch (_err: unknown) {
return true;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export default function handleInvalidPatreonAccessTokenErrorBody(
this.emitPublicMetric({
name: MetricName.InvalidPatreonAccessTokenErrorBody,
});

this.emitPrivateMetric({
name: MetricName.InvalidPatreonAccessTokenErrorBody,
value: body,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default function handlePatreonAccessTokenErrorBody(
const getBodyJson = (): unknown => {
try {
return JSON.parse(body);
} catch (err: unknown) {
} catch (_err: unknown) {
return handleInvalidPatreonAccessTokenErrorBody.call(this, body);
}
};
Expand Down
3 changes: 2 additions & 1 deletion packages/authn/src/test/d1-prepared-statement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,13 @@ export class TestD1PreparedStatement implements D1PreparedStatement {
expect(this.#boundValues).toEqual(values);
};

public run = (): Promise<D1Response> => {
public run = <T = Record<string, unknown>>(): Promise<D1Result<T>> => {
if (typeof this.#error !== 'undefined') {
return Promise.reject(this.#error);
}

return Promise.resolve({
results: [],
success: true,

meta: {
Expand Down
2 changes: 1 addition & 1 deletion packages/authn/src/test/fetch-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default class FetchTest {
return authnId;
}

get #cookies(): Record<string, string> {
get #cookies(): Partial<Record<string, string>> {
const cookies: string | undefined = this.#headersRecord['set-cookie'];
if (typeof cookies === 'undefined') {
throw new Error('Expected cookies to be set.');
Expand Down
5 changes: 1 addition & 4 deletions packages/authn/src/test/kv-namespace.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,5 @@ export default class TestKVNamespace<Key extends string = string>
}
}

public put: Mock<
Parameters<KVNamespace<Key>['put']>,
ReturnType<KVNamespace<Key>['put']>
> = vi.fn(this.#put);
public put: Mock<KVNamespace<Key>['put']> = vi.fn(this.#put);
}
7 changes: 2 additions & 5 deletions packages/authn/src/test/worker-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,13 @@ export default class WorkerTest {
return Promise.resolve(response);
};

readonly #fetch: Mock<
Parameters<Fetcher['fetch']>,
ReturnType<Fetcher['fetch']>
> = vi.fn(this.#handleFetch);
readonly #fetch: Mock<Fetcher['fetch']> = vi.fn(this.#handleFetch);

public onFetch = (url: string, response: Response): void => {
this.#fetchHandlers.set(url, response);
};

get #waitUntil(): Mock<[Promise<unknown>], void> {
get #waitUntil(): Mock<(promise: Promise<unknown>) => void> {
return vi.fn((promise: Promise<unknown>): void => {
this.#effects.push(promise);
});
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-rum-react/eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import configs from '@quisido/eslint-config';
import reactCompiler from 'eslint-plugin-react-compiler';
import reactRefresh from 'eslint-plugin-react-refresh';

/** @type {readonly import('eslint').Linter.FlatConfig[]} */
/** @type {readonly import('eslint').Linter.Config[]} */
export default [
...configs,

Expand Down
Loading

0 comments on commit f17b09a

Please sign in to comment.