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

cleanup unnecessary nullish coalescing operation #7658

Merged
merged 1 commit into from
Jan 2, 2025

Conversation

dario-piotrowicz
Copy link
Member

Extremely minimal cleanup, just removing an unnecessary nullish coalescing operation noticed by @vicb (comment) when I copied this code over to out open-next adapter.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because: this functionality is already tested
  • E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: this is tested in unit tests, it's not relevant in e2es
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: it's simply some minor code cleanup

@dario-piotrowicz dario-piotrowicz requested review from a team as code owners January 2, 2025 21:52
Copy link

changeset-bot bot commented Jan 2, 2025

⚠️ No Changeset found

Latest commit: 1a7e6a0

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@@ -27,7 +27,7 @@ export async function getWorkerdCompatibilityDate() {
const match = latestWorkerdVersion.match(/\d+\.(\d{4})(\d{2})(\d{2})\.\d+/);

if (match) {
const [, year, month, date] = match ?? [];
const [, year, month, date] = match;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notice the if (match) right above 👆, match has to be truthy here

Copy link
Contributor

github-actions bot commented Jan 2, 2025

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/12589273967/npm-package-wrangler-7658

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7658/npm-package-wrangler-7658

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-wrangler-7658 dev path/to/script.js
Additional artifacts:
wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-workers-bindings-extension-7658 -O ./cloudflare-workers-bindings-extension.0.0.0-vf52fc542c.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vf52fc542c.vsix
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-create-cloudflare-7658 --no-auto-update
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-kv-asset-handler-7658
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-miniflare-7658
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-pages-shared-7658
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-unenv-preset-7658
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-vitest-pool-workers-7658
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-workers-editor-shared-7658
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-workers-shared-7658
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-workflows-shared-7658

Note that these links will no longer work once the GitHub Actions artifact expires.


[email protected] includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20241218.0
workerd 1.20241218.0 1.20241218.0
workerd --version 1.20241218.0 2024-12-18

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@dario-piotrowicz dario-piotrowicz merged commit 5d90f4e into main Jan 2, 2025
34 of 35 checks passed
@dario-piotrowicz dario-piotrowicz deleted the dario/nullish-operator-cleanup branch January 2, 2025 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants