-
Notifications
You must be signed in to change notification settings - Fork 760
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
Version Packages #350
Merged
Merged
Version Packages #350
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
force-pushed
the
changeset-release/main
branch
15 times, most recently
from
February 3, 2022 18:43
c69ddb7
to
a318472
Compare
threepointone
approved these changes
Feb 3, 2022
github-actions
bot
force-pushed
the
changeset-release/main
branch
5 times, most recently
from
February 4, 2022 21:45
49f0705
to
b3cbe1d
Compare
github-actions
bot
force-pushed
the
changeset-release/main
branch
from
February 4, 2022 22:07
b3cbe1d
to
0c677d9
Compare
threepointone
approved these changes
Feb 7, 2022
This was referenced Jan 9, 2024
This was referenced Jan 17, 2024
This was referenced Jan 25, 2024
This was referenced Feb 1, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
wrangler@0.0.16
Patch Changes
#364
3575892
Thanks @threepointone! - enhance: small tweaks towrangler init
package.json
tsconfig.json
typescript
as a dev dependency#380
aacd1c2
Thanks @GregBrimble! - fix: ensure pages routes are defined correctlyIn e151223 we introduced a bug where the RouteKey was now an array rather than a simple URL string. When it got stringified into the routing object these were invalid.
E.g.
[':page*', undefined]
got stringified to":page*,"
rather than":page*"
.Fixes 🐛 BUG: 404 on Remix #379
#329
27a1f3b
Thanks @petebacondarwin! - ci: run PR jobs on both Ubuntu, MacOS and WindowsWindows seems to be more brittle here.
Windows seems to be more brittle here as well.
Previously we were using
running.os
but this appeared not to be working.#347
ede5b22
Thanks @threepointone! - fix: hidewrangler pages functions
in the main help menuThis hides
wrangler pages functions
in the main help menu, since it's only intended for internal usage right now. It still "works", so nothing changes in that regard. We'll bring this back when we have a broader story in wrangler for functions.#360
f590943
Thanks @threepointone! - fix:kv:key get
The api for fetching a kv value, unlike every other cloudflare api, returns just the raw value as a string (as opposed to the
FetchResult
-style json). However, our fetch utility tries to convert every api response to json before parsing it further. This leads to bugs like kv:get errors out reading --preview key if key is not in JSON format #359. The fix is to special case forkv:key get
.Fixes kv:get errors out reading --preview key if key is not in JSON format #359.
#373
6e7baf2
Thanks @petebacondarwin! - fix: use the appropriate package manager when initializing a wrangler projectPreviously, when we initialized a project using
wrangler init
, we always used npm as the package manager.Now we check to see whether npm and yarn are actually installed, and also whether there is already a lock file in place before choosing which package manager to use.
Fixes wrangler init should support yarn #353
#363
0add2a6
Thanks @threepointone! - fix: support uppercase hotkeys inwrangler dev
Just a quick fix to accept uppercase hotkeys during
dev
.#331
e151223
Thanks @petebacondarwin! - fix: generate valid URL route paths for pages on WindowsPreviously route paths were manipulated by file-system path utilities.
On Windows this resulted in URLs that had backslashes, which are invalid for such URLs.
Fixes Bug: generated routes on windows are incorrectly escaped (404) #51
Closes Fix Pages Functions routing for windows path separator #235
Closes Fix Pages Functions path routing on Windows #330
Closes Fixed broken routing on Windows #327
#338
e0d2f35
Thanks @threepointone! - feat: environments for Worker SitesThis adds environments support for Workers Sites. Very simply, it uses a separate kv namespace that's indexed by the environment name. This PR also changes the name of the kv namespace generated to match wrangler 1's implementation.
#329
e1d2198
Thanks @petebacondarwin! - test: support testing in CI on WindowsDon't rely on bash variables to configure tests
The use of bash variables in the
npm test
script is not supported in Windows Powershell, causing CI on Windows to fail.These bash variables are used to override the API token and the Account ID.
This change moves the control of mocking these two concepts into the test code, by adding
mockAccountId()
andmockApiToken()
helpers.Sanitize command line for snapshot tests
This change applies
normalizeSlashes()
andtrimTimings()
to command line outputs and error messages to avoid inconsistencies in snapshots.The benefit here is that authors do not need to keep adding them to all their snapshot tests.
Move all the helper functions into their own directory to keep the test directory cleaner.
#380
aacd1c2
Thanks @GregBrimble! - refactor: clean up pages routing#343
cfd8ba5
Thanks @threepointone! - chore: update esbuildUpdate esbuild to 0.14.14. Also had to change
import esbuild from "esbuild";
toimport * as esbuild from "esbuild";
indev.tsx
.#371
85ceb84
Thanks @nrgnrg! - fix: pages advanced mode usagePreviously in pages projects using advanced mode (a single
_worker.js
or--script-path
file rather than a./functions
folder), callingpages dev
would quit without an error and not launch miniflare.This change fixes that and enables
pages dev
to be used with pages projects in advanced mode.#383
969c887
Thanks @threepointone! - fix: remove redundant process.cwd() calls inwrangler init
Followup from feat:
wrangler init
offers to create a starter worker #372 (comment), just removing some unnecessary calls toprocess.cwd()
/path.join()
, since they're already relative to where they're called from.#329
ac168f4
Thanks @petebacondarwin! - refactor: use helpers to manage npm commandsThis change speeds up tests and avoids us checking that npm did what it is supposed to do.
#348
b8e3b01
Thanks @threepointone! - chore: replacenode-fetch
withundici
There are several reasons to replace
node-fetch
withundici
:undici
'sfetch()
implementation is set to become node's standardfetch()
implementation, which means we can just remove the dependency in the future (or optionally load it depending on which version of node is being used)node-fetch
pollutes the global type space with a number of standard typesundici
viaminiflare
/pages, so this means our bundle size could ostensibly become smaller.This replaces
node-fetch
withundici
.import fetch from "node-fetch"
are replaced withimport {fetch} from "undici"
undici
also comes with spec compliant forms ofFormData
andFile
, so we could also removeformdata-node
inform_data.ts
node-fetch
are now imported fromundici
(as well as some mistaken ones fromnode:url
)skipLibCheck
intsconfig.json
. Some dependencies oddly depend on browser globals likeRequest
,Response
(like@miniflare/core
,jest-fetch-mock
, etc), which now fail becausenode-fetch
isn't injecting those globals anymore. So we enableskipLibCheck
to bypass them. (I'd thoughtskipLibCheck
completely ignores 'third party' types, but that's not true - it still uses the module graph to scan types. So we're still typesafe. We should enablestrict
sometime to avoidany
s, but that's for later.)undici
, but we'll fix that by separately upping the version ofundici
that miniflare bundles.#357
41cfbc3
Thanks @threepointone! - chore: add eslint-plugin-importeslint-plugin-import
to enforce ordering of imports, and configuration for the same inpackage.json
.npm run check:lint -- --fix
to apply the configured order in our whole codebase..vscode/settings.json
to prevent spurious warnings inside vscode. You'll probably have to restart your IDE for this to take effect. (re:node:
-prefixed modules not recognised asbuiltin
s import-js/eslint-plugin-import#2377 (comment))(I'd also like to enforce using
node:
prefixes for node builtin modules, but that can happen later. For now I manually added the prefixes wherever they were missing. It's not functionally any different, but imo it helps the visual grouping.)#372
05dbb0d
Thanks @threepointone! - feat:wrangler init
offers to create a starter workerWe got feedback that
wrangler init
felt incomplete, because the immediate next thing folks need is a starter source file. So this adds another step towrangler init
where we offer to create that file for you.Fixes wrangler init should populate example code #355
#384
8452485
Thanks @petebacondarwin! - refactor: use xxhash-wasm for better compatibility with WindowsThe previous xxhash package we were using required a build step, which relied upon tooling that was not always available on Window.
This version is a portable WASM package.
#334
536c7e5
Thanks @threepointone! - feat: wasm support for local mode inwrangler dev
This adds support for
*.wasm
modules into local mode forwrangler dev
.In 'edge' mode, we create a javascript bundle, but wasm modules are uploaded to the preview server directly when making the worker definition form upload. However, in 'local' mode, we need to have the actual modules available to the bundle. So we copy the files over to the bundle path. We also pass appropriate
--modules-rule
directive tominiflare
.I also added a sample wasm app to use for testing, created from a default
workers-rs
project.Fixes wasm/textfile support for
--local
mode indev
#299#329
b8a3e78
Thanks @petebacondarwin! - ci: usenpm ci
and do not cache workspace packages in node_modulesPreviously we were caching all the
node_modules
files in the CI jobs and then runningnpm install
. While this resulted in slightly improved install times on Ubuntu, it breaks on Windows because the npm workspace setup adds symlinks into node_modules, which the Github cache action cannot cope with.This change removes the
node_modules
caches (saving some time by not needing to restore them) and replacesnpm install
withnpm ci
.The
npm ci
command is actually designed to be used in CI jobs as it only installs the exact versions specified in thepackage-lock.json
file, guaranteeing that for any commit we always have exactly the same CI job run, deterministically.It turns out that, on Ubuntu, using
npm ci
makes very little difference to the installation time (~30 secs), especially if there is nonode_modules
there in the first place.Unfortunately, MacOS is slower (~1 min), and Windows even worse (~2 mins)! But it is worth this longer CI run to be sure we have things working on all OSes.