Skip to content

Commit 8a8cefe

Browse files
committed
test(treeshake-check): move fixture JS out of dist/ and fix CI failures
Fixture JS files are hand-authored test data, not build output. Moving them from dist/index.js to index.js avoids conflicts with the root **/dist gitignore rule, which was silently excluding them from git. In CI the files were missing, causing rollup to treat them as external and return FullyTreeshakeable for enum-only and mixed, failing the HasSideEffects assertions. Also migrates integration tests from `live` to `layer + it.scoped` to align with the rest of the test suite.
1 parent b6f4545 commit 8a8cefe

12 files changed

Lines changed: 71 additions & 76 deletions

File tree

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ e2e/*/dist
1313
*/dist
1414
**/dist/*
1515
**/**/*.d.ts*
16+
tools/treeshake-check/src/__fixtures__/**

package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,8 @@
133133
"rollup": "^4.59.0",
134134
"undici@^7": "^7.24.0",
135135
"picomatch@>=4": "^4.0.4",
136-
"picomatch@<3": "^2.3.2"
136+
"picomatch@<3": "^2.3.2",
137+
"yaml": ">=2.8.3"
137138
}
138139
}
139140
}

packages/davinci-client/api-report/davinci-client.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export function davinci<ActionType extends ActionTypes = ActionTypes>(input: {
270270
start: <QueryParams extends OutgoingQueryParams = OutgoingQueryParams>(options?: StartOptions<QueryParams> | undefined) => Promise<ContinueNode | ErrorNode | FailureNode | StartNode | SuccessNode>;
271271
update: <T extends SingleValueCollectors | MultiSelectCollector | ObjectValueCollectors | AutoCollectors>(collector: T) => Updater<T>;
272272
validate: (collector: SingleValueCollectors | ObjectValueCollectors | MultiValueCollectors | AutoCollectors) => Validator;
273-
poll: (collector: PollingCollector) => Poller;
273+
pollStatus: (collector: PollingCollector) => Poller;
274274
getClient: () => {
275275
action: string;
276276
collectors: Collectors[];

packages/davinci-client/api-report/davinci-client.types.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ export function davinci<ActionType extends ActionTypes = ActionTypes>(input: {
270270
start: <QueryParams extends OutgoingQueryParams = OutgoingQueryParams>(options?: StartOptions<QueryParams> | undefined) => Promise<ContinueNode | ErrorNode | FailureNode | StartNode | SuccessNode>;
271271
update: <T extends SingleValueCollectors | MultiSelectCollector | ObjectValueCollectors | AutoCollectors>(collector: T) => Updater<T>;
272272
validate: (collector: SingleValueCollectors | ObjectValueCollectors | MultiValueCollectors | AutoCollectors) => Validator;
273-
poll: (collector: PollingCollector) => Poller;
273+
pollStatus: (collector: PollingCollector) => Poller;
274274
getClient: () => {
275275
action: string;
276276
collectors: Collectors[];

pnpm-lock.yaml

Lines changed: 58 additions & 63 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tools/treeshake-check/eslint.config.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,6 @@ export default [
2020
},
2121
},
2222
{
23-
ignores: ['**/out-tsc', '**/__fixtures__/**/dist'],
23+
ignores: ['**/out-tsc'],
2424
},
2525
];

tools/treeshake-check/src/__fixtures__/.gitignore

Lines changed: 0 additions & 2 deletions
This file was deleted.

tools/treeshake-check/src/__fixtures__/bad-syntax/dist/index.js renamed to tools/treeshake-check/src/__fixtures__/bad-syntax/index.js

File renamed without changes.

tools/treeshake-check/src/__fixtures__/clean/dist/index.js renamed to tools/treeshake-check/src/__fixtures__/clean/index.js

File renamed without changes.

tools/treeshake-check/src/__fixtures__/enum-only/dist/index.js renamed to tools/treeshake-check/src/__fixtures__/enum-only/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
// TypeScript enum compiled output — classic IIFE pattern that prevents tree-shaking
22
var Status;
33
(function (Status) {
4-
Status["Active"] = "Active";
5-
Status["Inactive"] = "Inactive";
6-
Status["Pending"] = "Pending";
4+
Status['Active'] = 'Active';
5+
Status['Inactive'] = 'Inactive';
6+
Status['Pending'] = 'Pending';
77
})(Status || (Status = {}));
88

99
export { Status };

0 commit comments

Comments
 (0)