Skip to content

chore(deps): update dependency prettier to v3 #110

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

Merged
merged 4 commits into from
Aug 1, 2023
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
4 changes: 4 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@
"schedule": ["every 3 months on the first day of the month"]
},
"packageRules": [
{
"matchDepTypes": ["engines"],
"enabled": false
},
{
"matchDepTypes": ["devDependencies"],
"automerge": true
Expand Down
8 changes: 4 additions & 4 deletions lib/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ describe("TypeScriptLoader", () => {
},
});
const loadedCfg = cfg.load(
path.resolve(fixturesPath, "valid.fixture.ts")
path.resolve(fixturesPath, "valid.fixture.ts"),
);

expect(typeof loadedCfg!.config).toStrictEqual("object");
Expand Down Expand Up @@ -54,7 +54,7 @@ describe("TypeScriptLoader", () => {
},
});
const loadedCfg = await cfg.load(
path.resolve(fixturesPath, "valid.fixture.ts")
path.resolve(fixturesPath, "valid.fixture.ts"),
);

expect(typeof loadedCfg!.config).toStrictEqual("object");
Expand Down Expand Up @@ -87,7 +87,7 @@ describe("TypeScriptLoader", () => {
},
});
const loadedCfg = cfg.load(
path.resolve(fixturesPath, "valid.fixture.ts")
path.resolve(fixturesPath, "valid.fixture.ts"),
);

expect(typeof loadedCfg!.config).toStrictEqual("object");
Expand All @@ -103,7 +103,7 @@ describe("TypeScriptLoader", () => {
});

expect(() =>
cfg.load(path.resolve(fixturesPath, "invalid.fixture.ts"))
cfg.load(path.resolve(fixturesPath, "invalid.fixture.ts")),
).toThrowError();
});
});
Expand Down
4 changes: 2 additions & 2 deletions lib/loader.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe("TypeScriptLoader", () => {
const filePath = path.resolve(fixturesPath, "invalid.fixture.ts");
loader(filePath, readFixtureContent(filePath));
fail(
"Error should be thrown upon failing to transpile an invalid TS file."
"Error should be thrown upon failing to transpile an invalid TS file.",
);
} catch (error: unknown) {
expect(error).toBeInstanceOf(TypeScriptCompileError);
Expand Down Expand Up @@ -81,7 +81,7 @@ describe("TypeScriptLoader", () => {
try {
loader("filePath", "readFixtureContent(filePath)");
fail(
"Error should be thrown upon failing to transpile an invalid TS file."
"Error should be thrown upon failing to transpile an invalid TS file.",
);
} catch (error: unknown) {
expect(error).not.toBeInstanceOf(TypeScriptCompileError);
Expand Down
6 changes: 3 additions & 3 deletions lib/typescript-compile-error.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ describe("TypeScriptCompileError", () => {
const tscError = TypeScriptCompileError.fromError(testError);

expect(tscError.name).toStrictEqual(
TypeScriptCompileError.prototype.constructor.name
TypeScriptCompileError.prototype.constructor.name,
);
expect(tscError.message).toContain(
"TypeScriptLoader failed to compile TypeScript"
"TypeScriptLoader failed to compile TypeScript",
);
expect(tscError.message).toContain("Test Error");
expect(tscError.stack).toBe(testError.stack);
Expand All @@ -23,7 +23,7 @@ describe("TypeScriptCompileError", () => {
const tscError = TypeScriptCompileError.fromError(legacyError);

expect(tscError.message).toContain(
"TypeScriptLoader failed to compile TypeScript:"
"TypeScriptLoader failed to compile TypeScript:",
);
});
});
Expand Down
111 changes: 90 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
"build:sources": "node ./scripts/esbuild.config.mjs",
"build:types": "tsc -p tsconfig.build.json",
"check:types": "tsc -p tsconfig.json",
"format": "npm run format:check -- --write",
"format:check": "prettier --check \"{**/*,*}.{js,cjs,mjs,ts}\"",
"format:write": "npm run format:check -- --write",
"lint": "eslint --ext \".js,.cjs,.mjs,.ts\" .",
"lint:fix": "npm run lint -- --fix",
"release": "release-it",
Expand Down Expand Up @@ -66,9 +66,9 @@
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-prettier": "^8.8.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.0.0",
"jest": "^29.6.1",
"prettier": "^2.8.8",
"prettier": "^3.0.0",
"release-it": "^16.1.3",
"typescript": "^5.1.6"
},
Expand Down
16 changes: 8 additions & 8 deletions scripts/esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ async function getSourceEntryPoints() {
const startTime = Date.now();
console.info(
chalk.bold(
`πŸš€ ${chalk.blueBright("cosmiconfig-typescript-loader")} Build\n`
)
`πŸš€ ${chalk.blueBright("cosmiconfig-typescript-loader")} Build\n`,
),
);

console.info("- Generate sources");
Expand All @@ -91,27 +91,27 @@ async function getSourceEntryPoints() {
const result = await buildSources(sourceEntryPoints, format);
const analysis = await analyzeMetafile(
// @ts-ignore we know that the metafile will be emitted
result.metafile
result.metafile,
);
console.info(
`${analysis
.trim()
.split(/\n\r/)
.map((line) => ` ${line}`)
.join()}`
.join()}`,
);

console.info(
`${chalk.bold.greenBright("βœ”")} Generating ${chalk.bold.greenBright(
format
)} sources completed!\n`
format,
)} sources completed!\n`,
);
}

console.info(
chalk.bold.green(
`βœ” Generate sources completed! (${Date.now() - startTime}ms)`
)
`βœ” Generate sources completed! (${Date.now() - startTime}ms)`,
),
);
} catch (error) {
console.error(`🧨 ${chalk.red.bold("Failed:")} ${error.message}`);
Expand Down