Skip to content

Conversation

person1123
Copy link

Description

If you have a pointer that doesn't match any files containing graphql, loadFile should result in an error reporting that no graphql type definitions were identified. However, right now, if there is exactly one error produced by the loader, the meaningful error, the fact that no type definitions were identified, will be hidden. This can be very confusing if there error produced by the loader happens to be unrelated.

An easy reproduction, using graphql-codegen:

/src
  Test.vue

<script setup lang="ts">
import {Props} from 'props.ts';

defineProps<Props>();
</script>

  gqlType.ts

  import { graphql } from '@generated/graphql';

  const MY_FRAGMENT = graphql(`
    fragment MyFragment on SomeType {
      id
    }
  `);

/codegen
  /index.ts

import type { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
  schema: './codegen/schema.config.ts',
  documents: ['src/**/*.vue', 'src/**/*.ts'],
  generates: {
    './generated/graphql/': {
      preset: 'client',
      config: {
        useTypeImports: true,
      },
    },
  },
};

export default config;

package.json

{
  "name": "test",
  "version": "1.0.0",
  "scripts": {
    "build:graphql-codegen": "graphql-codegen -c codegen/index.ts",
   },
  "dependencies": {
    "vue": "3.5.18",
    "graphql": "16.6.0",
  },
  "devDependencies": {
    "@graphql-codegen/cli": "3.3.0",
    "@graphql-codegen/client-preset": "3.0.1",
  }
}

If you run npm run build:graphql-codegen, the reason codegen fails is because there are no graphql type definitions for any file matched by the .vue file matcher. However, the only error it will report is this:

[@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.

This error is preventing the file Test.vue from being parsed, but it's not why graphql codegen in general is failing. If you were to add another vue file with a graphql type definition in it, that file would parse correctly and graphql-codegen would succeed. If you want graphql-codegen to work on the current project setup, you can remove the .vue file matcher from codegen/index.ts.

This change results in the following output instead:

 ✖ Failed to find any GraphQL type definitions in: src/**/*.vue;
      - [@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.

I think this is much clearer.

Related # (issue)
#7406

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • This change requires a documentation update

How Has This Been Tested?

Before, running graphql-codegen on a project with a matcher that results in no graphql type definitions and one parsing error:

✔ Parse Configuration
⚠ Generate outputs
  ❯ Generate to ./generated/graphql/
    ✔ Load GraphQL schemas
    ✖ [@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.
      anonymous.vue
      22 |  import type { SpacePublicationFragment } from '@generated/graphql/graphql';
      23 |
      24 |  const props = defineProps<Props>();
      |                            ^^^^^
      25 |  const instance = getCurrentInstance();
      26 |
    ◼ Generate

After, running graphql-codegenon a project with a matcher that results in no graphql type definitions and one parsing error:

✔ Parse Configuration
⚠ Generate outputs
  ❯ Generate to ./generated/graphql/
    ✔ Load GraphQL schemas
    ✖ Failed to find any GraphQL type definitions in: src/**/*.vue;
      - [@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.
      anonymous.vue
      22 |  import type { SpacePublicationFragment } from '@generated/graphql/graphql';
      23 |
      24 |  const props = defineProps<Props>();
      |                            ^^^^^
      25 |  const instance = getCurrentInstance();
      26 |
    ◼ Generate

Test Environment:

  • OS: MacOS 14.5
  • @graphql-tools/load: 8.0.0
  • NodeJS: v17.9.1

Checklist:

  • I have followed the
    CONTRIBUTING doc and the
    style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests and linter rules pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

renovate bot and others added 30 commits April 2, 2025 00:28
…7082)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…7087)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…#7101)

Bumps the actions-deps group with 1 update: [webpack](https://github.com/webpack/webpack).


Updates `webpack` from 5.99.1 to 5.99.2
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.99.1...v5.99.2)

---
updated-dependencies:
- dependency-name: webpack
  dependency-version: 5.99.2
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…7109)

Bumps the actions-deps group with 1 update: [svelte](https://github.com/sveltejs/svelte/tree/HEAD/packages/svelte).


Updates `svelte` from 5.25.8 to 5.25.9
- [Release notes](https://github.com/sveltejs/svelte/releases)
- [Changelog](https://github.com/sveltejs/svelte/blob/main/packages/svelte/CHANGELOG.md)
- [Commits](https://github.com/sveltejs/svelte/commits/svelte@5.25.9/packages/svelte)

---
updated-dependencies:
- dependency-name: svelte
  dependency-version: 5.25.9
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions-deps
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…d whilst loading documents (ardatan#7093)

* Throw custom NoDocumentFoundError when cannot find document when loading for libraries to handle

* Add changeset

* Improve error handling

- Rename custom error to NoTypeDefinitionsFound to match the rest of implementation
- Let custom error take pointerList and encapsulate error message logic
- Update tests to handle sync vs async use cases
- Concat rows instead of using template literal strings to have better formatting

* Update changeset

* Put back error message with indentation
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
renovate bot and others added 21 commits August 10, 2025 17:49
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* chore(deps): update dependency @urql/core to v6

* chore(dependencies): updated changesets for modified dependencies

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…nitions' error from appearing

If you have a pointer that doesn't match any files containing graphql, `loadFile` should result in an error reporting that no graphql type definitions were identified. However, right now, if there is exactly one error produced by the loader, the meaningful error, the fact that no type definitions were identified, will be hidden. This can be very confusing if there error produced by the loader happens to be unrelated.

An easy reproduction, using `graphql-codegen`:
```
/src
  Test.vue

<script setup lang="ts">
import {Props} from 'props.ts';

defineProps<Props>();
</script>

  gqlType.ts

  import { graphql } from '@generated/graphql';

  const MY_FRAGMENT = graphql(`
    fragment MyFragment on SomeType {
      id
    }
  `);

/codegen
  /index.ts

import type { CodegenConfig } from '@graphql-codegen/cli';

const config: CodegenConfig = {
  schema: './codegen/schema.config.ts',
  documents: ['src/**/*.vue', 'src/**/*.ts'],
  generates: {
    './generated/graphql/': {
      preset: 'client',
      config: {
        useTypeImports: true,
      },
    },
  },
};

export default config;

package.json

{
  "name": "test",
  "version": "1.0.0",
  "scripts": {
    "build:graphql-codegen": "graphql-codegen -c codegen/index.ts",
   },
  "dependencies": {
    "vue": "3.5.18",
    "graphql": "16.6.0",
  },
  "devDependencies": {
    "@graphql-codegen/cli": "3.3.0",
    "@graphql-codegen/client-preset": "3.0.1",
  }
}
```

If you run `npm run build:graphql-codegen`, the reason codegen fails is because there are no graphql type definitions for any file matched by the .vue file matcher. However, the only error it will report is this:
```
[@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.
```

This error is preventing the file Test.vue from being parsed, but it's not why graphql codegen in general is failing. If you were to add another vue file with a graphql type definition in it, that file would parse correctly and graphql-codegen would succeed. If you want graphql-codegen to work on the current project setup, you can remove the .vue file matcher from `codegen/index.ts`.

This change results in the following output instead:
```
 ✖ Failed to find any GraphQL type definitions in: src/**/*.vue;
      - [@vue/compiler-sfc] No fs option provided to `compileScript` in non-Node environment. File system access is required for resolving imported types.
```

I think this is much clearer.
Copy link

changeset-bot bot commented Aug 20, 2025

⚠️ No Changeset found

Latest commit: c42fe0d

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

Copy link
Contributor

coderabbitai bot commented Aug 20, 2025

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Standardized file loading error handling to always throw a consolidated AggregateError when no results are found but errors exist, providing clearer and more consistent error messages across async and sync flows.
  • Tests

    • Updated integration tests to validate the AggregateError structure and contained errors, aligning expectations with the new standardized error reporting.

Walkthrough

loadFile and loadFileSync now always throw an AggregateError when no results are produced but errors were collected; previously a single error could be rethrown. No API signature changes.

Changes

Cohort / File(s) Summary
Loader error handling
packages/load/src/load-typedefs/load-file.ts
Removed special-case that rethrew a single error; now throws an AggregateError containing all collected errors when results.length === 0 and errors.length > 0. Message constructed from individual error messages.
Tests updated
packages/load/tests/loaders/schema/integration.spec.ts
Updated assertions to expect an AggregateError, to check e.errors.length, and to inspect e.errors[0].toString() for SyntaxError instead of asserting on the raw error string.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant Caller
  participant loadFile
  participant Readers

  Caller->>loadFile: loadFile(...)
  rect rgba(230,240,255,0.6)
    loadFile->>Readers: read/resolve sources
    Readers-->>loadFile: results[] and errors[]
  end

  alt results.length > 0
    loadFile-->>Caller: return results[]
  else results.length == 0 and errors.length > 0
    note over loadFile: behavior changed — aggregate errors
    loadFile-->>Caller: throw AggregateError(errors)
  else no results and no errors
    loadFile-->>Caller: return []
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related issues

Suggested reviewers

  • ardatan

Poem

I hop through logs with careful paws,
Gathered errors into single laws.
No lonely thorn escapes my sight,
I bundle all to make it right.
A rabbit's patchwork, tidy, tight. 🐇✨

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a8b59a3 and c42fe0d.

📒 Files selected for processing (2)
  • packages/load/src/load-typedefs/load-file.ts (0 hunks)
  • packages/load/tests/loaders/schema/integration.spec.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/load/src/load-typedefs/load-file.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Unit Test on Node 18 (windows-latest) and GraphQL v16
  • GitHub Check: Unit Test on Node 24 (ubuntu-latest) and GraphQL v16
  • GitHub Check: Unit Test on Node 18 (ubuntu-latest) and GraphQL v15
  • GitHub Check: Full Check on GraphQL v16
  • GitHub Check: Unit Test on Bun
  • GitHub Check: Unit Test on Node 22 (ubuntu-latest) and GraphQL v16
  • GitHub Check: Unit Test on Node 18 (ubuntu-latest) and GraphQL v16
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
packages/load/tests/loaders/schema/integration.spec.ts (1)

22-29: Prefer rejects-based assertion over try/catch for async error tests.

Using Jest’s rejects is more concise and avoids the manual sentinel expect(true).toBeFalsy().

Proposed refactor:

-      try {
-        await load(schemaPath, {
-          loaders: [new CodeFileLoader()],
-          cwd: __dirname,
-        });
-        expect(true).toBeFalsy(); // should throw
-      } catch (e: any) {
-        expect(e).toBeInstanceOf(AggregateError);
-        expect(Array.isArray(e.errors)).toBe(true);
-        expect(e.errors.length).toBeGreaterThan(0);
-        expect(e.errors.some((err: unknown) => String(err).includes('SyntaxError'))).toBe(true);
-        // Optional: expect(String(e.message)).toContain('Failed to find any GraphQL type definitions');
-      }
+      await expect(load(schemaPath, {
+        loaders: [new CodeFileLoader()],
+        cwd: __dirname,
+      })).rejects.toMatchObject({
+        name: 'AggregateError',
+        errors: expect.arrayContaining([
+          expect.anything(), // at least one nested error
+        ]),
+      });

If you want to keep the message check, you can add a second expectation with .rejects using a custom matcher, or fall back to try/catch just for that assertion.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 6a871f2 and a8b59a3.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (1)
  • packages/load/tests/loaders/schema/integration.spec.ts (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Unit Test on Node 18 (ubuntu-latest) and GraphQL v15
  • GitHub Check: Unit Test on Node 18 (windows-latest) and GraphQL v16
  • GitHub Check: Unit Test on Node 22 (ubuntu-latest) and GraphQL v16
  • GitHub Check: Unit Test on Node 18 (ubuntu-latest) and GraphQL v16
  • GitHub Check: Type Check on GraphQL v15
  • GitHub Check: Full Check on GraphQL v16
  • GitHub Check: Unit Test on Bun

Comment on lines 29 to 31
expect(e).toBeInstanceOf(AggregateError);
expect(e.errors.length).toEqual(0);
expect(e.errors[0].toString()).toContain(`SyntaxError`);
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Fix contradictory assertions on AggregateError.errors (test currently cannot pass).

You assert errors.length === 0 and then immediately access errors[0]. If length is zero, errors[0] is undefined and .toString() will throw, making the test fail regardless of implementation. Since the new behavior aggregates loader errors, errors.length should be ≥ 1. Also make the SyntaxError check robust in case there are multiple nested errors.

Apply this diff:

-        expect(e).toBeInstanceOf(AggregateError);
-        expect(e.errors.length).toEqual(0);
-        expect(e.errors[0].toString()).toContain(`SyntaxError`);
+        expect(e).toBeInstanceOf(AggregateError);
+        expect(Array.isArray(e.errors)).toBe(true);
+        expect(e.errors.length).toBeGreaterThan(0);
+        // At least one nested error should be a SyntaxError (from the code loader parsing failure)
+        expect(e.errors.some((err: unknown) => String(err).includes('SyntaxError'))).toBe(true);
+        // Optional: lock in the top-level summary message emitted when no type defs are found
+        // expect(String(e.message)).toContain('Failed to find any GraphQL type definitions');
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
expect(e).toBeInstanceOf(AggregateError);
expect(e.errors.length).toEqual(0);
expect(e.errors[0].toString()).toContain(`SyntaxError`);
expect(e).toBeInstanceOf(AggregateError);
expect(Array.isArray(e.errors)).toBe(true);
expect(e.errors.length).toBeGreaterThan(0);
// At least one nested error should be a SyntaxError (from the code loader parsing failure)
expect(e.errors.some((err: unknown) => String(err).includes('SyntaxError'))).toBe(true);
// Optional: lock in the top-level summary message emitted when no type defs are found
// expect(String(e.message)).toContain('Failed to find any GraphQL type definitions');
🤖 Prompt for AI Agents
In packages/load/tests/loaders/schema/integration.spec.ts around lines 29 to 31,
the test has contradictory assertions (it expects e.errors.length === 0 then
accesses e.errors[0]) which will always fail; change the assertions to require e
to be an AggregateError and that e.errors.length is >= 1, then verify at least
one nested error string contains "SyntaxError" (e.g., use a .some(...) or
equivalent over e.errors to check toString/includes), making the SyntaxError
check resilient to multiple nested errors.

@ardatan
Copy link
Owner

ardatan commented Aug 21, 2025

Not sure I understand the motivation behind this change. If it is an issue on codegen, then it needs to be fixed there not here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants