* chore: clean up logging in npm script
* fix: catch error if npm version missing
npm changed the way the `npm view` command handles missing versions.
Before it exited with a non-error. Now it errors.
Ref: https://github.com/npm/cli/pull/5035
This modifies the script logic to handle those new changes.
* Include bin scripts for all platforms
These will get symlinked as part of the postinstall. These scripts
provide everything ours does inside the integrated terminal plus more.
* Improve OS detection
Specifically for Windows although we do not yet support Windows.
Also standardize the duplicate arch functions since they had drifted
from each other bit.
* Remove duplicate asar symlink
Since standalone releases run the postinstall they will get the asar
symlink there. That means the symlink will not exist for the npm
package and we will not need to ignore it.
The symlink portion is split out so it can be re-used for other
symlinks (for example linking bin scripts).
* Add symlinks to bin scripts
* Add test for opening a file from the terminal
* Add global Playwright timeout
Otherwise it will exceed the Actions timeout and get rudely killed
without any output.
* Make sed work on macOS
* Fix Node path in bin scripts
* Disable shellcheck expansion error
* Make scripts executable
* Remove .bak files created by sed
* Include Code build script in cache hash
Otherwise if we change the script it will not rebuild Code.
* Make sure the terminal opens
The selector was timing out even though it matched more than one element
but matching on the focused one appears to work.
In addition add a loop so it can keep trying to open the terminal
if something goes wrong with the focus.
We tried to switch from `yarn` to `npm` because `yarn` ignores lockfiles
but learned that we missed a few key things.
For now, we are reverting docs and a few other changes that suggested
using `npm` instead of `yarn` until we fully remove `yarn` from the
codebase.
t Please enter the commit message for your changes. Lines starting
* fix(ci): correctly download npm artifact
* fixup! fix(ci): correctly download npm artifact
* docs: update MAINTAINING
* fixup! docs: update MAINTAINING
* fixup! Merge branch 'main' into 4949-chore-fix-npm-workflow
* chore: get ci to run
* refactor: use vVERSION branch name instead of release
* refactor: use new download artifact in docker workflow
* refactor: clean up release-github-assets script
* fixup: remove extra v
* fixup! fixup: remove extra v
* feat(npm): use DEV_PACKAGE_NAME for development
* feat(ci): use npm v7 in npm job
* fixup: add npm version
* fixup: always set package name
* wip
* fix: check for npm and npm v7
* fixup
* fixup: move after release dir created
* fixup: use jq
* fixup: use jq correctly
* feat: refactor npm workflows to use download-artifact
This refactors the npm workflows to use the download-artifact GitHub Action. We
had problems in the past with our download_artifact custom bash function. This
also fixes an issue where we weren't downloading the correct artifacts when
publishing beta and dev tags to npm.
* fixup: remove unused env var
* fixup! add download-artifcat to npm-brew"
* fixup! remove unnecessary code comment
* fixup! move NPM_ENVIRONMENT logic to script
* Update links in package.json
I will try checking the docs too
* docs: Update links in triage.md
* docs: Update links in npm.md
* docs: Update links in whatever files that have `cdr`
* Replace globally, thanks @bpmct!
* fix: coderer instead of coder
I should've used all three toggles in the Search/Replace tab in the GItHub.dev editor.
* Code Formatting
* feat: add logic to publish beta/dev npm
This adds new log to publish the npm package both while working on PRs and when
PRs are merged into main, allowing us to easily test changes in a
production-like setting.
Co-authored-by: Asher <ash@coder.com>