Skip to content
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
1,648 changes: 930 additions & 718 deletions .pnp.cjs

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed .yarn/cache/gopd-npm-1.0.1-10c1d0b534-5fbc7ad57b.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions .yarn/versions/80c87cf1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
releases:
"@yarnpkg/eslint-config": major

declined:
- "@yarnpkg/plugin-constraints"
- "@yarnpkg/plugin-essentials"
- "@yarnpkg/plugin-git"
- "@yarnpkg/plugin-github"
- "@yarnpkg/plugin-interactive-tools"
- "@yarnpkg/plugin-nm"
- "@yarnpkg/plugin-npm"
- "@yarnpkg/plugin-npm-cli"
- "@yarnpkg/plugin-patch"
- "@yarnpkg/plugin-pnp"
- "@yarnpkg/plugin-stage"
- "@yarnpkg/plugin-typescript"
- "@yarnpkg/plugin-version"
- "@yarnpkg/plugin-workspace-tools"
- vscode-zipfs
- "@yarnpkg/core"
- "@yarnpkg/extensions"
- "@yarnpkg/fslib"
- "@yarnpkg/libui"
- "@yarnpkg/libzip"
- "@yarnpkg/nm"
- "@yarnpkg/parsers"
- "@yarnpkg/pnp"
- "@yarnpkg/pnpify"
- "@yarnpkg/sdks"
- "@yarnpkg/shell"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@yarnpkg/sdks": "workspace:^",
"clipanion": "^4.0.0-rc.2",
"esbuild": "npm:esbuild-wasm@^0.23.0",
"eslint": "^8.57.0",
"eslint": "^9.20.1",
"jest": "^29.2.1",
"pirates": "^4.0.5",
"tslib": "^2.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const readSyml = async (source: PortablePath): Promise<any> => {

try {
return parseSyml(fileContent);
} catch (error) {
} catch {
throw new Error(`Invalid syml file (${source})`);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ export const mtme = (

if (typeof fn !== `function`) {
throw new Error(
// eslint-disable-next-line

`Invalid test function (got ${typeof fn}) - you probably put the closing parenthesis of the "makeTemporaryEnv" utility at the wrong place`,
);
}
Expand Down
11 changes: 5 additions & 6 deletions packages/acceptance-tests/pkg-tests-core/sources/utils/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ const packageServerUrls: {
https: Promise<string> | null;
} = {http: null, https: null};

export const startPackageServer = ({type}: { type: keyof typeof packageServerUrls } = {type: `http`}): Promise<string> => {
export const startPackageServer = ({type}: {type: keyof typeof packageServerUrls} = {type: `http`}): Promise<string> => {
const serverUrl = packageServerUrls[type];
if (serverUrl !== null)
return serverUrl;
Expand Down Expand Up @@ -474,7 +474,7 @@ export const startPackageServer = ({type}: { type: keyof typeof packageServerUrl
let body;
try {
body = JSON.parse(rawData);
} catch (e) {
} catch {
return processError(response, 401, `Unauthorized`);
}

Expand Down Expand Up @@ -507,7 +507,7 @@ export const startPackageServer = ({type}: { type: keyof typeof packageServerUrl
let body;
try {
body = JSON.parse(rawData);
} catch (e) {
} catch {
return processError(response, 401, `Invalid`);
}

Expand Down Expand Up @@ -537,7 +537,7 @@ export const startPackageServer = ({type}: { type: keyof typeof packageServerUrl
let body;
try {
body = JSON.parse(rawData);
} catch (e) {
} catch {
return processError(response, 401, `Invalid`);
}

Expand Down Expand Up @@ -774,7 +774,6 @@ export const generatePkgDriver = ({

if (typeof fn !== `function`) {
throw new Error(
// eslint-disable-next-line
`Invalid test function (got ${typeof fn}) - you probably put the closing parenthesis of the "makeTemporaryEnv" utility at the wrong place`,
);
}
Expand Down Expand Up @@ -919,7 +918,7 @@ export const getHttpsCertificates = async () => {
if (httpsCertificates)
return httpsCertificates;

const createCSR = promisify<pem.CSRCreationOptions, { csr: string, clientKey: string }>(pem.createCSR);
const createCSR = promisify<pem.CSRCreationOptions, {csr: string, clientKey: string}>(pem.createCSR);
const createCertificate = promisify<pem.CertificateCreationOptions, pem.CertificateCreationResult>(pem.createCertificate);

const {csr, clientKey} = await createCSR({commonName: `yarn`});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ describe(`Basic tests`, () => {

await expect(
source(
// eslint-disable-next-line

`require('dep-loop-entry') === require('dep-loop-entry').dependencies['dep-loop-exit'].dependencies['dep-loop-entry']`,
),
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ function cleanupJsonOutput(output: string, path: PortablePath, homePath: Portabl
let outputObject;
try {
outputObject = JSON.parse(output);
} catch (e) {
} catch {
return cleanupPlainOutput(output, path, homePath);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type Assertions = {
fail?: Array<[/*request: */string, {message: string, code: string, pnpCode?: string}]>;
};

export function makeTemporaryExportsEnv(testPackageName: string, manifest: Omit<Manifest, 'name'>, files: Array<string>, {pass, fail}: Assertions) {
export function makeTemporaryExportsEnv(testPackageName: string, manifest: Omit<Manifest, `name`>, files: Array<string>, {pass, fail}: Assertions) {
return makeTemporaryEnv({
dependencies: {
[testPackageName]: `file:./${testPackageName}`,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -168,14 +168,14 @@ describe(`Features`, () => {
seq: 1,
type: `request`,
command: `typeDefinition`,
arguments: {file: ourUtilityFile, line: 7, offset: 9},
arguments: {file: ourUtilityFile, line: 5, offset: 9},
});

await runAndWait(yarnpkgCli, {
seq: 2,
type: `request`,
command: `typeDefinition`,
arguments: {file: ourUtilityFile, line: 6, offset: 9},
arguments: {file: ourUtilityFile, line: 4, offset: 9},
});
} finally {
child.stdin.end();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/* eslint-disable */

// This file MUST NOT CHANGE. We're using it for the VSCode / TS integration
// tests, which require to reference symbols by their offset.

Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/config/docusaurus/plugins/cli-docs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const loader = jiti(__filename, {
requireCache: false,
});

const binaries: Array<{ name: string, getCli: () => Promise<Cli<BaseContext>>, watch: Array<string> }> = [
const binaries: Array<{name: string, getCli: () => Promise<Cli<BaseContext>>, watch: Array<string>}> = [
{
name: `@yarnpkg/cli`,
getCli: async () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/config/remark/commandLineHighlight.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ const makeCommandLine = (line: string, cli: YarnCli) => {
const makeCommandOrRawLine = (line: string, cli: YarnCli) => {
try {
return makeCommandLine(line, cli);
} catch (err: any) {
} catch {
console.log(`Failed to parse "${line}"`);
return makeRawLine(line);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ async function typedocPluginConfig(): Promise<Partial<DocusaurusPluginTypeDocApi
};
}

async function getPreviousVersions(): Promise<Array<{ label: string, href: string }>> {
async function getPreviousVersions(): Promise<Array<{label: string, href: string}>> {
const [npmResponse, repoResponse] = await Promise.all([
// eslint-disable-next-line no-restricted-globals
fetch(`https://registry.npmjs.org/yarn`, {headers: {accept: `application/vnd.npm.install-v1+json`}})
Expand Down
2 changes: 1 addition & 1 deletion packages/docusaurus/src/lib/npmTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export type PackageListingError =

export type WithErrors<T, TError extends {type: string}> =
| (T & {error?: null})
| { error: TError };
| {error: TError};

export type PackageInfoQuery = ReturnType<typeof usePackageInfo>;
export type ReleaseInfoQuery = ReturnType<typeof useReleaseInfo>;
Expand Down
1 change: 0 additions & 1 deletion packages/docusaurus/src/theme/DocRoot/Layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable no-undef */
import {useLocation} from '@docusaurus/router';
import {useDocsSidebar} from '@docusaurus/theme-common/internal';
import BackToTopButton from '@theme/BackToTopButton';
Expand Down
14 changes: 9 additions & 5 deletions packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
"./react": "./react.js"
},
"dependencies": {
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"@stylistic/eslint-plugin": "^3.1.0",
"@stylistic/eslint-plugin-jsx": "^3.1.0",
"@typescript-eslint/eslint-plugin": "^8.24.0",
"@typescript-eslint/parser": "^8.24.0",
"eslint-plugin-arca": "^0.16.0",
"eslint-plugin-react": "^7.34.1",
"globals": "^15.1.0"
"eslint-plugin-react": "^7.37.4",
"globals": "^15.15.0",
"tslib": "^2.4.0"
},
"peerDependencies": {
"eslint": "*",
Expand All @@ -32,7 +35,8 @@
"node": ">=18.12.0"
},
"devDependencies": {
"eslint": "^8.57.0"
"eslint": "^9.20.1",
"typescript": "^5.5.2"
},
"stableVersion": "2.1.0"
}
70 changes: 37 additions & 33 deletions packages/eslint-config/rules/style.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import arcaEslint from 'eslint-plugin-arca';
import stylisticJsxEslint from '@stylistic/eslint-plugin-jsx';
import stylisticEslint from '@stylistic/eslint-plugin';
import typescriptEslint from '@typescript-eslint/eslint-plugin';
import arcaEslint from 'eslint-plugin-arca';

// eslint-disable-next-line arca/no-default-export
export default [
Expand All @@ -9,29 +11,31 @@ export default [
plugins: {
[`arca`]: arcaEslint,
[`@typescript-eslint`]: typescriptEslint,
[`@stylistic`]: stylisticEslint,
[`@stylistic-jsx`]: stylisticJsxEslint,
},

rules: {
'@typescript-eslint/array-type': [`error`, {
default: `generic`,
}],

'@typescript-eslint/brace-style': 2,
'@stylistic/brace-style': 2,

'@typescript-eslint/comma-dangle': [`error`, `always-multiline`],
'@stylistic/comma-dangle': [`error`, `always-multiline`],

'@typescript-eslint/keyword-spacing': 2,
'@stylistic/keyword-spacing': 2,

'@typescript-eslint/comma-spacing': 2,
'@stylistic/comma-spacing': 2,

'@typescript-eslint/func-call-spacing': 2,
'@stylistic/func-call-spacing': 2,

'@typescript-eslint/indent': [`error`, 2, {
'@stylistic/indent': [`error`, 2, {
SwitchCase: 1,
ignoredNodes: [`TSTypeParameterInstantiation`],
}],

'@typescript-eslint/member-delimiter-style': [`error`, {
'@stylistic/member-delimiter-style': [`error`, {
multiline: {
delimiter: `semi`,
requireLast: true,
Expand All @@ -53,13 +57,13 @@ export default [
},
}],

'@typescript-eslint/quotes': [`error`, `backtick`],
'@stylistic/quotes': [`error`, `backtick`],

'@typescript-eslint/semi': 2,
'@stylistic/semi': 2,

'@typescript-eslint/space-infix-ops': 2,
'@stylistic/space-infix-ops': 2,

'@typescript-eslint/type-annotation-spacing': 2,
'@stylistic/type-annotation-spacing': 2,

'arca/import-quotes': 2,

Expand All @@ -77,50 +81,50 @@ export default [
enableOnelinerSections: true,
}],

'array-bracket-spacing': 2,
'@stylistic/array-bracket-spacing': 2,

'arrow-parens': [`error`, `as-needed`],
'@stylistic/arrow-parens': [`error`, `as-needed`],

'arrow-spacing': 2,
'@stylistic/arrow-spacing': 2,

'computed-property-spacing': 2,
'@stylistic/computed-property-spacing': 2,

'eol-last': [`error`, `always`],
'@stylistic/eol-last': [`error`, `always`],

'generator-star-spacing': [`error`, {
'@stylistic/generator-star-spacing': [`error`, {
before: true,
after: true,
}],

'jsx-quotes': 2,
'@stylistic/jsx-quotes': 2,

'key-spacing': 2,
'@stylistic/key-spacing': 2,

'no-extra-semi': 2,
'@stylistic/no-extra-semi': 2,

'no-irregular-whitespace': 2,

'no-mixed-spaces-and-tabs': 2,
'@stylistic/no-mixed-spaces-and-tabs': 2,

'no-multiple-empty-lines': [`error`, {max: 2, maxBOF: 0, maxEOF: 0}],
'@stylistic/no-multiple-empty-lines': [`error`, {max: 2, maxBOF: 0, maxEOF: 0}],

'no-tabs': 2,
'@stylistic/no-tabs': 2,

'no-trailing-spaces': 2,
'@stylistic/no-trailing-spaces': 2,

'object-curly-spacing': 2,
'@stylistic/object-curly-spacing': 2,

'padded-blocks': [`error`, `never`],
'@stylistic/padded-blocks': [`error`, `never`],

'quote-props': [`error`, `as-needed`],
'@stylistic/quote-props': [`error`, `as-needed`],

'rest-spread-spacing': 2,
'@stylistic/rest-spread-spacing': 2,

'space-before-blocks': 2,
'@stylistic/space-before-blocks': 2,

'space-in-parens': 2,
'@stylistic/space-in-parens': 2,

'template-curly-spacing': 2,
'@stylistic/template-curly-spacing': 2,
},
},
];
2 changes: 1 addition & 1 deletion packages/plugin-compat/extra/resolve/normalize-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = function (_, opts) {
let manifestPath;
try {
manifestPath = api.resolveToUnqualified(`${parts[1]}/package.json`, basedir, {considerBuiltins: false});
} catch (err) {
} catch {
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-constraints/sources/tauModule.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import getPath from 'lodash/get';
import pl from 'tau-prolog';
import vm from 'vm';

// eslint-disable-next-line @typescript-eslint/naming-convention

const {is_atom: isAtom, is_variable: isVariable, is_instantiated_list: isInstantiatedList} = pl.type;

function prependGoals(thread: pl.type.Thread, point: pl.type.State, goals: Array<pl.type.Term<number, string>>): void {
Expand Down
2 changes: 1 addition & 1 deletion packages/plugin-essentials/sources/commands/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ export default class InfoCommand extends BaseCommand {
const fetcher = configuration.makeFetcher();
const fetcherOptions: FetchOptions = {project, fetcher, cache, checksums: project.storedChecksums, report: new ThrowReport(), cacheOptions: {skipIntegrityCheck: true}};

const builtinInfoBuilders: Array<Exclude<Hooks['fetchPackageInfo'], undefined>> = [
const builtinInfoBuilders: Array<Exclude<Hooks[`fetchPackageInfo`], undefined>> = [
// Manifest fields
async (pkg, extra, registerData) => {
if (!extra.has(`manifest`))
Expand Down
Loading
Loading