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

chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.8.0 #4

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Apr 26, 2024

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@cloudflare/vitest-pool-workers (source) ^0.1.0 -> ^0.8.0 age adoption passing confidence

Release Notes

cloudflare/workers-sdk (@​cloudflare/vitest-pool-workers)

v0.8.0

Compare Source

Minor Changes
  • #​7334 869ec7b Thanks @​threepointone! - chore: update esbuild

    This patch updates esbuild from 0.17.19 to 0.24.2. That's a big bump! Lots has gone into esbuild since May '23. All the details are available at https://github.com/evanw/esbuild/blob/main/CHANGELOG.md / https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md.

    • We now support all modern JavasScript/TypeScript features suported by esbuild (as of December 2024). New additions include standard decorators, auto-accessors, and the using syntax.

    • 0.18 introduced wider support for configuration specified via tsconfig.json https://github.com/evanw/esbuild/issues/3019. After observing the (lack of) any actual broken code over the last year for this release, we feel comfortable releasing this without considering it a breaking change.

    • 0.19.3 introduced support for import attributes

      import stuff from './stuff.json' with { type: 'json' }

      While we don't currently expose the esbuild configuration for developers to add their own plugins to customise how modules with import attributes are bundled, we may introduce new "types" ourselves in the future.

    • 0.19.0 introduced support for wildcard imports. Specifics here (https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md#0190). tl;dr -

      • These 2 patterns will bundle all files that match the glob pattern into a single file.

        const json1 = await import("./data/" + kind + ".json");
        const json2 = await import(`./data/${kind}.json`);
      • This pattern will NOT bundle any matching patterns:

        const path = "./data/" + kind + ".js";
        const json2 = await import(path);

        You can use find_additional_modules to bundle any additional modules that are not referenced in the code but are required by the project.

      Now, this MAY be a breaking change for some. Specifically, if you were previously using the pattern (that will now include all files matching the glob pattern in the bundle), BUT find_additional_modules was NOT configured to include some files, those files would now be included in the bundle. For example, consider this code:

      // src/index.js
      export default {
      	async fetch() {
      		const url = new URL(request.url);
      		const name = url.pathname;
      		const value = (await import("." + name)).default;
      		return new Response(value);
      	},
      };

      Imagine if in that folder, you had these 3 files:

      // src/one.js
      export default "one";
      // src/two.js
      export default "two";
      // src/hidden/secret.js
      export default "do not share this secret";

      And your wrangler.toml was:

      name = "my-worker"
      main = "src/index.js

      Before this update:

      1. A request to anything but http://localhost:8787/ would error. For example, a request to http://localhost:8787/one.js would error with No such module "one.js".
      2. Let's configure wrangler.toml to include all .js files in the src folder:
      name = "my-worker"
      main = "src/index.js
      
      find_additional_modules = true
      rules = [
        { type = "ESModule", globs = ["*.js"]}
      ]

      Now, a request to http://localhost:8787/one.js would return the contents of src/one.js, but a request to http://localhost:8787/hidden/secret.js would error with No such module "hidden/secret.js". To include this file, you could expand the rules array to be:

      rules = [
        { type = "ESModule", globs = ["**/*.js"]}
      ]

      Then, a request to http://localhost:8787/hidden/secret.js will return the contents of src/hidden/secret.js.

      After this update:

      • Let's put the wrangler.toml back to its original configuration:
      name = "my-worker"
      main = "src/index.js
      • Now, a request to http://localhost:8787/one.js will return the contents of src/one.js, but a request to http://localhost:8787/hidden/secret.js will ALSO return the contents of src/hidden/secret.js. THIS MAY NOT BE WHAT YOU WANT. You can "fix" this in 2 ways:

        1. Remove the inline wildcard import:
        // src/index.js
        export default {
        	async fetch() {
        		const name = new URL(request.url).pathname;
        		const moduleName = "./" + name;
        		const value = (await import(moduleName)).default;
        		return new Response(value);
        	},
        };

        Now, no extra modules are included in the bundle, and a request to http://localhost:8787/hidden/secret.js will throw an error. You can use the find_additional_modules feature to include it again.

        1. Don't use the wildcard import pattern:
        // src/index.js
        import one from "./one.js";
        import two from "./two.js";
        
        export default {
        	async fetch() {
        		const name = new URL(request.url).pathname;
        		switch (name) {
        			case "/one.js":
        				return new Response(one);
        			case "/two.js":
        				return new Response(two);
        			default:
        				return new Response("Not found", { status: 404 });
        		}
        	},
        };

        Further, there may be some files that aren't modules (js/ts/wasm/text/binary/etc) that are in the folder being included (For example, a photo.jpg file). This pattern will now attempt to include them in the bundle, and throw an error. It will look like this:

        [ERROR] No loader is configured for ".png" files: src/photo.jpg

        To fix this, simply move the offending file to a different folder.

        In general, we DO NOT recommend using the wildcard import pattern. If done wrong, it can leak files into your bundle that you don't want, or make your worker slightly slower to start. If you must use it (either with a wildcard import pattern or with find_additional_modules) you must be diligent to check that your worker is working as expected and that you are not leaking files into your bundle that you don't want. You can configure eslint to disallow dynamic imports like this:

        // eslint.config.js
        export default [
        	{
        		rules: {
        			"no-restricted-syntax": [
        				"error",
        				{
        					selector: "ImportExpression[argument.type!='Literal']",
        					message:
        						"Dynamic imports with non-literal arguments are not allowed.",
        				},
        			],
        		},
        	},
        ];
Patch Changes

v0.7.8

Compare Source

Patch Changes

v0.7.7

Compare Source

Patch Changes

v0.7.6

Compare Source

Patch Changes
  • #​8338 2d40989 Thanks @​GregBrimble! - feat: Upload _headers and _redirects if present with Workers Assets as part of wrangler deploy and wrangler versions upload.

  • #​8288 cf14e17 Thanks @​CarmenPopoviciu! - feat: Add assets Proxy Worker skeleton in miniflare

    This commit implements a very basic Proxy Worker skeleton, and wires it in the "pipeline" miniflare creates for assets. This Worker will be incrementally worked on, but for now, the current implementation will forward all incoming requests to the Router Worker, thus leaving the current assets behaviour in local dev, the same.

    This is an experimental feature available under the --x-assets-rpc flag: wrangler dev --x-assets-rpc.

  • Updated dependencies [2d40989, da568e5, cf14e17, af9a57a, fbba583, bca1fb5, 79c7810]:

v0.7.5

Compare Source

Patch Changes

v0.7.4

Compare Source

Patch Changes

v0.7.3

Compare Source

Patch Changes

v0.7.2

Compare Source

Patch Changes

v0.7.1

Compare Source

Patch Changes

v0.7.0

Compare Source

Minor Changes
  • #​7923 aaa9cca Thanks @​penalosa! - Support Vitest v3. While this drops testing for Vitest v2, we expect Vitest v2 will continue to work as well.
Patch Changes

v0.6.16

Compare Source

Patch Changes

v0.6.15

Compare Source

Patch Changes

v0.6.14

Compare Source

Patch Changes

v0.6.13

Compare Source

Patch Changes

v0.6.12

Compare Source

Patch Changes

v0.6.11

Compare Source

Patch Changes

v0.6.10

Compare Source

Patch Changes

v0.6.9

Compare Source

Patch Changes

v0.6.8

Compare Source

Patch Changes

v0.6.7

Compare Source

Patch Changes

v0.6.6

Compare Source

Patch Changes

v0.6.5

Compare Source

Patch Changes

v0.6.4

Compare Source

Patch Changes

v0.6.3

Compare Source

Patch Changes

v0.6.2

Compare Source

Patch Changes

v0.6.1

Compare Source

Patch Changes

v0.6.0

Compare Source

Minor Changes
Patch Changes

v0.5.41

Compare Source

Patch Changes

v0.5.40

Compare Source

Patch Changes

v0.5.39

Compare Source

Patch Changes

v0.5.38

Compare Source

Patch Changes

v0.5.37

Compare Source

Patch Changes

v0.5.36

Compare Source

Patch Changes

v0.5.35

Compare Source

Patch Changes

v0.5.34

Compare Source

Patch Changes

v0.5.33

Compare Source

Patch Changes

v0.5.32

Compare Source

Patch Changes

v0.5.31

Compare Source

Patch Changes

v0.5.30

Compare Source

Patch Changes

v0.5.29

Compare Source

Patch Changes

v0.5.28

Compare Source

Patch Changes

v0.5.27

Compare Source

Patch Changes

v0.5.26

Compare Source

Patch Changes

v0.5.25

Compare Source

Patch Changes

v0.5.24

Compare Source

Patch Changes

v0.5.23

Compare Source

Patch Changes

v0.5.22

Compare Source

Patch Changes
  • Updated dependencies [760e43f, [cef32c8](h

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/cloudflare-vitest-pool-workers-0.x branch from 503b1b9 to 633e285 Compare May 28, 2024 17:21
@renovate renovate bot changed the title chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.2.0 chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.3.0 May 28, 2024
@renovate renovate bot force-pushed the renovate/cloudflare-vitest-pool-workers-0.x branch from 633e285 to 01ba1d7 Compare May 31, 2024 16:42
@renovate renovate bot changed the title chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.3.0 chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.4.0 May 31, 2024
@renovate renovate bot force-pushed the renovate/cloudflare-vitest-pool-workers-0.x branch from 01ba1d7 to 6e74e61 Compare September 14, 2024 14:21
@renovate renovate bot changed the title chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.4.0 chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.5.0 Sep 14, 2024
Copy link
Contributor Author

renovate bot commented Sep 14, 2024

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm warn Unknown env config "store". This will stop working in the next major version of npm.
npm error code ERESOLVE
npm error ERESOLVE unable to resolve dependency tree
npm error
npm error While resolving: [email protected]
npm error Found: [email protected]
npm error node_modules/vitest
npm error   dev vitest@"1.3.0" from the root project
npm error   peer vitest@"1.3.0" from @vitest/[email protected]
npm error   node_modules/@vitest/browser
npm error     peerOptional @vitest/browser@"1.3.0" from [email protected]
npm error   1 more (@vitest/ui)
npm error
npm error Could not resolve dependency:
npm error peer vitest@"2.0.x - 3.0.x" from @cloudflare/[email protected]
npm error node_modules/@cloudflare/vitest-pool-workers
npm error   dev @cloudflare/vitest-pool-workers@"^0.8.0" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry
npm error this command with --force or --legacy-peer-deps
npm error to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2025-03-14T16_20_30_769Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2025-03-14T16_20_30_769Z-debug-0.log

@renovate renovate bot force-pushed the renovate/cloudflare-vitest-pool-workers-0.x branch from 6e74e61 to 2084d31 Compare January 11, 2025 03:20
@renovate renovate bot changed the title chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.5.0 chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.6.0 Jan 11, 2025
@renovate renovate bot force-pushed the renovate/cloudflare-vitest-pool-workers-0.x branch from 2084d31 to 02ca2da Compare February 19, 2025 23:48
@renovate renovate bot changed the title chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.6.0 chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.7.0 Feb 19, 2025
@renovate renovate bot force-pushed the renovate/cloudflare-vitest-pool-workers-0.x branch from 02ca2da to 10b2d1f Compare March 14, 2025 16:20
@renovate renovate bot changed the title chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.7.0 chore(deps): update dependency @cloudflare/vitest-pool-workers to ^0.8.0 Mar 14, 2025
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.

0 participants