Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add baseDir and resolve build options to serverless-trace #779

Merged
merged 7 commits into from
Nov 11, 2020

Commits on Nov 7, 2020

  1. Add baseDir and resolve build options to serverless-trace

    This PR makes two changes to the `lambda-at-edge` builder to better
    support Yarn v2 projects when using the `serverless-trace` target.
    
    1. Adds a `baseDir` build option to specify the base directory to search
       for `node_modules`. Currently, the builder sets this to `process.cwd()`,
       but Yarn v2 often hoists dependencies across multiple workspaces so
       that they can be shared. Without this change, all dependencies from
       ancestor directories are omitted, leading to import errors at runtime.
    2. Adds a `resolve` build option which allows projects to specify their
       own custom resolvers, such as when supporting Yarn v2's PnP mode.
       This leverages the resolver hook added in vercel/nft#153, which also
       required upgrading from `@zeit/node-file-trace` to the latest version
       of `@vercel/nft`. Note that even after this change, Yarn v2's PnP mode
       is still incompatible with the builder since the builder ends up
       collapsing all of the PnP dependencies into a single `node_modules`
       directory. This causes multiple versions of a package to clobber one
       another.
    ramosbugs committed Nov 7, 2020
    Configuration menu
    Copy the full SHA
    f8ec337 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1d13f59 View commit details
    Browse the repository at this point in the history
  3. Try again to fix tests

    ramosbugs committed Nov 7, 2020
    Configuration menu
    Copy the full SHA
    87a46bd View commit details
    Browse the repository at this point in the history
  4. Update root yarn.lock

    ramosbugs committed Nov 7, 2020
    Configuration menu
    Copy the full SHA
    00149ff View commit details
    Browse the repository at this point in the history

Commits on Nov 11, 2020

  1. Configuration menu
    Copy the full SHA
    fbe27cf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    1721da4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    c2e2243 View commit details
    Browse the repository at this point in the history