Skip to content

Commit

Permalink
Use npm as pkg mgr
Browse files Browse the repository at this point in the history
  • Loading branch information
richarddavison committed Nov 20, 2023
1 parent 5147d38 commit 49189eb
Show file tree
Hide file tree
Showing 9 changed files with 5,745 additions and 5,254 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: yarn
cache: npm
- name: Install linux dependencies
if: contains(matrix.platform, 'linux')
run: |
Expand Down Expand Up @@ -82,8 +82,7 @@ jobs:
shell: pwsh
- name: Install JavaScript deps
run: |
corepack enable
yarn
npm i
- name: Run Darwin tests
if: contains(matrix.platform, 'darwin')
run: |
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@v4
with:
cache: yarn
cache: npm
- name: Install linux dependencies
if: contains(matrix.platform, 'linux')
run: |
Expand All @@ -42,8 +42,7 @@ jobs:
brew install zig make
- name: Install JavaScript deps
run: |
corepack enable
yarn
npm i
- name: Run tests
run: |
make test-ci
Expand Down
1 change: 0 additions & 1 deletion .yarnrc.yml

This file was deleted.

4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ run-ssr: export AWS_REGION = eu-north-1
run-ssr: export _HANDLER = index.handler
run-ssr: js
cargo build
cd example/functions && yarn build && cd build && ../../../target/debug/llrt
cd example/functions && npm run build && cd build && ../../../target/debug/llrt

flame:
#cargo build --profile=flame
Expand Down Expand Up @@ -184,6 +184,6 @@ bench:
hyperfine -N --warm64up=100 "node fixtures/hello.js" "deno run fixtures/hello.js" "bun fixtures/hello.js" "$(BUILD_DIR)/llrt fixtures/hello.js" "qjs fixtures/hello.js"

deploy:
cd example/infrastructure && yarn deploy --require-approval never
cd example/infrastructure && npm run deploy -- --require-approval never

.PHONY: toolchain clean-js release-linux release-osx lambda stdlib test test-ci run js run-release build release clean flame deploy
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,7 @@ Clone code and cd to directory

Install Node.js packages

corepack enable
yarn
npm i

Install generate libs and setup rust targets & toolchains

Expand Down
2 changes: 1 addition & 1 deletion example/infrastructure/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import path from "path";
import { execSync } from "child_process";

const main = async () => {
execSync("yarn build", {
execSync("node build.mjs", {
cwd: "../functions",
stdio: "inherit",
});
Expand Down
Loading

0 comments on commit 49189eb

Please sign in to comment.