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

fix: correctly handle entry-point path when publishing #258

Merged
merged 2 commits into from
Jan 19, 2022

Commits on Jan 19, 2022

  1. fix: correctly handle entry-point path when publishing

    The `publish` command was failing when the entry-point was specified in the wrangler.toml file and the entry-point imported another file.
    
    This was because we were using the `metafile.inputs` to guess the entry-point file path. But the order in which the source-files were added to this object was not well defined, and so we could end up failing to find a match.
    
    This fix avoids this by using the fact that the `metadata.outputs` object will only contain one element that has the `entrypoint` property - and then using that as the entry-point path. For runtime safety, we now assert that there cannot be zero or multiple such elements.
    
    Fixes cloudflare#252
    petebacondarwin committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    5d033ac View commit details
    Browse the repository at this point in the history
  2. chore: add test-watch script to the wrangler workspace

    Watch the files in the wrangler workspace, and run the tests when anything changes:
    
    ```sh
    > npm run test-watch -w wrangler
    ```
    
    This will also run all the tests in a single process (rather than in parallel shards) and will increase the test-timeout to 50 seconds, which is helpful when debugging.
    petebacondarwin committed Jan 19, 2022
    Configuration menu
    Copy the full SHA
    c940680 View commit details
    Browse the repository at this point in the history