aws-amplify / amplify-backend

Home to all tools related to Amplify's code-first DX (Gen 2) for building fullstack apps on AWS
Apache License 2.0
184 stars 62 forks source link

Improve type error regex #2022

Closed sobolk closed 1 month ago

sobolk commented 1 month ago

Problem

Errors in a form of

TypeError [ERR_INVALID_MODULE_SPECIFIER]: Invalid module ..../function/foo/resource.ts is not a valid package name imported from 
/Users/foo/Desktop/amplify-app/amplify/storage/foo/resource.ts
    at new NodeError (node:internal/errors:405:5)

I.e. with extra [ERR_INVALID_MODULE_SPECIFIER] were not captured.

Changes

Adjust regex.

Validation

Test added.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

changeset-bot[bot] commented 1 month ago

🦋 Changeset detected

Latest commit: da446486a3b898c4d59c6c71bb0dc055187894fa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | ----------------------------- | ----- | | @aws-amplify/backend-deployer | Patch |

Not sure what this means? Click here to learn what changesets are.

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