Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ Code v1.145.3
### Changed

- Update to Code 1.145.3
- The NPM package no longer ships with shrinkwraps, since shrinkwrap support is
removed in npm v12. Although this makes it easier for end users to get updated
dependencies, it also means users can get dependencies different from known
good versions tested at release.

## [4.145.2](https://github.com/coder/code-server/releases/tag/v4.145.2) - 2026-11-07

Expand Down
48 changes: 7 additions & 41 deletions ci/build/build-release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ if [[ ${RUNNER_DEBUG-} = 1 ]]; then
fi

# Once both code-server and VS Code have been built, use this script to copy
# them into a single directory (./release), prepare the package.json and
# product.json, and add shrinkwraps. This results in a generic NPM package that
# we can publish to NPM.
# them into a single directory (./release) and prepare the package.json and
# product.json. This results in a generic NPM package that we can publish to
# NPM.

# MINIFY controls whether minified VS Code is bundled. It must match the value
# used when VS Code was built.
Expand All @@ -28,8 +28,6 @@ main() {
VSCODE_SRC_PATH="lib/vscode"
VSCODE_OUT_PATH="$RELEASE_PATH/lib/vscode"

create_shrinkwraps

mkdir -p "$RELEASE_PATH"

bundle_code_server
Expand Down Expand Up @@ -85,7 +83,7 @@ bundle_code_server() {
}
EOF
) > "$RELEASE_PATH/package.json"
mv npm-shrinkwrap.json "$RELEASE_PATH"
cp package-lock.json "$RELEASE_PATH"

if [ "$KEEP_MODULES" = 1 ]; then
local rsync_opts=(-a)
Expand Down Expand Up @@ -148,44 +146,12 @@ bundle_vscode() {
"$VSCODE_SRC_PATH/remote/package.json" \
"$VSCODE_OUT_PATH/package.json" > "$VSCODE_OUT_PATH/package.json.merged"
mv "$VSCODE_OUT_PATH/package.json.merged" "$VSCODE_OUT_PATH/package.json"
cp "$VSCODE_SRC_PATH/remote/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/npm-shrinkwrap.json"
cp "$VSCODE_SRC_PATH/remote/package-lock.json" "$VSCODE_OUT_PATH/package-lock.json"

# Include global extension dependencies as well.
rsync "$VSCODE_SRC_PATH/extensions/package.json" "$VSCODE_OUT_PATH/extensions/package.json"
cp "$VSCODE_SRC_PATH/extensions/npm-shrinkwrap.json" "$VSCODE_OUT_PATH/extensions/npm-shrinkwrap.json"
jq 'del(.devDependencies)' "$VSCODE_SRC_PATH/extensions/package.json" > "$VSCODE_OUT_PATH/extensions/package.json"
rsync "$VSCODE_SRC_PATH/extensions/postinstall.mjs" "$VSCODE_OUT_PATH/extensions/postinstall.mjs"
}

create_shrinkwraps() {
# package-lock.json files (used to ensure deterministic versions of
# dependencies) are not packaged when publishing to the NPM registry.
#
# To ensure deterministic dependency versions (even when code-server is
# installed with NPM), we create an npm-shrinkwrap.json file from the
# currently installed node_modules. This ensures the versions used from
# development (that the package-lock.json guarantees) are also the ones
# installed by end-users. These will include devDependencies, but those will
# be ignored when installing globally (for code-server), and because we use
# --omit=dev (for VS Code).

# We first generate the shrinkwrap file for code-server itself - which is the
# current directory.
cp package-lock.json package-lock.json.temp
npm shrinkwrap
mv package-lock.json.temp package-lock.json

# Then the shrinkwrap files for the bundled VS Code.
pushd "$VSCODE_SRC_PATH/remote/"
cp package-lock.json package-lock.json.temp
npm shrinkwrap
mv package-lock.json.temp package-lock.json
popd

pushd "$VSCODE_SRC_PATH/extensions/"
cp package-lock.json package-lock.json.temp
npm shrinkwrap
mv package-lock.json.temp package-lock.json
popd
rsync "$VSCODE_SRC_PATH/extensions/package-lock.json" "$VSCODE_OUT_PATH/extensions/package-lock.json"
}

main "$@"
2 changes: 1 addition & 1 deletion ci/build/npm-postinstall.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ install_with_yarn_or_npm() {
fi
;;
yarn*)
if ! yarn --production --frozen-lockfile --no-default-rc; then
if ! yarn --production --no-default-rc; then
return 1
fi
;;
Expand Down