-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
wrangler: 3.80.1 -> 4.16.0 #377334
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
wrangler: 3.80.1 -> 4.16.0 #377334
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,24 +8,33 @@ | |
| autoPatchelfHook, | ||
| cacert, | ||
| llvmPackages, | ||
| jq, | ||
| moreutils, | ||
| musl, | ||
| xorg, | ||
| gitUpdater, | ||
| versionCheckHook, | ||
| }: | ||
|
|
||
| stdenv.mkDerivation (finalAttrs: { | ||
| pname = "wrangler"; | ||
| version = "3.80.1"; | ||
| version = "4.16.0"; | ||
|
|
||
| src = fetchFromGitHub { | ||
| owner = "cloudflare"; | ||
| repo = "workers-sdk"; | ||
| rev = "wrangler@${finalAttrs.version}"; | ||
| hash = "sha256-9ClosoDIT+yP2dvNenHW2RSxLimOT3znXD+Pq+N6cQA="; | ||
| hash = "sha256-H/ds5NfOjyTZ4AcsCAP0wbalgOljOUtLSjkjEn+atVk="; | ||
| }; | ||
|
|
||
| pnpmDeps = pnpm_9.fetchDeps { | ||
| inherit (finalAttrs) pname version src; | ||
| hash = "sha256-8EItfBV2n2rnXPCTYjDZlr/tdlEn8YOdIzOsj35w5gQ="; | ||
| inherit (finalAttrs) | ||
| pname | ||
| version | ||
| src | ||
| postPatch | ||
| ; | ||
| hash = "sha256-msIXeN8t8Dm3RUkw4woZIMn7wXxw/0jVl8oFmkPJbrA="; | ||
| }; | ||
|
|
||
| passthru.updateScript = gitUpdater { rev-prefix = "wrangler@"; }; | ||
|
|
@@ -45,15 +54,22 @@ stdenv.mkDerivation (finalAttrs: { | |
| makeWrapper | ||
| nodejs | ||
| pnpm_9.configHook | ||
| jq | ||
| moreutils | ||
| ] | ||
| ++ lib.optionals (stdenv.hostPlatform.isLinux) [ | ||
| autoPatchelfHook | ||
| ]; | ||
|
|
||
| # pnpm packageManager version in workers-sdk root package.json may not match nixpkgs | ||
| postPatch = '' | ||
| jq 'del(.packageManager)' package.json | sponge package.json | ||
| ''; | ||
|
|
||
| # @cloudflare/vitest-pool-workers wanted to run a server as part of the build process | ||
| # so I simply removed it | ||
| postBuild = '' | ||
| rm -fr packages/vitest-pool-workers | ||
| mv packages/vitest-pool-workers packages/~vitest-pool-workers | ||
| NODE_ENV="production" pnpm --filter workers-shared run build | ||
| NODE_ENV="production" pnpm --filter miniflare run build | ||
| NODE_ENV="production" pnpm --filter wrangler run build | ||
|
|
@@ -65,19 +81,17 @@ stdenv.mkDerivation (finalAttrs: { | |
| # - the build process builds a version of miniflare which is used by wrangler; for this reason, the miniflare package is copied also | ||
| # - pnpm stores all content in the top-level node_modules directory, but it is linked to from a node_modules directory inside wrangler | ||
| # - as they are linked via symlinks, the relative location of them on the filesystem should be maintained | ||
| # - Update: Now we're copying everything over due to broken symlink errors | ||
| installPhase = '' | ||
| runHook preInstall | ||
| mkdir -p $out/bin $out/lib $out/lib/packages/wrangler | ||
| rm -rf node_modules/typescript node_modules/eslint node_modules/prettier node_modules/bin node_modules/.bin node_modules/**/bin node_modules/**/.bin | ||
| mv packages/~vitest-pool-workers packages/vitest-pool-workers | ||
| cp -r fixtures $out/lib | ||
| cp -r packages $out/lib | ||
| cp -r node_modules $out/lib | ||
| cp -r packages/miniflare $out/lib/packages | ||
| cp -r packages/workers-tsconfig $out/lib/packages | ||
| cp -r packages/workers-shared $out/lib/packages | ||
| cp -r packages/wrangler/node_modules $out/lib/packages/wrangler | ||
| cp -r packages/wrangler/templates $out/lib/packages/wrangler | ||
| cp -r packages/wrangler/wrangler-dist $out/lib/packages/wrangler | ||
| cp -r tools $out/lib/tools | ||
| rm -rf node_modules/typescript node_modules/eslint node_modules/prettier node_modules/bin node_modules/.bin node_modules/**/bin node_modules/**/.bin | ||
| rm -rf $out/lib/**/bin $out/lib/**/.bin | ||
| cp -r packages/wrangler/bin $out/lib/packages/wrangler | ||
| NODE_PATH_ARRAY=( "$out/lib/node_modules" "$out/lib/packages/wrangler/node_modules" ) | ||
| makeWrapper ${lib.getExe nodejs} $out/bin/wrangler \ | ||
| --inherit-argv0 \ | ||
|
|
@@ -87,6 +101,12 @@ stdenv.mkDerivation (finalAttrs: { | |
| runHook postInstall | ||
| ''; | ||
|
|
||
| nativeInstallCheckInputs = [ | ||
| versionCheckHook | ||
| ]; | ||
| versionCheckProgramArg = "-v"; | ||
| doInstallCheck = true; | ||
|
Comment on lines
+104
to
+108
This comment was marked as resolved.
Sorry, something went wrong.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for your help, I do appreciate being explicit and yes it is intentional.
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some programs like to print their full path somewhere in
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It seems like |
||
|
|
||
| meta = { | ||
| description = "Command-line interface for all things Cloudflare Workers"; | ||
| homepage = "https://github.com/cloudflare/workers-sdk#readme"; | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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: you don't need this line since it defaults to -v is what they meant
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.
Yes, but this ensures that the version is checked.
Even if it's set by default.
For me, this allows for better control;
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.
sorry i meant just line 102 the versionCheckProgramArg, but yeah sure.