@zenfs/dom 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/.eslintrc.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "env": {
3
+ "browser": true,
4
+ "node": true
5
+ },
6
+ "extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
7
+ "parser": "@typescript-eslint/parser",
8
+ "parserOptions": {
9
+ "ecmaVersion": "latest"
10
+ },
11
+ "rules": {
12
+ "no-useless-escape": "warn",
13
+ "no-unused-vars": "off",
14
+ "no-mixed-spaces-and-tabs": "warn",
15
+ "no-unreachable": "warn",
16
+ "no-extra-semi": "warn",
17
+ "no-fallthrough": "off",
18
+ "no-empty": "warn",
19
+ "no-case-declarations": "off",
20
+ "prefer-const": "warn",
21
+ "prefer-rest-params": "warn",
22
+ "prefer-spread": "warn",
23
+ "@typescript-eslint/no-unused-vars": "warn",
24
+ "@typescript-eslint/no-inferrable-types": "off",
25
+ "@typescript-eslint/no-this-alias": "off",
26
+ "@typescript-eslint/ban-types": "warn",
27
+ "@typescript-eslint/triple-slash-reference": "warn",
28
+ "@typescript-eslint/no-non-null-assertion": "off",
29
+ "@typescript-eslint/no-namespace": "warn",
30
+ "@typescript-eslint/consistent-type-imports": "warn"
31
+ },
32
+ "plugins": ["@typescript-eslint"]
33
+ }
package/.gitattributes ADDED
@@ -0,0 +1 @@
1
+ * text=auto eol=lf
@@ -0,0 +1,81 @@
1
+ name: Continuous Integration
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+ workflow_call:
9
+ pull_request:
10
+
11
+ jobs:
12
+ ci:
13
+ runs-on: ${{ matrix.os }}
14
+ strategy:
15
+ matrix:
16
+ os: [ubuntu-latest, macos-latest, windows-latest]
17
+ name: ${{ matrix.os }}
18
+ permissions:
19
+ contents: read
20
+ id-token: write
21
+ defaults:
22
+ run:
23
+ shell: bash
24
+ steps:
25
+ - name: Checkout
26
+ uses: actions/checkout@v3
27
+
28
+ - name: Set up Node.js
29
+ uses: actions/setup-node@v3
30
+ with:
31
+ node-version: 18
32
+
33
+ - name: Install dependencies
34
+ run: npm install
35
+
36
+ - name: Formatting
37
+ run: npm run format:check
38
+
39
+ - name: Linting
40
+ run: npm run lint
41
+
42
+ #- name: Unit tests
43
+ # run: npm run test
44
+
45
+ - name: Build
46
+ run: npm run build
47
+ docs:
48
+ needs: ci
49
+ runs-on: ubuntu-latest
50
+ name: Docs build and deploy
51
+ permissions:
52
+ contents: write
53
+ id-token: write
54
+ pages: write
55
+ environment:
56
+ name: github-pages
57
+ url: ${{ steps.deploy.outputs.page_url }}
58
+ steps:
59
+ - name: Checkout
60
+ uses: actions/checkout@v3
61
+
62
+ - name: Set up Node.js
63
+ uses: actions/setup-node@v3
64
+ with:
65
+ node-version: 18
66
+
67
+ - name: Install dependencies
68
+ run: npm install
69
+
70
+ - name: Build docs
71
+ run: npm run build:docs
72
+
73
+ - name: Upload docs artifact
74
+ uses: actions/upload-pages-artifact@v3
75
+ if: github.event_name != 'pull_request'
76
+ with:
77
+ path: ./docs
78
+ - name: 'Deploy docs'
79
+ id: deploy
80
+ if: github.event_name != 'pull_request'
81
+ uses: actions/deploy-pages@v4
@@ -0,0 +1,35 @@
1
+ name: Release
2
+
3
+ on:
4
+ release:
5
+ types: [created]
6
+
7
+ jobs:
8
+ ci:
9
+ uses: ./.github/workflows/ci.yaml
10
+ permissions:
11
+ contents: write
12
+ id-token: write
13
+ pages: write
14
+ release:
15
+ runs-on: ubuntu-latest
16
+ needs: ci
17
+ steps:
18
+ - name: Checkout
19
+ uses: actions/checkout@v3
20
+
21
+ - name: Setup npm authenication
22
+ uses: actions/setup-node@v3
23
+ with:
24
+ registry-url: https://registry.npmjs.org/
25
+
26
+ - name: Install dependencies
27
+ run: npm install
28
+
29
+ - name: Build
30
+ run: npm run build
31
+
32
+ - name: Publish
33
+ run: npm publish --access=public
34
+ env:
35
+ NODE_AUTH_TOKEN: ${{secrets.npm_token}}
package/.prettierrc ADDED
@@ -0,0 +1,8 @@
1
+ {
2
+ "singleQuote": true,
3
+ "useTabs": true,
4
+ "trailingComma": "es5",
5
+ "tabWidth": 4,
6
+ "printWidth": 180,
7
+ "arrowParens": "avoid"
8
+ }
@@ -0,0 +1,19 @@
1
+ {
2
+ "preset": "ts-jest/presets/default-esm",
3
+ "testEnvironment": "node",
4
+ "extensionsToTreatAsEsm": [".ts"],
5
+ "testMatch": ["./**/*.test.ts"],
6
+ "moduleNameMapper": {
7
+ "^(\\.{1,2}/.*)\\.js$": "$1"
8
+ },
9
+ "transform": {
10
+ "^.+\\.ts$": [
11
+ "ts-jest",
12
+ {
13
+ "tsconfig": "test/tsconfig.json",
14
+ "useESM": true
15
+ }
16
+ ]
17
+ },
18
+ "verbose": true
19
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zenfs/dom",
3
- "version": "0.2.3",
3
+ "version": "0.2.4",
4
4
  "description": "DOM backends for ZenFS",
5
5
  "main": "dist/index.js",
6
6
  "types": "src/index.ts",
package/tsconfig.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "NodeNext",
4
+ "target": "ES2020",
5
+ "outDir": "dist",
6
+ "lib": ["ESNext", "DOM"],
7
+ "moduleResolution": "NodeNext",
8
+ "declaration": true
9
+ },
10
+ "include": ["src/**/*"],
11
+ "exclude": ["node_modules"]
12
+ }