Skip to content

Commit

Permalink
Address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
penalosa committed Sep 26, 2022
1 parent 101ac32 commit 594b8d1
Show file tree
Hide file tree
Showing 12 changed files with 66 additions and 67 deletions.
9 changes: 8 additions & 1 deletion npm.sh → build-npm-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@
# TODO(cleanup): Convert to bazel rules/GitHub Actions
set -euo pipefail

if [ -z "${1-}" ]; then
echo "Please specify a command"
exit 1
fi
bazel build @capnp-cpp//src/capnp:capnp_tool

export LATEST_COMPATIBILITY_DATE=$(bazel-bin/external/capnp-cpp/src/capnp/capnp_tool eval src/workerd/io/compatibility-date.capnp supportedCompatibilityDate)
Expand Down Expand Up @@ -60,5 +64,8 @@ clean)
rm -rf npm/workerd/bin
rm -rf npm/workerd/lib
;;
*) ;;
*)
echo "Invalid command"
exit 1
;;
esac
14 changes: 8 additions & 6 deletions npm/lib/node-install.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* Adapted from github.com/evanw/esbuild
MIT License
Copyright (c) 2020 Evan Wallace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
// Adapted from github.com/evanw/esbuild
// Original copyright and license:
// Copyright (c) 2020 Evan Wallace
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import {
downloadedBinPath,
pkgAndSubpathForCurrentPlatform
Expand Down
15 changes: 8 additions & 7 deletions npm/lib/node-path.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env node
/* Adapted from github.com/evanw/esbuild
MIT License
Copyright (c) 2020 Evan Wallace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/

// Adapted from github.com/evanw/esbuild
// Original copyright and license:
// Copyright (c) 2020 Evan Wallace
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import { generateBinPath } from './node-platform';
const { binPath } = generateBinPath();

Expand Down
14 changes: 8 additions & 6 deletions npm/lib/node-platform.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* Adapted from github.com/evanw/esbuild
MIT License
Copyright (c) 2020 Evan Wallace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
// Adapted from github.com/evanw/esbuild
// Original copyright and license:
// Copyright (c) 2020 Evan Wallace
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import fs from 'fs';
import os from 'os';
import path from 'path';
Expand Down
15 changes: 8 additions & 7 deletions npm/lib/node-shim.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env node
/* Adapted from github.com/evanw/esbuild
MIT License
Copyright (c) 2020 Evan Wallace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/

// Adapted from github.com/evanw/esbuild
// Original copyright and license:
// Copyright (c) 2020 Evan Wallace
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import { generateBinPath } from './node-platform';
const { binPath } = generateBinPath();

Expand Down
14 changes: 8 additions & 6 deletions npm/scripts/build-shim-package.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* Adapted from github.com/evanw/esbuild
MIT License
Copyright (c) 2020 Evan Wallace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
// Adapted from github.com/evanw/esbuild
// Original copyright and license:
// Copyright (c) 2020 Evan Wallace
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import path from 'path';
import fs from 'fs';

Expand Down
14 changes: 8 additions & 6 deletions npm/scripts/bump-version.mjs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
/* Adapted from github.com/evanw/esbuild
MIT License
Copyright (c) 2020 Evan Wallace
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.*/
// Adapted from github.com/evanw/esbuild
// Original copyright and license:
// Copyright (c) 2020 Evan Wallace
// MIT License
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import fs from 'fs';

function updateVersionPackageJSON(pathToPackageJSON) {
Expand Down
6 changes: 1 addition & 5 deletions npm/workerd-darwin-64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"repository": "https://github.com/cloudflare/workerd",
"license": "Apache-2.0",
"preferUnplugged": false,
"private": true,
"engines": {
"node": ">=16"
},
Expand All @@ -14,8 +13,5 @@
"cpu": [
"x64"
],
"publishConfig": {
"registry": "https://registry-gateway.cloudflare-ui.workers.dev"
},
"version": "1.20220920.0"
"version": "1.20220926.0"
}
5 changes: 1 addition & 4 deletions npm/workerd-darwin-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,5 @@
"cpu": [
"arm64"
],
"publishConfig": {
"registry": "https://registry-gateway.cloudflare-ui.workers.dev"
},
"version": "1.20220920.0"
"version": "1.20220926.0"
}
6 changes: 1 addition & 5 deletions npm/workerd-linux-64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
"repository": "https://github.com/cloudflare/workerd",
"license": "Apache-2.0",
"preferUnplugged": false,
"private": true,
"engines": {
"node": ">=16"
},
Expand All @@ -14,8 +13,5 @@
"cpu": [
"x64"
],
"publishConfig": {
"registry": "https://registry-gateway.cloudflare-ui.workers.dev"
},
"version": "1.20220920.0"
"version": "1.20220926.0"
}
6 changes: 1 addition & 5 deletions npm/workerd-linux-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"description": "👷 workerd for Linux ARM 64-bit, Cloudflare's JavaScript/Wasm Runtime",
"repository": "https://github.com/cloudflare/workerd",
"license": "Apache-2.0",
"private": true,
"preferUnplugged": false,
"engines": {
"node": ">=16"
Expand All @@ -14,8 +13,5 @@
"cpu": [
"arm64"
],
"publishConfig": {
"registry": "https://registry-gateway.cloudflare-ui.workers.dev"
},
"version": "1.20220920.0"
"version": "1.20220926.0"
}
15 changes: 6 additions & 9 deletions npm/workerd/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "workerd",
"version": "1.20220920.0",
"version": "1.20220926.0",
"description": "👷 workerd, Cloudflare's JavaScript/Wasm Runtime",
"repository": "https://github.com/cloudflare/workerd",
"scripts": {},
Expand All @@ -12,13 +12,10 @@
"workerd": "bin/workerd"
},
"optionalDependencies": {
"@cloudflare/workerd-darwin-arm64": "1.20220920.0",
"@cloudflare/workerd-darwin-64": "1.20220920.0",
"@cloudflare/workerd-linux-arm64": "1.20220920.0",
"@cloudflare/workerd-linux-64": "1.20220920.0"
"@cloudflare/workerd-darwin-arm64": "1.20220926.0",
"@cloudflare/workerd-darwin-64": "1.20220926.0",
"@cloudflare/workerd-linux-arm64": "1.20220926.0",
"@cloudflare/workerd-linux-64": "1.20220926.0"
},
"license": "Apache-2.0",
"publishConfig": {
"registry": "https://registry-gateway.cloudflare-ui.workers.dev"
}
"license": "Apache-2.0"
}

0 comments on commit 594b8d1

Please sign in to comment.