Skip to content

Commit

Permalink
Update deps, a few majors (#60967)
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebailey authored Feb 20, 2025
1 parent 246507f commit eb25b58
Show file tree
Hide file tree
Showing 7 changed files with 922 additions and 719 deletions.
2 changes: 1 addition & 1 deletion .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
// Note: if adding new languages, make sure settings.template.json is updated too.
// Also, if updating typescript, update the one in package.json.
"plugins": [
"https://plugins.dprint.dev/typescript-0.93.3.wasm",
"https://plugins.dprint.dev/typescript-0.93.4.wasm",
"https://plugins.dprint.dev/json-0.19.4.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.0.wasm"
]
Expand Down
21 changes: 10 additions & 11 deletions Herebyfile.mjs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
// @ts-check
import { CancelToken } from "@esfx/canceltoken";
import assert from "assert";
import chalk from "chalk";
import chokidar from "chokidar";
import esbuild from "esbuild";
import { EventEmitter } from "events";
import fs from "fs";
import { glob } from "glob";
import { task } from "hereby";
import path from "path";
import pc from "picocolors";

import { localizationDirectories } from "./scripts/build/localization.mjs";
import cmdLineOptions from "./scripts/build/options.mjs";
Expand Down Expand Up @@ -399,7 +399,7 @@ function entrypointBuildTask(options) {
// allowing them to operate as regular tasks, while creating unresolved promises
// in the background that keep the process running after all tasks have exited.
if (!printedWatchWarning) {
console.error(chalk.yellowBright("Warning: watch mode is incomplete and may not work as expected. Use at your own risk."));
console.error(pc.yellowBright("Warning: watch mode is incomplete and may not work as expected. Use at your own risk."));
printedWatchWarning = true;
}

Expand Down Expand Up @@ -707,7 +707,7 @@ export const runTestsAndWatch = task({
dependencies: [watchTests],
run: async () => {
if (!cmdLineOptions.tests && !cmdLineOptions.failed) {
console.log(chalk.redBright(`You must specifiy either --tests/-t or --failed to use 'runtests-watch'.`));
console.log(pc.redBright(`You must specifiy either --tests/-t or --failed to use 'runtests-watch'.`));
return;
}

Expand All @@ -719,9 +719,8 @@ export const runTestsAndWatch = task({

const testsChangedDebouncer = new Debouncer(1_000, endRunTests);
const testCaseWatcher = chokidar.watch([
"tests/cases/**/*.*",
"tests/lib/**/*.*",
"tests/projects/**/*.*",
"tests/cases",
"tests/lib",
], {
ignorePermissionErrors: true,
alwaysStat: true,
Expand All @@ -746,7 +745,7 @@ export const runTestsAndWatch = task({
running = false;
}
if (watching) {
console.log(chalk.yellowBright(`[watch] test run complete, waiting for changes...`));
console.log(pc.yellowBright(`[watch] test run complete, waiting for changes...`));
await promise;
}
}
Expand All @@ -756,7 +755,7 @@ export const runTestsAndWatch = task({
}

/**
* @param {'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir'} eventName
* @param {'add' | 'addDir' | 'change' | 'unlink' | 'unlinkDir' | 'all' | 'ready' | 'raw' | 'error'} eventName
* @param {string} path
* @param {fs.Stats | undefined} stats
*/
Expand All @@ -783,9 +782,9 @@ export const runTestsAndWatch = task({
*/
function beginRunTests(path) {
if (testsChangedDebouncer.empty) {
console.log(chalk.yellowBright(`[watch] tests changed due to '${path}', restarting...`));
console.log(pc.yellowBright(`[watch] tests changed due to '${path}', restarting...`));
if (running) {
console.log(chalk.yellowBright("[watch] aborting in-progress test run..."));
console.log(pc.yellowBright("[watch] aborting in-progress test run..."));
}
testsChangedCancelSource.cancel();
testsChangedCancelSource = CancelToken.source();
Expand All @@ -803,7 +802,7 @@ export const runTestsAndWatch = task({
function endWatchMode() {
if (watching) {
watching = false;
console.log(chalk.yellowBright("[watch] exiting watch mode..."));
console.log(pc.yellowBright("[watch] exiting watch mode..."));
testsChangedCancelSource.cancel();
testCaseWatcher.close();
watchTestsEmitter.off("rebuild", onRebuild);
Expand Down
Loading

0 comments on commit eb25b58

Please sign in to comment.