Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
Upgraded to latest core
Browse files Browse the repository at this point in the history
  • Loading branch information
james-pre committed Apr 5, 2024
1 parent 61d6010 commit a286b99
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 16 deletions.
20 changes: 13 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ on:
push:
branches:
- main
- master
workflow_dispatch:
workflow_call:
pull_request:

jobs:
ci:
Expand Down Expand Up @@ -39,7 +39,6 @@ jobs:
- name: Linting
run: npm run lint

# Once unit tests are working
#- name: Unit tests
# run: npm run test

Expand All @@ -52,6 +51,10 @@ jobs:
permissions:
contents: write
id-token: write
pages: write
environment:
name: github-pages
url: ${{ steps.deploy.outputs.page_url }}
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -67,9 +70,12 @@ jobs:
- name: Build docs
run: npm run build:docs

- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
- name: Upload docs artifact
uses: actions/upload-pages-artifact@v3
if: github.event_name != 'pull_request'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
publish_branch: docs
path: ./docs
- name: 'Deploy docs'
id: deploy
if: github.event_name != 'pull_request'
uses: actions/deploy-pages@v4
1 change: 1 addition & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
permissions:
contents: write
id-token: write
pages: write
release:
runs-on: ubuntu-latest
needs: ci
Expand Down
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,6 @@
"typescript": "5.2.2"
},
"peerDependencies": {
"@zenfs/core": "^0.5.0"
"@zenfs/core": "^0.5.5"
}
}
8 changes: 4 additions & 4 deletions src/IsoFS.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ export class IsoFS extends Readonly(Sync(FileSystem)) {
public statSync(p: string): Stats {
const record = this._getDirectoryRecord(p);
if (!record) {
throw ApiError.ENOENT(p);
throw ApiError.With('ENOENT', p, 'statSync');
}
return this._getStats(p, record)!;
}
Expand All @@ -106,7 +106,7 @@ export class IsoFS extends Readonly(Sync(FileSystem)) {

const record = this._getDirectoryRecord(path);
if (!record) {
throw ApiError.ENOENT(path);
throw ApiError.With('ENOENT', path, 'openFileSync');
}

if (record.isSymlink(this._data)) {
Expand All @@ -122,14 +122,14 @@ export class IsoFS extends Readonly(Sync(FileSystem)) {
// Check if it exists.
const record = this._getDirectoryRecord(path);
if (!record) {
throw ApiError.ENOENT(path);
throw ApiError.With('ENOENT', path, 'readdirSync');
}

if (record.isDirectory(this._data)) {
return record.getDirectory(this._data).fileList.slice(0);
}

throw ApiError.ENOTDIR(path);
throw ApiError.With('ENOTDIR', path, 'readdirSync');
}

private _getDirectoryRecord(path: string): DirectoryRecord | null {
Expand Down

0 comments on commit a286b99

Please sign in to comment.