-
Notifications
You must be signed in to change notification settings - Fork 734
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 --test-scheduled
with custom builds & --x-dev-env
#7164
Conversation
🦋 Changeset detectedLatest commit: 3306824 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 |
@@ -424,10 +422,7 @@ export async function bundleWorker( | |||
...define, | |||
}, | |||
}), | |||
loader: { | |||
...COMMON_ESBUILD_OPTIONS.loader, | |||
...(loader || {}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The loader option wasn't used anywhere, so I removed it
@@ -321,6 +322,17 @@ See https://developers.cloudflare.com/workers/platform/compatibility-dates for m | |||
props.compatibilityDate ?? config.compatibility_date, | |||
props.compatibilityFlags ?? config.compatibility_flags | |||
), | |||
plugins: [logBuildOutput(nodejsCompatMode)], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a separate fix to unify versions & deploy messaging
@@ -133,6 +133,20 @@ export class BundlerController extends Controller<BundlerControllerEventMap> { | |||
config.compatibilityDate, | |||
config.compatibilityFlags | |||
), | |||
testScheduled: config.dev.testScheduled, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the actual fix for the reported issue
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-wrangler-7164 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7164/npm-package-wrangler-7164 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-wrangler-7164 dev path/to/script.js Additional artifacts:npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-create-cloudflare-7164 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-cloudflare-kv-asset-handler-7164 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-miniflare-7164 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-cloudflare-pages-shared-7164 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-cloudflare-vitest-pool-workers-7164 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-cloudflare-workers-editor-shared-7164 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-cloudflare-workers-shared-7164 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/11681256447/npm-package-cloudflare-workflows-shared-7164 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
👋 Just confirming that following my repro steps in the issue, /__scheduled works as expected with this preview version, and the warning is also no longer showing! |
33b42f6
to
3306824
Compare
@@ -110,6 +110,7 @@ describe("defineNavigatorUserAgent is respected", () => { | |||
exports: [], | |||
}, | |||
path.resolve("dist"), | |||
// @ts-expect-error Ignore the requirement for passing undefined values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Just wanted to avoid @ts-expect-error
. This might also make the test clearer which options the tests really cares.
{
// Extracted from the original options
...defaultBundleOptions,
defineNavigatorUserAgent: false,
}
Fixes #7152
Correctly pass the
--test-scheduled
flag inBundleController
when using a custom build. Previously the types forbundleWorker()
allowed arguments not to be passed—this PR changes that to require an explicitundefined
to be passed, which should prevent this type of regression happening again.