Skip to content

Commit 21b4be0

Browse files
fix: re-enable sourcemaps and fix internal test coverage merging (#683)
<!-- 👋 Hi, thanks for sending a PR to template-typescript-node-package! 💖. Please fill out all fields below and make sure each item is true and [x] checked. Otherwise we may not be able to review your PR. --> ## PR Checklist - [x] Addresses an existing open issue: fixes #682 - [x] That issue was marked as [`status: accepting prs`](https://github.com/JoshuaKGoldberg/template-typescript-node-package/issues?q=is%3Aopen+is%3Aissue+label%3A%22status%3A+accepting+prs%22) - [x] Steps in [CONTRIBUTING.md](https://github.com/JoshuaKGoldberg/template-typescript-node-package/blob/main/.github/CONTRIBUTING.md) were taken ## Overview Yeah, tsup needed to enable sourcemaps. See also the `c8` docs: https://github.com/bcoe/c8#checking-for-full-source-coverage-using---all
1 parent 3f501ac commit 21b4be0

File tree

5 files changed

+7
-5
lines changed

5 files changed

+7
-5
lines changed

script/create-test-e2e.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ await $`rm -rf ${repository}`;
1212

1313
await $({
1414
stdio: "inherit",
15-
})`c8 -o ./coverage-create -r html -r lcov node ./bin/index.js --mode create --author ${author} --email ${email} --description ${description} --owner ${owner} --title ${title} --repository ${repository} --skip-contributors --skip-github-api`;
15+
})`c8 -o ./coverage-create -r html -r lcov --src src node ./bin/index.js --mode create --author ${author} --email ${email} --description ${description} --owner ${owner} --title ${title} --repository ${repository} --skip-contributors --skip-github-api`;
1616

1717
process.chdir(repository);
1818

script/initialize-test-e2e.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ await $`pnpm i`;
5252
await $`pnpm run build`;
5353
await $({
5454
stdio: "inherit",
55-
})`c8 -o ./coverage-initialize -r html -r lcov node ./bin/index.js --description ${description} --mode initialize --owner ${owner} --title ${title} --repository ${repository} --skip-github-api --skip-removal --skip-restore`;
55+
})`c8 -o ./coverage-initialize -r html -r lcov --src src node ./bin/index.js --description ${description} --mode initialize --owner ${owner} --title ${title} --repository ${repository} --skip-github-api --skip-removal --skip-restore`;

script/migrate-test-e2e.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const title = "Template TypeScript Node Package";
99

1010
await $({
1111
stdio: "inherit",
12-
})`c8 -o ./coverage-migrate -r html -r lcov node ./bin/index.js --mode migrate --description ${description} --owner ${owner} --title ${title} --repository ${repository} --skip-github-api --skip-contributors --skip-install`;
12+
})`c8 -o ./coverage-migrate -r html -r lcov --src src node ./bin/index.js --mode migrate --description ${description} --owner ${owner} --title ${title} --repository ${repository} --skip-github-api --skip-contributors --skip-install`;
1313

1414
const { stdout: gitStatus } = await $`git status`;
1515
console.log(`Stdout from running \`git status\`:\n${gitStatus}`);

src/shared/getGitHubUserAsAllContributor.ts

+3-2
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export async function getGitHubUserAsAllContributor(owner: string) {
1818
user = owner;
1919
}
2020

21-
await $`npx -y [email protected] add ${user} ${[
21+
const contributions = [
2222
"code",
2323
"content",
2424
"doc",
@@ -27,7 +27,8 @@ export async function getGitHubUserAsAllContributor(owner: string) {
2727
"maintenance",
2828
"projectManagement",
2929
"tool",
30-
].join(",")}`;
30+
].join(",");
31+
await $`npx -y [email protected] add ${user} ${contributions}`;
3132

3233
return user;
3334
}

tsup.config.ts

+1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ export default defineConfig({
77
entry: ["src/**/*.ts", "!src/**/*.test.*"],
88
format: "esm",
99
outDir: "lib",
10+
sourcemap: true,
1011
});

0 commit comments

Comments
 (0)