Skip to content
Draft
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
9 changes: 9 additions & 0 deletions .changeset/purple-teeth-look.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
'skuba': minor
---

lint: Remove `unbundle` from tsdown configs

When skuba first migrated packages to tsdown, it set `unbundle: true` with a `// TODO: determine if your project can be bundled` comment as a prompt for consumers to revisit the setting. This patch now automates that follow-up.

The `unbundle` field and its TODO comment will be removed from your `tsdown.config` file if your package does not appear to ship translations (`.vocab` files) or CSS (`.css` files).
8 changes: 8 additions & 0 deletions src/cli/format/__snapshots__/format.int.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ Patch skipped: Migrate tsdown config to 0.21 - no tsdown.config files found upgr

Patch skipped: Replace pnpm install --prod with pnpm prune --prod in Dockerfiles - no dockerfiles found upgrade-skuba

Patch skipped: Unbundle tsdown.config files to avoid shipping translations and CSS in packages that use tsdown for non-translation purposes - no tsdown.config files found upgrade-skuba

skuba update complete. upgrade-skuba

Processed skuba lints in <random>s.
Expand Down Expand Up @@ -191,6 +193,8 @@ Patch skipped: Migrate tsdown config to 0.21 - no tsdown.config files found upgr

Patch skipped: Replace pnpm install --prod with pnpm prune --prod in Dockerfiles - no dockerfiles found upgrade-skuba

Patch skipped: Unbundle tsdown.config files to avoid shipping translations and CSS in packages that use tsdown for non-translation purposes - no tsdown.config files found upgrade-skuba

skuba update complete. upgrade-skuba

Processed skuba lints in <random>s.
Expand Down Expand Up @@ -305,6 +309,8 @@ Patch skipped: Migrate tsdown config to 0.21 - no tsdown.config files found upgr

Patch skipped: Replace pnpm install --prod with pnpm prune --prod in Dockerfiles - no dockerfiles found upgrade-skuba

Patch skipped: Unbundle tsdown.config files to avoid shipping translations and CSS in packages that use tsdown for non-translation purposes - no tsdown.config files found upgrade-skuba

skuba update complete. upgrade-skuba

Processed skuba lints in <random>s.
Expand Down Expand Up @@ -391,6 +397,8 @@ Patch skipped: Migrate tsdown config to 0.21 - no tsdown.config files found upgr

Patch skipped: Replace pnpm install --prod with pnpm prune --prod in Dockerfiles - no dockerfiles found upgrade-skuba

Patch skipped: Unbundle tsdown.config files to avoid shipping translations and CSS in packages that use tsdown for non-translation purposes - no tsdown.config files found upgrade-skuba

skuba update complete. upgrade-skuba

Processed skuba lints in <random>s.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ interface FoundEntry {
pairNode: SgNode;
}

const removeNodeWithComma = (node: SgNode): Edit[] => {
export const removeNodeWithComma = (node: SgNode): Edit[] => {
const edits: Edit[] = [node.replace('')];
const maybeCommaAfter = node.next();
if (maybeCommaAfter?.text().trim() === ',') {
Expand Down
6 changes: 6 additions & 0 deletions src/cli/lint/internalLints/upgrade/patches/15.3.1/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
import type { Patches } from '../../index.js';

import { tryPatchDockerfilePruneProd } from './patchDockerfilePruneProd.js';
import { tryPatchTsdownUnbundle } from './patchTsdownUnbundle.js';

export const patches: Patches = [
{
apply: tryPatchDockerfilePruneProd,
description:
'Replace pnpm install --prod with pnpm prune --prod in Dockerfiles',
},
{
apply: tryPatchTsdownUnbundle,
description:
'Unbundle tsdown.config files to avoid shipping translations and CSS in packages that use tsdown for non-translation purposes',
},
];
Loading
Loading