Skip to content
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

Update Yarn and Better Document Dependencies #689

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions .github/workflows/package_vscode_plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
- run: corepack enable
- name: Build harper-ls
uses: houseabsolute/actions-rust-cross@v0
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version-file: ".node-version"
- run: corepack enable
- name: Install `pandoc`
run: sudo apt-get update && sudo apt-get install pandoc -y
- name: Install `wasm-pack`
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ RUN wasm-pack build --release --target web

FROM node:${NODE_VERSION} AS node-build

RUN corepack enable
RUN apt-get update && apt-get install git pandoc -y

RUN mkdir -p /usr/build/
Expand Down
14 changes: 7 additions & 7 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ build-harperjs: build-wasm
perl -pi -e 's/new URL\(.*\)/new URL()/g' "{{justfile_directory()}}/harper-wasm/pkg/harper_wasm.js"

cd "{{justfile_directory()}}/packages/harper.js"
yarn install -f
yarn install
yarn run build

# Generate API reference
Expand All @@ -27,7 +27,7 @@ test-harperjs: build-harperjs
set -eo pipefail

cd "{{justfile_directory()}}/packages/harper.js"
yarn install -f
yarn install
yarn playwright install
yarn test

Expand All @@ -44,7 +44,7 @@ dev-web:
just build-harperjs

cd "{{justfile_directory()}}/packages/web"
yarn install -f
yarn install
yarn dev

# Build the Harper website.
Expand All @@ -53,7 +53,7 @@ build-web: build-harperjs
set -eo pipefail

cd "{{justfile_directory()}}/packages/web"
yarn install -f
yarn install
yarn run build

# Build the Harper Obsidian plugin.
Expand All @@ -63,7 +63,7 @@ build-obsidian: build-harperjs

cd "{{justfile_directory()}}/packages/obsidian-plugin"

yarn install -f
yarn install
yarn build

zip harper-obsidian-plugin.zip manifest.json main.js
Expand All @@ -85,7 +85,7 @@ test-vscode:

cd "$ext_dir"

yarn install -f
yarn install
# For environments without displays like CI servers or containers
if [[ "$(uname)" == "Linux" ]] && [[ -z "$DISPLAY" ]]; then
xvfb-run --auto-servernum yarn test
Expand Down Expand Up @@ -116,7 +116,7 @@ package-vscode target="":

cd "$ext_dir"

yarn install -f
yarn install
if [[ -n "{{target}}" ]]; then
yarn package --target {{target}}
else
Expand Down
1 change: 1 addition & 0 deletions packages/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
25 changes: 19 additions & 6 deletions packages/harper.js/examples/commonjs-simple/yarn.lock
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
# This file is generated by running "yarn install" inside your project.
# Manual changes might be lost - proceed with caution!

__metadata:
version: 8
cacheKey: 10c0

harper.js@^0.14.0:
version "0.14.0"
resolved "https://registry.yarnpkg.com/harper.js/-/harper.js-0.14.0.tgz#16d511070d4474dca501d4de1c76f7849ec0accb"
integrity sha512-WRzop2PmFK2AZiqNMHHWDFIqFmS7DeoNVhyibyu7T6wuSe24E1Tunolz8ZzMPfcaKuBB2SY+yGbyTOyj+/QD8g==
"commonjs-simple@workspace:.":
version: 0.0.0-use.local
resolution: "commonjs-simple@workspace:."
dependencies:
harper.js: "npm:^0.14.0"
languageName: unknown
linkType: soft

"harper.js@npm:^0.14.0":
version: 0.14.0
resolution: "harper.js@npm:0.14.0"
checksum: 10c0/7ee0a61fddff4c4cdf28a7338abaa5d34dc4823a070c5d49277fd6682dcba3394c55e3f47f903194fda4a422c6bd8e442f6c2c653c45dd0f48d3e3174f18dca9
languageName: node
linkType: hard
8 changes: 4 additions & 4 deletions packages/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
"harper.js"
],
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1",
"eslint": "^8.28.0",
"eslint-config-prettier": "^10.0.1",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-svelte": "^2.46.1",
"prettier": "^3.4.2",
"prettier-plugin-svelte": "^3.0.3",
"@typescript-eslint/eslint-plugin": "^8.18.1",
"@typescript-eslint/parser": "^8.18.1"
"prettier-plugin-svelte": "^3.0.3"
},
"packageManager": "yarn@1.22.22+sha512.a6b2f7906b721bba3d67d4aff083df04dad64c399707841b7acf00f6b133b7ac24255f2652fa22ae3534329dc6180534e98d17432037ff6fd140556e2bb3137e"
"packageManager": "yarn@4.6.0+sha512.5383cc12567a95f1d668fbe762dfe0075c595b4bfff433be478dbbe24e05251a8e8c3eb992a986667c1d53b6c3a9c85b8398c35a960587fbd9fa3a0915406728"
}
7 changes: 3 additions & 4 deletions packages/vscode-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -909,14 +909,13 @@
"scripts": {
"watch:esbuild": "node esbuild.cjs --watch",
"watch:tsc": "tsc --noEmit --watch",
"pretest": "yarn lint && tsc && node esbuild.cjs",
"test": "node build/tests/runTests.js",
"test": "yarn lint && tsc && node esbuild.cjs && node build/tests/runTests.js",
"vscode:prepublish": "yarn lint && tsc --noEmit && node esbuild.cjs --production",
"package": "vsce package",
"lint": "eslint src --ext ts"
},
"devDependencies": {
"@types/jasmine": "^5.1.6",
"@types/jasmine": "^5.1.4",
"@types/node": "22.x",
"@types/vscode": "^1.89.0",
"@typescript-eslint/eslint-plugin": "^7.7.1",
Expand All @@ -925,7 +924,7 @@
"@vscode/vsce": "^3.0.0",
"esbuild": "^0.25.0",
"eslint": "^8.57.0",
"jasmine": "^5.6.0",
"jasmine": "^5.3.0",
"typescript": "^5.7.3"
},
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ To use the tooling required to build and debug Harper, you'll need the following
- `zip`
- `pandoc`

To run integration tests, you may also need `libnss3` and/or `libasound3`.
These are installable in Ubuntu using `apt-get`.

```bash
sudo apt-get install libnss3
sudo apt-get install libasound2
```

We develop a set of tools, accessible via `just`, to build and debug Harper's algorithm (otherwise known as `harper-core`) and its various integrations.
The source code is in the `justfile` [at the root of the repository](https://github.com/Automattic/harper/blob/master/justfile).
To see all the tools in the toolbox, run:
Expand Down
Loading
Loading