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 Other deps (major) (major) #1489

Merged
merged 6 commits into from
Oct 23, 2023
Merged
Show file tree
Hide file tree
Changes from 5 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
27 changes: 0 additions & 27 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

874 changes: 0 additions & 874 deletions .yarn/releases/yarn-3.6.4.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.0.cjs

Large diffs are not rendered by default.

6 changes: 1 addition & 5 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,4 @@ npmScopes:
siteimprove:
npmRegistryServer: "https://npm.pkg.github.com"

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"

yarnPath: .yarn/releases/yarn-3.6.4.cjs
yarnPath: .yarn/releases/yarn-4.0.0.cjs
16 changes: 8 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
},
"bugs": "https://github.com/siteimprove/alfa/issues",
"scripts": {
"build": "node --max-old-space-size=8192 scripts/build.js --pretty",
"clean": "node scripts/clean.js --pretty",
"test": "node scripts/test.js --pretty",
"watch": "node scripts/watch.js --pretty",
"extract": "node scripts/api-extractor.js --pretty",
"build": "node --max-old-space-size=8192 scripts/build.mjs --pretty",
"clean": "node scripts/clean.mjs --pretty",
"test": "node scripts/test.mjs --pretty",
"watch": "node scripts/watch.mjs --pretty",
"extract": "node scripts/api-extractor.mjs --pretty",
"document": "api-documenter generate -i docs/data/api -o docs/api",
"dependency-graph": "package-dependency-graph --config config/package-dependency-graph.ts --exclude-node_modules --graphviz --dot docs/dependency-graph.dot --png docs/dependency-graph.png",
"knip": "knip --config config/knip.ts"
Expand All @@ -31,12 +31,12 @@
"@types/async": "^3.2.20",
"@types/node": "^20.5.9",
"async": "^3.2.1",
"execa": "^5.1.1",
"execa": "^8.0.0",
"knip": "^2.33.4",
"minimist": "^1.2.6",
"package-dependency-graph": "^1.14.4",
"prettier": "^2.7.1",
"prettier": "^3.0.0",
"typescript": "^5.2.2"
},
"packageManager": "yarn@3.6.4"
"packageManager": "yarn@4.0.0"
}
4 changes: 2 additions & 2 deletions packages/alfa-aria/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,8 @@
},
"devDependencies": {
"@siteimprove/alfa-test": "workspace:^0.68.0",
"prettier": "^2.7.1",
"puppeteer": "^19.9.1"
"prettier": "^3.0.0",
"puppeteer": "^21.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions packages/alfa-compatibility/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
"browserslist": "^4.17.0"
},
"devDependencies": {
"@mdn/browser-compat-data": "^3.1.3",
"prettier": "^2.7.1"
"@mdn/browser-compat-data": "^5.0.0",
"prettier": "^3.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions packages/alfa-iana/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
},
"devDependencies": {
"@siteimprove/alfa-test": "workspace:^0.68.0",
"axios": "^0.27.2",
"prettier": "^2.7.1"
"axios": "^1.0.0",
"prettier": "^3.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
2 changes: 1 addition & 1 deletion packages/alfa-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"dependencies": {
"@types/node": "^20.5.9",
"chalk": "^4.1.2"
"chalk": "=4.1.2"
},
"publishConfig": {
"access": "public",
Expand Down
4 changes: 2 additions & 2 deletions packages/alfa-test/src/format.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export function format(name: string, error: Error): string {
"\n" +
error.message.replace(
"Input A expected to strictly deep-equal input B:\n",
""
"",
);

message += error.message;
Expand All @@ -47,7 +47,7 @@ export function format(name: string, error: Error): string {

const output = `
${chalk.underline(`${file}(${line},${column}):`)} ${chalk.bold(
name.trim().replace(/\s+/g, " ")
name.trim().replace(/\s+/g, " "),
)}
${message}
`;
Expand Down
2 changes: 1 addition & 1 deletion packages/alfa-toolchain/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"@changesets/get-github-info": "^0.5.2",
"@changesets/git": "^2.0.0",
"@changesets/read": "^0.5.9",
"@manypkg/get-packages": "^1.1.3",
"@manypkg/get-packages": "=1.1.3",
"@siteimprove/alfa-result": "workspace:^0.68.0",
"@svitejs/changesets-changelog-github-compact": "^1.1.0",
"resolve-from": "^5.0.0"
Expand Down
4 changes: 2 additions & 2 deletions packages/alfa-wcag/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"@siteimprove/alfa-refinement": "workspace:^0.68.0"
},
"devDependencies": {
"prettier": "^2.7.1",
"puppeteer": "^19.9.1"
"prettier": "^3.0.0",
"puppeteer": "^21.0.0"
},
"publishConfig": {
"access": "public",
Expand Down
13 changes: 6 additions & 7 deletions scripts/api-extractor.js → scripts/api-extractor.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
const path = require("path");
import * as path from "path";

const { Extractor, ExtractorConfig } = require("@microsoft/api-extractor");

const { system } = require("./common/system");
const { flags } = require("./common/flags");
const { builder } = require("./common/builder");
import { Extractor, ExtractorConfig } from "@microsoft/api-extractor";
import { system } from "./common/system.mjs";
import { flags } from "./common/flags.mjs";
import { builder } from "./common/builder.mjs";

const status = builder.build(flags.project);

Expand All @@ -25,7 +24,7 @@ function extract(root = "packages") {
let file;
try {
file = require.resolve(
path.resolve(project, "config", "api-extractor.json")
path.resolve(project, "config", "api-extractor.json"),
);
} catch {
continue;
Expand Down
8 changes: 4 additions & 4 deletions scripts/build.js → scripts/build.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
const { system } = require("./common/system");
const { flags } = require("./common/flags");
const { builder } = require("./common/builder");
import { system } from "./common/system.mjs";
import { flags } from "./common/flags.mjs";
import { builder } from "./common/builder.mjs";

const exitCode = builder.build(flags.project);

if (flags.minimal && exitCode === /*Success*/ 0) {
// Move cursor up one line and 13 to the left and erase
system.write("\033[1A\033[13D\033[K");
system.write("\x1B[1A\x1B[13D\x1B[K");
system.write("done!" + system.newLine);
}

Expand Down
5 changes: 0 additions & 5 deletions scripts/clean.js

This file was deleted.

5 changes: 5 additions & 0 deletions scripts/clean.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { system } from "./common/system.mjs";
import { flags } from "./common/flags.mjs";
import { builder } from "./common/builder.mjs";

system.exit(builder.clean(flags.project));
9 changes: 0 additions & 9 deletions scripts/common/builder.js

This file was deleted.

9 changes: 9 additions & 0 deletions scripts/common/builder.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import ts from "typescript";

import { host } from "./host.mjs";
import { flags } from "./flags.mjs";

export const builder = ts.createSolutionBuilder(host, ["tsconfig.json"], {
force: flags.force,
verbose: true, // verbosity is now managed by different reporter implementations
});
7 changes: 3 additions & 4 deletions scripts/common/flags.js → scripts/common/flags.mjs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
const path = require("path");
const process = require("process");
const minimist = require("minimist");
import * as path from "path";
import minimist from "minimist";

const argv = minimist(process.argv.slice(2), {
boolean: ["force", "verbose", "quiet", "pretty"],
});

exports.flags = {
export const flags = {
project: argv._[0] || path.relative(process.cwd(), process.env.INIT_CWD),
force: argv.force,
verbose: argv.verbose,
Expand Down
12 changes: 0 additions & 12 deletions scripts/common/host.js

This file was deleted.

12 changes: 12 additions & 0 deletions scripts/common/host.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import ts from "typescript";

import { system } from "./system.mjs";
import * as reporter from "./reporter.mjs";

export const host = ts.createSolutionBuilderWithWatchHost(
system,
/* createProgram */ undefined,
reporter.diagnostic,
reporter.status.build,
reporter.status.watch,
);
12 changes: 6 additions & 6 deletions scripts/common/reporter.js → scripts/common/reporter.mjs
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
const ts = require("typescript");
import ts from "typescript";

const { system } = require("./system");
const { flags } = require("./flags");
import { system } from "./system.mjs";
import { flags } from "./flags.mjs";
const verboseStatusReporter = ts.createBuilderStatusReporter;

/**
* @type {ts.DiagnosticReporter}
*/
exports.diagnostic = ts.createDiagnosticReporter(system, flags.pretty);
export const diagnostic = ts.createDiagnosticReporter(system, flags.pretty);

exports.status = {
export const status = {
/**
* @type {ts.DiagnosticReporter}
*/
Expand Down Expand Up @@ -37,7 +37,7 @@ function minimalStatusReporter(system, _) {
return function (diag) {
if (!first) {
// Move cursor up one line and 13 to the left and erase
system.write("\033[1A\033[13D\033[K");
system.write("\x1B[1A\x1B[13D\x1B[K");
}

const frame = frames[frameIndex % frames.length];
Expand Down
6 changes: 0 additions & 6 deletions scripts/common/system.js

This file was deleted.

6 changes: 6 additions & 0 deletions scripts/common/system.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import ts from "typescript";

/**
* @type {ts.System}
*/
export const system = ts.sys;
38 changes: 0 additions & 38 deletions scripts/test.js

This file was deleted.

36 changes: 36 additions & 0 deletions scripts/test.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import async from "async";
import { execaNode } from "execa";
import os from "os";

import { builder } from "./common/builder.mjs";
import { flags } from "./common/flags.mjs";
import { system } from "./common/system.mjs";

const status = builder.build(flags.project);

if (status !== 0) {
system.exit(status);
}

test(flags.project);

function test(root = "packages") {
async.eachLimit(
system.readDirectory(root, [".spec.ts", ".spec.tsx"], ["node_modules"]),
os.cpus().length,
(fileName, done) => {
execaNode(fileName.replace(/\.tsx?$/, ".js"), [], {
nodeOptions: [...process.execArgv, "--enable-source-maps"],
stdio: "inherit",
}).then(
() => done(),
(err) => done(err),
);
},
(err) => {
if (err) {
system.exit(1);
}
},
);
}
6 changes: 3 additions & 3 deletions scripts/watch.js → scripts/watch.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const ts = require("typescript");
import ts from "typescript";

const { flags } = require("./common/flags");
const { host } = require("./common/host");
import { flags } from "./common/flags.mjs";
import { host } from "./common/host.mjs";

const watcher = ts.createSolutionBuilderWithWatch(host, ["tsconfig.json"], {
force: flags.force,
Expand Down
Loading
Loading