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

fix: update vulnerable packages #1546

Closed
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
28 changes: 0 additions & 28 deletions cdn-server/.eslintrc

This file was deleted.

28 changes: 0 additions & 28 deletions cdn-server/cdn/.eslintrc

This file was deleted.

47 changes: 47 additions & 0 deletions cdn-server/cdn/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import unjs from 'eslint-config-unjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default unjs(
{
ignores: ['**/dist'],
},
{
rules: {
'space-before-function-paren': 0,
'arrow-parens': 0,
'comma-dangle': 0,
semi: 0,
'unicorn/prevent-abbreviations': 0,
quotes: 0,
'keyword-spacing': 0,
'no-undef': 0,
indent: 0,
'import/named': 0,
'unicorn/catch-error-name': 0,
'unicorn/no-null': 0,
'unicorn/no-useless-undefined': 0,
'unicorn/no-await-expression-member': 0,
'unicorn/no-array-push-push': 0,
'unicorn/filename-case': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'unicorn/expiring-todo-comments': 0,
'no-unexpected-multiline': 0,
'no-useless-constructor': 0,
'unicorn/prefer-ternary': 0,
'unicorn/prefer-string-raw': 0,
'@typescript-eslint/no-empty-object-type': 0,
},
},
);
4 changes: 2 additions & 2 deletions cdn-server/cdn/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"jose": "^5.2.4"
},
"devDependencies": {
"eslint": "^8.53.0",
"eslint-config-unjs": "^0.2.1",
"eslint": "^9.19.0",
"eslint-config-unjs": "^0.4.2",
"typescript": "5.5.2",
"vitest": "^2.1.8"
}
Expand Down
1 change: 0 additions & 1 deletion cdn-server/cdn/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ const cacheOperations = (storage: BlobStorage) => {
};
};

// eslint-disable-next-line @typescript-eslint/ban-types
export const cdn = <E extends Env, S extends Schema = {}, BasePath extends string = '/'>(
hono: Hono<E, S, BasePath>,
opts: CdnOptions,
Expand Down
47 changes: 47 additions & 0 deletions cdn-server/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import unjs from 'eslint-config-unjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default unjs(
{
ignores: ['**/dist'],
},
{
rules: {
'space-before-function-paren': 0,
'arrow-parens': 0,
'comma-dangle': 0,
semi: 0,
'unicorn/prevent-abbreviations': 0,
quotes: 0,
'keyword-spacing': 0,
'no-undef': 0,
indent: 0,
'import/named': 0,
'unicorn/catch-error-name': 0,
'unicorn/no-null': 0,
'unicorn/no-useless-undefined': 0,
'unicorn/no-await-expression-member': 0,
'unicorn/no-array-push-push': 0,
'unicorn/filename-case': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'unicorn/expiring-todo-comments': 0,
'no-unexpected-multiline': 0,
'no-useless-constructor': 0,
'unicorn/prefer-ternary': 0,
'unicorn/prefer-string-raw': 0,
'@typescript-eslint/no-empty-object-type': 0,
},
},
);
5 changes: 3 additions & 2 deletions cdn-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"start": "tsx src/index.ts",
"lint": "eslint --cache && prettier -c src",
"format:fix": "prettier --write -c src",
"lint:fix": "eslint --cache --fix . && prettier --write -c src",
"postversion": "name=\"$(node -p \"var a = require('./package.json');process.stdout.write(a.name);process.exit(0)\")\"; version=\"$(node -p \"var a = require('./package.json');process.stdout.write(a.version);process.exit(0)\")\"; gh workflow run image-release.yml -F name=$name -F workingDirectory=cdn-server -F tag=$version -F dockerContext=."
},
"dependencies": {
Expand All @@ -31,8 +32,8 @@
},
"devDependencies": {
"@types/node": "^20.9.0",
"eslint": "^8.53.0",
"eslint-config-unjs": "^0.2.1",
"eslint": "^9.19.0",
"eslint-config-unjs": "^0.4.2",
"tsx": "^4.16.0",
"typescript": "5.5.2"
}
Expand Down
4 changes: 0 additions & 4 deletions cli/.eslintignore

This file was deleted.

28 changes: 0 additions & 28 deletions cli/.eslintrc

This file was deleted.

47 changes: 47 additions & 0 deletions cli/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import js from '@eslint/js';
import { FlatCompat } from '@eslint/eslintrc';
import unjs from 'eslint-config-unjs';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all,
});

export default unjs(
{
ignores: ['**/dist', '**/.output', '**/node-modules', '**/gen'],
},
...compat.extends('plugin:require-extensions/recommended'),
...compat.plugins('require-extensions'),
{
rules: {
'space-before-function-paren': 0,
'arrow-parens': 0,
'comma-dangle': 0,
semi: 0,
'unicorn/prevent-abbreviations': 0,
quotes: 0,
'keyword-spacing': 0,
'no-undef': 0,
indent: 0,
'unicorn/catch-error-name': 0,
'unicorn/no-null': 0,
'unicorn/no-useless-undefined': 0,
'unicorn/no-await-expression-member': 0,
'unicorn/no-array-push-push': 0,
'unicorn/filename-case': 0,
'@typescript-eslint/no-unused-vars': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'unicorn/expiring-todo-comments': 0,
'no-useless-constructor': 0,
'unicorn/no-process-exit': 0,
'unicorn/no-anonymous-default-export': 0,
},
files: ['**/*.ts', '**/*.mjs', '**/*.cjs'],
},
);
10 changes: 5 additions & 5 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
"wgc": "tsx --env-file .env src/index.ts",
"test": "pnpm lint && vitest run",
"coverage": "vitest run --coverage",
"lint": "eslint --cache --ext .ts,.mjs,.cjs . && prettier -c src",
"lint:fix": "eslint --cache --fix --ext .ts,.mjs,.cjs . && prettier --write -c src"
"lint": "eslint --cache . && prettier -c src",
"lint:fix": "eslint --cache --fix . && prettier --write -c src"
},
"keywords": [
"wundergraph",
Expand Down Expand Up @@ -74,13 +74,13 @@
"@types/js-yaml": "^4.0.5",
"@types/node": "^20.3.1",
"del-cli": "^5.0.0",
"eslint": "^8.52.0",
"eslint-config-unjs": "^0.2.1",
"eslint": "^9.19.0",
"eslint-config-unjs": "^0.4.2",
"eslint-plugin-require-extensions": "^0.1.3",
"prettier": "^3.0.3",
"tsx": "^4.17.0",
"typescript": "5.5.2",
"vitest": "^2.1.8"
},
"gitHead": "c37aed755e1b19ed91d30f9b5f7041e15c56901a"
}
}
4 changes: 3 additions & 1 deletion cli/src/commands/auth/commands/logout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ export default (opts: BaseCommandOptions) => {
logoutCommand.action(() => {
try {
rmSync(configDir, { recursive: true });
} catch {}
} catch {
/* empty */
}
console.log(pc.green('Logged out Successfully!'));
});

Expand Down
1 change: 1 addition & 0 deletions cli/src/core/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export const configFile = join(configDir, 'config.yaml');
const getLoginDetails = (): { accessToken: string; organizationSlug: string } | null => {
try {
const data = yaml.load(readFileSync(configFile, 'utf8'));
// eslint-disable-next-line unicorn/prefer-structured-clone
const loginData = JSON.parse(JSON.stringify(data));
return { accessToken: loginData.accessToken, organizationSlug: loginData.organizationSlug };
} catch {
Expand Down
2 changes: 1 addition & 1 deletion cli/src/github.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const verifyGitHubIntegration = async (client: Client) => {
let gitInfo: PartialMessage<GitInfo> | undefined;
const { isPr, commit: commitSha, repository, accountId } = useGitHub();
if (isPr && commitSha && repository && accountId) {
const [ownerSlug, repositorySlug] = repository?.split('/');
const [ownerSlug, repositorySlug] = repository.split('/');
gitInfo = {
commitSha,
accountId,
Expand Down
1 change: 0 additions & 1 deletion cli/src/handle-feature-flag-result.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { EnumStatusCode } from '@wundergraph/cosmo-connect/dist/common/common_pb';
// eslint-disable-next-line import/named
import { Ora } from 'ora';
import Table from 'cli-table3';
import pc from 'picocolors';
Expand Down
1 change: 0 additions & 1 deletion cli/src/utils.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable import/named */
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
import { FederationResultContainer, Subgraph, federateSubgraphs } from '@wundergraph/composition';
import boxen from 'boxen';
Expand Down
4 changes: 0 additions & 4 deletions controlplane/.eslintignore

This file was deleted.

29 changes: 0 additions & 29 deletions controlplane/.eslintrc

This file was deleted.

Loading
Loading