Skip to content

Fix broken test:typings due to parent node_modules node types.#84

Merged
Logan Volkers (loganvolkers) merged 1 commit into
saasquatch:mainfrom
Wendystraite:fix_main_tests
Nov 7, 2025
Merged

Fix broken test:typings due to parent node_modules node types.#84
Logan Volkers (loganvolkers) merged 1 commit into
saasquatch:mainfrom
Wendystraite:fix_main_tests

Conversation

@Wendystraite
Copy link
Copy Markdown
Contributor

@Wendystraite Wendy Fouchter (Wendystraite) commented Sep 26, 2025

Description of the change

Edit : see #91 for a better fix using pnpm.

test:typings was broken due to the test checking the types of ../../node_modules/@types/node/ts4.8. Force typeRoots to be the local node_modules to fix it. Also bump the test dependencies to bunshi 2.1.5.

Show error log
$ ./node_modules/typescript/bin/tsc src/
../../node_modules/@types/node/ts4.8/crypto.d.ts:3533:17 - error TS1110: Type expected.

3533     type UUID = `${string}-${string}-${string}-${string}-${string}`;
                     ~~~

../../node_modules/@types/node/ts4.8/test.d.ts:881:34 - error TS1005: '?' expected.

881             : F extends abstract new(...args: any) => infer T ? T
                                     ~~~

../../node_modules/@types/node/ts4.8/test.d.ts:881:63 - error TS1005: ':' expected.

881             : F extends abstract new(...args: any) => infer T ? T
                                                                  ~

../../node_modules/@types/node/ts4.8/test.d.ts:882:13 - error TS1005: ',' expected.

882             : unknown,
                ~

../../node_modules/@types/node/ts4.8/test.d.ts:884:34 - error TS1005: '?' expected.

884             : F extends abstract new(...args: infer Y) => any ? Y
                                     ~~~

../../node_modules/@types/node/ts4.8/test.d.ts:884:63 - error TS1005: ':' expected.

884             : F extends abstract new(...args: infer Y) => any ? Y
                                                                  ~

../../node_modules/@types/node/ts4.8/test.d.ts:885:13 - error TS1005: ',' expected.

885             : unknown[],
                ~

../../node_modules/@types/node/ts4.8/test.d.ts:885:22 - error TS1005: ',' expected.

885             : unknown[],
                         ~

../../node_modules/@types/node/ts4.8/test.d.ts:886:5 - error TS1109: Expression expected.

886     > {
        ~

../../node_modules/@types/node/ts4.8/test.d.ts:890:24 - error TS1005: ',' expected.

890         arguments: Args;
                           ~

../../node_modules/@types/node/ts4.8/test.d.ts:894:35 - error TS1005: ',' expected.

894         error: unknown | undefined;
                                      ~

../../node_modules/@types/node/ts4.8/test.d.ts:900:39 - error TS1005: ',' expected.

900         result: ReturnType | undefined;
                                          ~

../../node_modules/@types/node/ts4.8/test.d.ts:904:21 - error TS1005: ',' expected.

904         stack: Error;
                        ~

../../node_modules/@types/node/ts4.8/test.d.ts:909:19 - error TS1005: ',' expected.

909         target: F extends abstract new(...args: any) => any ? F : undefined;
                      ~~~~~~~

../../node_modules/@types/node/ts4.8/test.d.ts:909:27 - error TS1005: ':' expected.

909         target: F extends abstract new(...args: any) => any ? F : undefined;
                              ~~~~~~~~

../../node_modules/@types/node/ts4.8/test.d.ts:909:36 - error TS1005: ',' expected.

909         target: F extends abstract new(...args: any) => any ? F : undefined;
                                       ~~~

../../node_modules/@types/node/ts4.8/test.d.ts:909:54 - error TS1005: '{' expected.

909         target: F extends abstract new(...args: any) => any ? F : undefined;
                                                         ~~

../../node_modules/@types/node/ts4.8/test.d.ts:909:63 - error TS1005: ',' expected.

909         target: F extends abstract new(...args: any) => any ? F : undefined;
                                                                  ~

../../node_modules/@types/node/ts4.8/test.d.ts:909:76 - error TS1005: ',' expected.

909         target: F extends abstract new(...args: any) => any ? F : undefined;
                                                                               ~

../../node_modules/@types/node/ts4.8/test.d.ts:913:22 - error TS1005: ',' expected.

913         this: unknown;
                         ~

../../node_modules/@types/node/ts4.8/util.d.ts:1605:42 - error TS1005: ',' expected.

1605         entries(): IterableIterator<[name: string, value: string]>;
                                              ~

../../node_modules/@types/node/ts4.8/util.d.ts:1605:44 - error TS1068: Unexpected token. A constructor, method, accessor, or property was expected.  

1605         entries(): IterableIterator<[name: string, value: string]>;
                                                ~~~~~~

../../node_modules/@types/node/ts4.8/util.d.ts:1605:57 - error TS1005: ';' expected.

1605         entries(): IterableIterator<[name: string, value: string]>;
                                                             ~

../../node_modules/@types/node/ts4.8/util.d.ts:1605:65 - error TS1005: ';' expected.

1605         entries(): IterableIterator<[name: string, value: string]>;
                                                                     ~

../../node_modules/@types/node/ts4.8/util.d.ts:1605:66 - error TS1109: Expression expected.

1605         entries(): IterableIterator<[name: string, value: string]>;
                                                                      ~

../../node_modules/@types/node/ts4.8/util.d.ts:1605:67 - error TS1109: Expression expected.

1605         entries(): IterableIterator<[name: string, value: string]>;
                                                                       ~

../../node_modules/@types/node/ts4.8/util.d.ts:1611:17 - error TS1005: ',' expected.

1611         get(name: string): string | null;
                     ~

../../node_modules/@types/node/ts4.8/util.d.ts:1611:26 - error TS1005: ';' expected.

1611         get(name: string): string | null;
                              ~

../../node_modules/@types/node/ts4.8/util.d.ts:1615:17 - error TS1005: ',' expected.

1615         has(name: string): boolean;
                     ~

../../node_modules/@types/node/ts4.8/util.d.ts:1615:26 - error TS1005: ';' expected.

1615         has(name: string): boolean;
                              ~

../../node_modules/@types/node/ts4.8/util.d.ts:1631:15 - error TS1005: ';' expected.

1631         keys(): IterableIterator<string>;
                   ~

../../node_modules/@types/node/ts4.8/util.d.ts:1631:41 - error TS1005: '(' expected.

1631         keys(): IterableIterator<string>;
                                             ~

../../node_modules/@types/node/ts4.8/util.d.ts:1646:17 - error TS1005: ',' expected.

1646         set(name: string, value: string): void;
                     ~

../../node_modules/@types/node/ts4.8/util.d.ts:1646:32 - error TS1005: ',' expected.

1646         set(name: string, value: string): void;
                                    ~

../../node_modules/@types/node/ts4.8/util.d.ts:1646:41 - error TS1005: ';' expected.

1646         set(name: string, value: string): void;
                                             ~

../../node_modules/@types/node/ts4.8/util.d.ts:1646:47 - error TS1109: Expression expected.

1646         set(name: string, value: string): void;
                                                   ~

../../node_modules/@types/node/ts4.8/util.d.ts:1650:17 - error TS1005: ';' expected.

1650         values(): IterableIterator<string>;
                     ~

../../node_modules/@types/node/ts4.8/util.d.ts:1650:43 - error TS1005: '(' expected.

1650         values(): IterableIterator<string>;
                                               ~

../../node_modules/@types/node/ts4.8/util.d.ts:1654:26 - error TS1005: ';' expected.

1654         [Symbol.iterator]: typeof MIMEParams.prototype.entries;
                              ~

../../node_modules/@types/node/ts4.8/util.d.ts:1656:1 - error TS1128: Declaration or statement expected.

1656 }
     ~


Found 40 errors.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation or Development tools (readme, specs, tests, code formatting)

test:typings was broken due to the test checking the types of `../../node_modules/@types/node/ts4.8`.
Force typeRoots to be the local `node_modules` to fix it.
Also bump the test dependencies to bunshi 2.1.5.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Sep 26, 2025

⚠️ No Changeset found

Latest commit: fcea7d7

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Wendystraite Wendy Fouchter (Wendystraite) marked this pull request as draft October 4, 2025 14:35
@Wendystraite Wendy Fouchter (Wendystraite) marked this pull request as ready for review October 4, 2025 14:35
Copilot AI review requested due to automatic review settings October 4, 2025 14:35
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This pull request fixes the test:typings command that was failing due to TypeScript compiler errors in the parent node_modules Node.js type definitions. The fix involves configuring TypeScript to use only local type definitions to avoid conflicts with incompatible type definitions in the parent directory.

  • Force TypeScript to use only local node_modules/@types for type resolution
  • Update bunshi dependency to version 2.1.5
Files not reviewed (1)
  • examples/old-typescript/package-lock.json: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@loganvolkers Logan Volkers (loganvolkers) merged commit 48f3f8a into saasquatch:main Nov 7, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants