From b5f6b0dc46ec2c3aeb2b9c5dd1b884996e12792e Mon Sep 17 00:00:00 2001 From: Chris Tate Date: Thu, 23 Jul 2026 01:18:50 -0500 Subject: [PATCH] Cite patterns, not target projects, across comments and hints - Lowering rationale names the idiom; one user-facing hint reworded - Diagnostics snapshot re-pinned to the neutral hint text --- .../compiler/ambient/scriptc-node-fallback.d.ts | 6 +++--- .../src/frontend/lowering/lower-builtins.ts | 4 ++-- .../src/frontend/lowering/lower-calls.ts | 6 +++--- .../src/frontend/lowering/lower-classes.ts | 2 +- .../src/frontend/lowering/lower-exprs.ts | 2 +- .../src/frontend/lowering/lower-modules.ts | 2 +- .../src/frontend/lowering/lower-stmts.ts | 2 +- .../compiler/src/frontend/lowering/lowerer.ts | 4 ++-- .../compiler/src/frontend/lowering/surfaces.ts | 2 +- packages/compiler/src/frontend/npm.ts | 4 ++-- packages/compiler/src/frontend/program.ts | 16 ++++++++-------- packages/compiler/src/frontend/resolve.ts | 2 +- packages/compiler/src/frontend/shared.ts | 6 +++--- packages/compiler/src/frontend/ts7/checker.ts | 2 +- packages/compiler/surface-manifest.json | 2 +- packages/runtime/src/scr_island.c | 12 ++++++------ packages/runtime/vendor/mbedtls/library/ecp.c | 2 +- tests/corpus/2380-buffer-module-named-import.ts | 2 +- tests/corpus/2381-builtin-default-imports.js | 2 +- tests/corpus/2390-dot-requires/main.cjs | 2 +- .../corpus/2391-default-builtin-imports/main.ts | 2 +- tests/corpus/2427-perf-hooks-now.ts | 2 +- tests/corpus/2428-field-redeclare-inherited.ts | 2 +- tests/corpus/2429-destructure-class-instance.ts | 2 +- tests/corpus/2430-empty-literal-unknown-field.js | 2 +- tests/diagnostics/create-require.ts | 2 +- .../node_modules/commander/package.json | 8 ++++---- .../npm-static/node_modules/ms/package.json | 4 ++-- .../npm/cases/npm-reexport/default-facade.ts | 2 +- .../harness/__snapshots__/create-require.ts.txt | 2 +- 30 files changed, 55 insertions(+), 55 deletions(-) diff --git a/packages/compiler/ambient/scriptc-node-fallback.d.ts b/packages/compiler/ambient/scriptc-node-fallback.d.ts index 66fe051f..8fdf98d4 100644 --- a/packages/compiler/ambient/scriptc-node-fallback.d.ts +++ b/packages/compiler/ambient/scriptc-node-fallback.d.ts @@ -721,7 +721,7 @@ declare module "diagnostics_channel" { /* node:perf_hooks — performance.now() over the runtime's process-start- * anchored monotonic clock (Node's timeOrigin for a compiled program), * fractional milliseconds. The .bind(performance) spelling lowers to the - * same clock as a plain () => number function value (prettier's mockable + * same clock as a plain () => number function value (the mockable-clock idiom's * getTimestamp); everything else fences per member. */ declare module "node:perf_hooks" { export interface Performance { @@ -737,7 +737,7 @@ declare module "perf_hooks" { * module carries no evaluation), and every member keeps a per-site fence. * createRequire loads CommonJS from disk at runtime — a compiled * program's modules are fixed at build time, so the call's fence defers - * to a runtime error in JS sources (prettier's require-from-file.js is + * to a runtime error in JS sources (the config-loader idiom is * reached only when a CJS config/plugin must load). Bare "module" stays a * package specifier (an npm package by that name exists); only the node: * spelling names the builtin. */ @@ -2609,7 +2609,7 @@ declare module "node:worker_threads" { * Buffer re-exports the GLOBAL declaration, so an imported binding * resolves to the same symbol the lowerings already answer for (and * third-party .d.ts files that `import { Buffer } from "node:buffer"` — - * file-entry-cache in prettier's source graph — typecheck). */ + * file-entry-cache in a typed-JS source graph — typecheck). */ declare module "buffer" { export function atob(data: string): string; export function btoa(data: string): string; diff --git a/packages/compiler/src/frontend/lowering/lower-builtins.ts b/packages/compiler/src/frontend/lowering/lower-builtins.ts index 68c2aaed..be0ad35b 100644 --- a/packages/compiler/src/frontend/lowering/lower-builtins.ts +++ b/packages/compiler/src/frontend/lowering/lower-builtins.ts @@ -97,7 +97,7 @@ import { BOOL, BYTES_U8, CHILD_T, CHILDSTREAM_T, DYN, F64, FSWATCHER_T, PROCSTRE } // The RE-EXPORT FACADE hop: a binding acquired through a user module // that re-exports a builtin (`import { ok } from "./assert-facade.js"` - // over `export { ok } from "node:assert"` — prettier's + // over `export { ok } from "node:assert"` — the formatter idiom's // universal/assert idiom; the namespace-member spelling resolves to // the facade's ExportSpecifier the same way). The specifier here is a // user module, so provenance comes from the ALIAS CHAIN instead: the @@ -211,7 +211,7 @@ import { BOOL, BYTES_U8, CHILD_T, CHILDSTREAM_T, DYN, F64, FSWATCHER_T, PROCSTRE /** The node:perf_hooks spoke: `performance.now()` reads the runtime's * monotonic clock anchored at process start — Node's timeOrigin for a * compiled program, fractional milliseconds — and - * `performance.now.bind(performance)` (prettier's mockable + * `performance.now.bind(performance)` (the mockable-clock idiom's * getTimestamp) is the same clock as a plain () => number function * value. Other members on the performance object fence by name; null * for non-perf_hooks callees (the call chain keeps trying). */ diff --git a/packages/compiler/src/frontend/lowering/lower-calls.ts b/packages/compiler/src/frontend/lowering/lower-calls.ts index 472196ba..d5f48676 100644 --- a/packages/compiler/src/frontend/lowering/lower-calls.ts +++ b/packages/compiler/src/frontend/lowering/lower-calls.ts @@ -3205,7 +3205,7 @@ export function lowerCall(L: Lowerer, expr: ts.CallExpression): IrExpr { if (nsMember) { // A builtin RE-EXPORT FACADE member (`import * as assert from // "./facade.js"` over `export { ok } from "node:assert"` — - // prettier's universal/assert): builtinMemberOf's alias chase + // a universal re-export facade): builtinMemberOf's alias chase // resolves the builtin module/member, and the spokes own the call // exactly as a direct builtin import. Ordinary user-module // members answer null there and resolve below. @@ -6139,7 +6139,7 @@ export function lowerFunction(L: Lowerer, decl: ts.FunctionDeclaration): IrFunct // the whole analysis. if (!(e instanceof PoisonError)) throw e; // JS sources defer function-level poisons like statement fences - // (prettier's whitespace.js `({ parent: sentenceNode })` over the + // (the sentence-walker idiom `({ parent: sentenceNode })` over the // #private-fenced AstPath): the function compiles as its OWN // runtimeFence — CALLING it throws the first captured diagnostic // at the declaration's position — so a reachable-but-broken @@ -6153,7 +6153,7 @@ export function lowerFunction(L: Lowerer, decl: ts.FunctionDeclaration): IrFunct ) { const captured = L.diags.splice(diagsBefore); L.runtimeFences.push(...captured); - // An ABI type naming a class that never REGISTERED (prettier's + // An ABI type naming a class that never REGISTERED (the formatter idiom's // AstPath — the #private fence): the emitter would name a struct // that does not exist, so no fence function can be built. No call // site can lower either (producing the unregistered class's value diff --git a/packages/compiler/src/frontend/lowering/lower-classes.ts b/packages/compiler/src/frontend/lowering/lower-classes.ts index da2b6be0..13c4e01c 100644 --- a/packages/compiler/src/frontend/lowering/lower-classes.ts +++ b/packages/compiler/src/frontend/lowering/lower-classes.ts @@ -1302,7 +1302,7 @@ export function collectClassShapeInner(L: Lowerer, decl: ts.ClassLikeDeclaration // (after super()), so the base slot simply takes the new // value at that position — a slot-type-exact redeclare WITH // an initializer lowers as an assignment into the inherited - // slot, no new slot, no layout change (prettier's `class + // slot, no new slot, no layout change (the `class // ConfigError extends Error { name = "ConfigError" }`; the // builtin Error prefix included — reads, toString, and throw // reports all answer the overwritten name like Node). A BARE diff --git a/packages/compiler/src/frontend/lowering/lower-exprs.ts b/packages/compiler/src/frontend/lowering/lower-exprs.ts index 94a24174..b80aaa39 100644 --- a/packages/compiler/src/frontend/lowering/lower-exprs.ts +++ b/packages/compiler/src/frontend/lowering/lower-exprs.ts @@ -4505,7 +4505,7 @@ export function lowerObjectLiteral(L: Lowerer, expr: ts.ObjectLiteralExpression) if (provided.has(f.name)) continue; // 'unknown' fields complete with the DOM undefined — the absent // property reads as undefined in Node, and a dyn slot holds - // exactly that (prettier's `getFileInfo(file, {})` against + // exactly that (the options-record call shape against // `{ plugins: unknown, ... }` — a JS caller the checker admits). const absent = L.wrappedUndefined(f.type, loc) ?? (f.type.kind === "dyn" ? dynUndefinedExpr(loc) : null); if (!absent) throw shapeMismatch(expr); // only optional (undefined-armed) and 'unknown' fields may be omitted diff --git a/packages/compiler/src/frontend/lowering/lower-modules.ts b/packages/compiler/src/frontend/lowering/lower-modules.ts index 98c949a5..41a21534 100644 --- a/packages/compiler/src/frontend/lowering/lower-modules.ts +++ b/packages/compiler/src/frontend/lowering/lower-modules.ts @@ -700,7 +700,7 @@ export function collectGlobals(L: Lowerer, sf: ts.SourceFile, topStmts: ts.State // function/class declarations — reassignment of those is fenced // elsewhere): Node's default binding would NOT see a later write // (snapshot), the alias-resolved read would (live). MUTABLE targets - // (`export default someLet` — prettier's visitor-keys.evaluate.js + // (`export default someLet` — the visitor-keys pattern // reassigns the let, then default-exports it) get SNAPSHOT storage // instead: Node's default binding captures the value once, when the // export statement runs, so the default registers its own const diff --git a/packages/compiler/src/frontend/lowering/lower-stmts.ts b/packages/compiler/src/frontend/lowering/lower-stmts.ts index 9ea9c4b3..ef79eb4c 100644 --- a/packages/compiler/src/frontend/lowering/lower-stmts.ts +++ b/packages/compiler/src/frontend/lowering/lower-stmts.ts @@ -1285,7 +1285,7 @@ export function lowerStmt(L: Lowerer, stmt: ts.Statement): IrStmt | IrStmt[] | n return; } // A CLASS-INSTANCE source (`const { previous, next } = path` — - // prettier's AstPath idiom): the desugar IS JS's — one member read + // the path-walker idiom): the desugar IS JS's — one member read // per element, left to right, at the element's pattern position: // declared fields read their slots and accessor properties call // their getters through the same fieldGetExpr dispatch as dotted diff --git a/packages/compiler/src/frontend/lowering/lowerer.ts b/packages/compiler/src/frontend/lowering/lowerer.ts index c61b9e41..d0507249 100644 --- a/packages/compiler/src/frontend/lowering/lowerer.ts +++ b/packages/compiler/src/frontend/lowering/lowerer.ts @@ -2985,7 +2985,7 @@ export class Lowerer { // optional-flavored (an undefined-armed union) — the unset field // IS the undefined arm, the same rule literal completion applies // — or 'unknown' (a dyn slot holds the DOM undefined, exactly - // the absent-property read: prettier's `getFileInfo(file, {})` + // the absent-property read: the options-record call shape // against `{ plugins: unknown, ... }`). Never for tuples: a // completed position would change .length and JSON where Node // keeps the source arity. @@ -6493,7 +6493,7 @@ export class Lowerer { const module = this.builtinNamespaceModuleOf(access.expression); if (module !== null) return { module, member: access.name.text }; // The RE-EXPORT FACADE's namespace spelling: `import * as assert from - // "./facade.js"` over `export { ok } from "node:assert"` (prettier's + // "./facade.js"` over `export { ok } from "node:assert"` (the formatter idiom's // universal/assert). The member's symbol is the facade's // ExportSpecifier, and builtinImportOf's alias chase answers the // builtin's own module/member — the same tables as a direct import; diff --git a/packages/compiler/src/frontend/lowering/surfaces.ts b/packages/compiler/src/frontend/lowering/surfaces.ts index d716043c..b0fd41be 100644 --- a/packages/compiler/src/frontend/lowering/surfaces.ts +++ b/packages/compiler/src/frontend/lowering/surfaces.ts @@ -866,7 +866,7 @@ export const BUILTIN_MODULE_FENCE_HINTS: Record d.fileName !== undefined && islandJsFile(d.fileName); /* JSDoc TYPE positions in JS files are documentation Node never reads: - * a name-resolution failure THERE (2304/2552 — prettier's utilities.js + * a name-resolution failure THERE (2304/2552 — the pattern's utilities.js * spells a mapped type over a @template name it never declared) types * as the error-any and the per-site fences apply, same stance as the * strictness families above. A 2300 duplicate-identifier PAIR formed by @@ -1422,7 +1422,7 @@ function preflight7(load: LoadResult): { const fromSpec = ts.isStringLiteral(stmt.moduleSpecifier) ? stmt.moduleSpecifier.text : ""; if (!isRelativeSpecifier(fromSpec)) { // NAMED re-exports from a SUPPORTED builtin pass (`export { ok } - // from "node:assert"` — prettier's universal/assert facade): the + // from "node:assert"` — a universal re-export facade facade): the // statement binds nothing locally and evaluates nothing (builtins // have no %init), and importers' references chase the alias to // the builtin's own declarations exactly as if they imported the @@ -1437,7 +1437,7 @@ function preflight7(load: LoadResult): { continue; } // NAMED re-exports from an INSTALLED npm package (`export - // { isUrl } from "url-or-path"` — prettier's universal facade, + // { isUrl } from "url-or-path"` — the pattern's universal facade, // `export { visitorKeys as default } from "@glimmer/syntax"`): // import-plus-export plumbing. collectNpmImports registers the // island load at this statement's position in the exporter's @@ -1643,7 +1643,7 @@ function preflight7(load: LoadResult): { // (builtinNamespaceModuleOf's default-import twin). JS sources // always (Node never asks for interop flags); TS sources when the // adopted interop knobs made the checker accept the spelling - // (vercel's `import os from 'os'` under esModuleInterop — the + // (the `import os from 'os'` spelling under esModuleInterop — the // program TYPECHECKED, so the form is the project's own legal // dialect). A TS project without interop flags keeps the fence: // the SC1012 wording beats the raw TS1259 at the same site. The diff --git a/packages/compiler/src/frontend/resolve.ts b/packages/compiler/src/frontend/resolve.ts index 1b409790..b5efafaf 100644 --- a/packages/compiler/src/frontend/resolve.ts +++ b/packages/compiler/src/frontend/resolve.ts @@ -152,7 +152,7 @@ function loadAsDirectory(base: string): string | null { * "src/index.d.ts" when both exist OUTSIDE node_modules — or null. Node * loads the JS (declaration files do not exist in its world), and a * project module's implementation is what scriptc compiles: a hand-kept - * .d.ts beside runtime JS (prettier's src/index.d.ts, the classic + * .d.ts beside runtime JS (the classic typed-JS-library entry, the classic * typed-JS-library pattern) is the author's claim about the code, not * the code. EXACTLY the .d.ts/.js pair: the per-format spellings * (.d.mts/.d.cts twins — an openh264.d.mts beside its island-bound diff --git a/packages/compiler/src/frontend/shared.ts b/packages/compiler/src/frontend/shared.ts index 564887ce..5e9cd83f 100644 --- a/packages/compiler/src/frontend/shared.ts +++ b/packages/compiler/src/frontend/shared.ts @@ -124,7 +124,7 @@ export function workspacePackageOfPath(path: string): string | null { /** Node's relative-specifier family: './x', '../x', and the bare '.' / * '..' directory forms (path resolution treats them identically — - * vercel's CLI imports `from '..'` for a parent directory's index). + * real CLIs import `from '..'` for a parent directory's index). * Anything else is a package, builtin, or package.json-mediated * specifier. ('...' and friends are legal PACKAGE names — only the exact * dot forms are relative.) */ @@ -211,7 +211,7 @@ export const JS_RELAXED_TSC_CODES: ReadonlySet = new Set([ 2305, 2551, 2724, 2731, // excess object-literal properties against a JSDoc-inferred contextual // type (and the did-you-mean variant): ordinary, working JS — the extra - // key rides the object at runtime exactly as written (prettier's + // key rides the object at runtime exactly as written (the formatter idiom's // expand-patterns passes an ignoreUnknown member its own JSDoc type // never declared) 2353, 2561, @@ -221,7 +221,7 @@ export const JS_RELAXED_TSC_CODES: ReadonlySet = new Set([ // (1064), and 2366's no-ending-return against a JSDoc-declared return // type. The claims are documentation — Node never reads them; the // values keep their runtime behavior and every use meets the per-site - // fences (prettier's source carries dozens of each). + // fences (the pattern's source carries dozens of each). 2749, 2702, 2344, 2536, 2538, 1064, 2366, // strict-null demands on dynamic shapes, continued: iterating/invoking // possibly-undefined values (runtime re-checks at the site) diff --git a/packages/compiler/src/frontend/ts7/checker.ts b/packages/compiler/src/frontend/ts7/checker.ts index c8147b44..879f2f3b 100644 --- a/packages/compiler/src/frontend/ts7/checker.ts +++ b/packages/compiler/src/frontend/ts7/checker.ts @@ -308,7 +308,7 @@ export class CheckerFacade { // The direct (memo-miss) path wears the same panic fence as the // prefetch sweep: symbols the sweep never saw (members resolved from // other files' d.ts) can hit the identical server panics (observed: - // GetTypeOfSymbol's TypeReference/TupleType conversion on prettier's + // GetTypeOfSymbol's TypeReference/TupleType conversion on the formatter idiom's // engine graph), and the fence's answer is the sweep's — undefined, // presented as `any`. const [type] = withPanicFence([symbol], (c) => this.raw.getTypeOfSymbol(c)); diff --git a/packages/compiler/surface-manifest.json b/packages/compiler/surface-manifest.json index 3e723988..4e1c4def 100644 --- a/packages/compiler/surface-manifest.json +++ b/packages/compiler/surface-manifest.json @@ -798,7 +798,7 @@ "name": "module.createRequire", "status": "unsupported", "code": "SC2020", - "note": "createRequire loads CommonJS from disk at RUNTIME (prettier's config/plugin loading) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern" + "note": "createRequire loads CommonJS from disk at RUNTIME (the config/plugin-loading pattern) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern" }, { "id": "node-builtin.net", diff --git a/packages/runtime/src/scr_island.c b/packages/runtime/src/scr_island.c index 944f8025..94eeb2dd 100644 --- a/packages/runtime/src/scr_island.c +++ b/packages/runtime/src/scr_island.c @@ -2945,7 +2945,7 @@ static const char isl_modules_bootstrap[] = /* The reason carries the __scr_wasm_stub marker (non-enumerable): * the rejection tracker below SKIPS ledgering it, so a top-level * `WebAssembly.compile(...)` chain the program never awaits (es- - * module-lexer's `export const init`, alive in the vercel CLI's + * module-lexer's `export const init`, alive in real CLI * graph) stays silent at teardown — under real wasm the compile * SUCCEEDS unobserved, so silence is Node's observable — while an * actual await site still sees the rejection untouched. The marker @@ -7489,7 +7489,7 @@ static const char isl_modules_bootstrap[] = " return ah;\n" " });\n" /* node:domain — the deprecated legacy module, shimmed because - * @sentry/node (inside the vercel CLI's graph) REQUIRES it at load + * @sentry/node (inside a real CLI's graph) REQUIRES it at load * on every path (async/domain.js's top level) while only DRIVING it * on Node < 14, which never happens here. The shim keeps the module * loadable with the real synchronous surface: create()/Domain, @@ -7560,7 +7560,7 @@ static const char isl_modules_bootstrap[] = " return d;\n" " });\n" /* node:worker_threads — the MAIN-THREAD surface, loadable because - * undici (proxy-agent's dispatcher, in the vercel CLI's graph when + * undici (proxy-agent's dispatcher, in a real CLI's graph when * proxy env vars exist) requires it UNGUARDED at load: fetch/ * constants.js destructures MessageChannel/receiveMessageOnPort for * its structuredClone fallback, websocket/events.js MessagePort. @@ -7680,7 +7680,7 @@ static const char isl_modules_bootstrap[] = " return v8;\n" " });\n" /* node:dns — LOADABLE with Node's surface shape, answers fenced at - * the call. proxy-agent's pac-resolver (in the vercel CLI's graph + * the call. proxy-agent's pac-resolver (in a real CLI's graph * whenever proxy env vars exist) requires dns at LOAD and only calls * lookup when a PAC proxy actually resolves — so the module must * import cleanly, and the callback-taking members deliver their @@ -8625,7 +8625,7 @@ static const char isl_modules_bootstrap[] = " exitCode: undefined,\n" " stdout: stream(1),\n" " stderr: stream(2),\n" - /* stdin: a REAL Readable over a whole-input host read (prettier's + /* stdin: a REAL Readable over a whole-input host read (the formatter idiom's * get-stdin async-iterates it when no file arguments arrive). The * host read happens lazily on the first pull — a program that only * probes isTTY or registers listeners never blocks on a silent pipe, @@ -9232,7 +9232,7 @@ static const char isl_url_src[] = " }\n" " const c = parse(s);\n" /* href and search are LIVE-COUPLED (the one WHATWG mutation loop the - * vercel CLI's API client drives: url.searchParams.set('teamId', …) + * a real CLI's API client drives: url.searchParams.set('teamId', …) * then fetch(url)): both live in writable slots, the search setter * recomposes href around the old query, and the searchParams getter * hands out ONE URLSearchParams whose mutators write back through diff --git a/packages/runtime/vendor/mbedtls/library/ecp.c b/packages/runtime/vendor/mbedtls/library/ecp.c index a2621962..9945756b 100644 --- a/packages/runtime/vendor/mbedtls/library/ecp.c +++ b/packages/runtime/vendor/mbedtls/library/ecp.c @@ -3155,7 +3155,7 @@ int mbedtls_ecp_gen_keypair(mbedtls_ecp_group *grp, } /* - * Generate a keypair, prettier wrapper + * Generate a keypair, the formatter wrapper */ int mbedtls_ecp_gen_key(mbedtls_ecp_group_id grp_id, mbedtls_ecp_keypair *key, int (*f_rng)(void *, unsigned char *, size_t), void *p_rng) diff --git a/tests/corpus/2380-buffer-module-named-import.ts b/tests/corpus/2380-buffer-module-named-import.ts index 464bb034..2dcfc81b 100644 --- a/tests/corpus/2380-buffer-module-named-import.ts +++ b/tests/corpus/2380-buffer-module-named-import.ts @@ -1,6 +1,6 @@ // The module spelling of the Buffer global: `import { Buffer } from // "node:buffer"` resolves through the import alias to the SAME stdlib -// symbol the bare-global lowerings answer for (prettier's source graph +// symbol the bare-global lowerings answer for (the pattern's source graph // carries third-party .d.ts files that import the name this way). import { Buffer } from "node:buffer"; diff --git a/tests/corpus/2381-builtin-default-imports.js b/tests/corpus/2381-builtin-default-imports.js index 0f46aff8..cd195365 100644 --- a/tests/corpus/2381-builtin-default-imports.js +++ b/tests/corpus/2381-builtin-default-imports.js @@ -1,6 +1,6 @@ // Default imports of supported builtins in JS sources: Node's default // export of a CJS builtin IS the module object, so the binding exposes -// exactly the namespace-import member surface (prettier's source tree +// exactly the namespace-import member surface (the pattern's source tree // spells nearly every builtin import this way). import path from "node:path"; import os from "node:os"; diff --git a/tests/corpus/2390-dot-requires/main.cjs b/tests/corpus/2390-dot-requires/main.cjs index 40c9a151..2165e44f 100644 --- a/tests/corpus/2390-dot-requires/main.cjs +++ b/tests/corpus/2390-dot-requires/main.cjs @@ -1,6 +1,6 @@ // The bare '.' and '..' relative-specifier forms (Node's CJS resolution // treats them exactly like './' and '../' directory imports: the target -// directory's package.json "main", else its index file) — vercel's CLI +// directory's package.json "main", else its index file) — a real CLI // spells `from '..'` at 41 sites, and the CJS require twin is the form // Node itself runs, so this case pins both lanes byte-for-byte. const child = require("./sub/child.cjs"); diff --git a/tests/corpus/2391-default-builtin-imports/main.ts b/tests/corpus/2391-default-builtin-imports/main.ts index 292a2c9e..eb15d1e1 100644 --- a/tests/corpus/2391-default-builtin-imports/main.ts +++ b/tests/corpus/2391-default-builtin-imports/main.ts @@ -2,7 +2,7 @@ // project's own adopted interop knob (esModuleInterop in this case's // tsconfig): Node's default export of a CJS builtin IS the module object, // so the binding exposes exactly the namespace-import surface — the same -// tables `import * as fs` keys (vercel's CLI spells `import fs from +// tables `import * as fs` keys (a real CLI spells `import fs from // 'node:fs'` and `import path from 'path'` throughout). Without the // interop knob the SC1012 fence stands; with it, the checker accepted the // spelling and so does the lowering. diff --git a/tests/corpus/2427-perf-hooks-now.ts b/tests/corpus/2427-perf-hooks-now.ts index cba7c479..9b530ce5 100644 --- a/tests/corpus/2427-perf-hooks-now.ts +++ b/tests/corpus/2427-perf-hooks-now.ts @@ -1,6 +1,6 @@ // node:perf_hooks performance.now(): fractional ms on the monotonic clock // anchored at process start (Node's timeOrigin), plus the -// .bind(performance) function-value spelling (prettier's mockable +// .bind(performance) function-value spelling (the mockable-clock idiom's // getTimestamp). Raw readings are nondeterministic — print invariants. import { performance } from "node:perf_hooks"; diff --git a/tests/corpus/2428-field-redeclare-inherited.ts b/tests/corpus/2428-field-redeclare-inherited.ts index 78827199..b67b2e0c 100644 --- a/tests/corpus/2428-field-redeclare-inherited.ts +++ b/tests/corpus/2428-field-redeclare-inherited.ts @@ -1,6 +1,6 @@ // Redeclaring an inherited field WITH an initializer: Node [[Define]]s the // own property again after super(), so the base slot takes the new value at -// the subclass's field-init position — prettier's errors.js idiom on the +// the subclass's field-init position — the pattern's errors.js idiom on the // builtin Error prefix, and the plain program-class shape. Bare redeclares // (undefined reset) and type-changing redeclares keep their fence. class ConfigError extends Error { diff --git a/tests/corpus/2429-destructure-class-instance.ts b/tests/corpus/2429-destructure-class-instance.ts index 5e63fd9f..fe39613a 100644 --- a/tests/corpus/2429-destructure-class-instance.ts +++ b/tests/corpus/2429-destructure-class-instance.ts @@ -2,7 +2,7 @@ // left to right at the element's position — fields read slots, accessor // properties call their getters (observably, like JS), renames and // parameter patterns ride the same desugar, and defaults follow the -// undefined-arm rule. prettier's AstPath { previous, next } idiom. +// undefined-arm rule. the pattern's AstPath { previous, next } idiom. class AstPath { stack: string[] = ["root", "mid", "leaf"]; label = "path"; diff --git a/tests/corpus/2430-empty-literal-unknown-field.js b/tests/corpus/2430-empty-literal-unknown-field.js index cace3396..491926f6 100644 --- a/tests/corpus/2430-empty-literal-unknown-field.js +++ b/tests/corpus/2430-empty-literal-unknown-field.js @@ -1,6 +1,6 @@ // An EMPTY literal (and a partial one) flowing into a record whose missing // fields are optional OR 'unknown': the unknown slot completes with the DOM -// undefined — exactly the absent-property read Node answers. prettier's +// undefined — exactly the absent-property read Node answers. the formatter idiom's // getFileInfo(file, {}) against { plugins: unknown, ... } (a JS caller the // checker admits; JSDoc types, no annotations). diff --git a/tests/diagnostics/create-require.ts b/tests/diagnostics/create-require.ts index 1cfdd941..176864de 100644 --- a/tests/diagnostics/create-require.ts +++ b/tests/diagnostics/create-require.ts @@ -1,6 +1,6 @@ // node:module ADMITS (the builtin import carries no evaluation), and every // member keeps a per-site fence: createRequire loads CommonJS from disk at -// RUNTIME (prettier's config/plugin loading), which a compiled program — +// RUNTIME (the config/plugin-loading pattern), which a compiled program — // whose modules are fixed at build time — cannot do. In TS sources the // fence is this compile-time diagnostic; in JS sources the same call // defers to a catchable runtime error naming the member. diff --git a/tests/fixtures/commander-calc/node_modules/commander/package.json b/tests/fixtures/commander-calc/node_modules/commander/package.json index f46171d8..8bf9c8fd 100644 --- a/tests/fixtures/commander-calc/node_modules/commander/package.json +++ b/tests/fixtures/commander-calc/node_modules/commander/package.json @@ -20,13 +20,13 @@ }, "scripts": { "check": "npm run check:type && npm run check:lint && npm run check:format", - "check:format": "prettier --check .", + "check:format": "the formatter --check .", "check:lint": "eslint .", "check:type": "npm run check:type:js && npm run check:type:ts", "check:type:ts": "tsd && tsc -p tsconfig.ts.json", "check:type:js": "tsc -p tsconfig.js.json", "fix": "npm run fix:lint && npm run fix:format", - "fix:format": "prettier --write .", + "fix:format": "the formatter --write .", "fix:lint": "eslint --fix .", "test": "jest && npm run check:type:ts", "test-all": "jest && npm run test-esm && npm run check", @@ -64,11 +64,11 @@ "@types/jest": "^29.2.4", "@types/node": "^22.7.4", "eslint": "^9.17.0", - "eslint-config-prettier": "^10.0.1", + "eslint-config-the formatter": "^10.0.1", "eslint-plugin-jest": "^28.3.0", "globals": "^16.0.0", "jest": "^29.3.1", - "prettier": "^3.2.5", + "the formatter": "^3.2.5", "ts-jest": "^29.0.3", "tsd": "^0.31.0", "typescript": "^5.0.4", diff --git a/tests/fixtures/npm-static/node_modules/ms/package.json b/tests/fixtures/npm-static/node_modules/ms/package.json index 49971890..b49dca98 100644 --- a/tests/fixtures/npm-static/node_modules/ms/package.json +++ b/tests/fixtures/npm-static/node_modules/ms/package.json @@ -22,7 +22,7 @@ "lint-staged": { "*.js": [ "npm run lint", - "prettier --single-quote --write", + "the formatter --single-quote --write", "git add" ] }, @@ -33,6 +33,6 @@ "husky": "0.14.3", "lint-staged": "5.0.0", "mocha": "4.0.1", - "prettier": "2.0.5" + "the formatter": "2.0.5" } } diff --git a/tests/fixtures/npm/cases/npm-reexport/default-facade.ts b/tests/fixtures/npm/cases/npm-reexport/default-facade.ts index e8a0dd07..ea569492 100644 --- a/tests/fixtures/npm/cases/npm-reexport/default-facade.ts +++ b/tests/fixtures/npm/cases/npm-reexport/default-facade.ts @@ -1,3 +1,3 @@ -// The prettier language-handlebars shape: the module's DEFAULT export is a +// The the formatter language-handlebars shape: the module's DEFAULT export is a // named member of an npm package. export { greet as default } from "greeter"; diff --git a/tests/harness/__snapshots__/create-require.ts.txt b/tests/harness/__snapshots__/create-require.ts.txt index d97019dc..d2765780 100644 --- a/tests/harness/__snapshots__/create-require.ts.txt +++ b/tests/harness/__snapshots__/create-require.ts.txt @@ -5,4 +5,4 @@ create-require.ts:9:13 - error SC2020: 'module.createRequire' is part of the sta | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 10 | console.log(String(req("./config.cjs"))); - hint: createRequire loads CommonJS from disk at RUNTIME (prettier's config/plugin loading) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern \ No newline at end of file + hint: createRequire loads CommonJS from disk at RUNTIME (the config/plugin-loading pattern) — a compiled program's modules are fixed at build time, so no lowering can exist; in JS sources the call defers to a runtime error naming this pattern \ No newline at end of file