Skip to content

Commit 28cc6e6

Browse files
committed
Add sideEffects, default export condition, funding, provenance, and community docs
- Add sideEffects: false to all packages for tree shaking - Add default condition to exports maps for edge/Bun/Deno compat - Add funding field linking to GitHub Sponsors - Add provenance: true to publishConfig and --provenance to publish workflow - Add browser field and ./browser export alias to probe package - Add SECURITY.md with vulnerability reporting policy - Add CODE_OF_CONDUCT.md (Contributor Covenant 2.1)
1 parent 7beb5df commit 28cc6e6

10 files changed

Lines changed: 107 additions & 15 deletions

File tree

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
exit 1
4343
fi
4444
45-
- run: pnpm -r publish --no-git-checks --access public
45+
- run: pnpm -r publish --no-git-checks --access public --provenance
4646
env:
4747
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4848

CODE_OF_CONDUCT.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Code of Conduct
2+
3+
## Our Pledge
4+
5+
We are committed to making participation in this project a welcoming experience for everyone,
6+
regardless of background or identity.
7+
8+
## Our Standards
9+
10+
Examples of positive behavior:
11+
12+
- Using welcoming and inclusive language
13+
- Being respectful of differing viewpoints and experiences
14+
- Gracefully accepting constructive feedback
15+
- Focusing on what is best for the community
16+
17+
Examples of unacceptable behavior:
18+
19+
- Trolling, insulting or derogatory comments, and personal attacks
20+
- Publishing others' private information without explicit permission
21+
- Other conduct which could reasonably be considered inappropriate in a professional setting
22+
23+
## Enforcement
24+
25+
Project maintainers are responsible for clarifying standards of acceptable behavior and will take
26+
appropriate action in response to unacceptable behavior. Instances of unacceptable behavior may be
27+
reported via the contact information on the [GitHub profile](https://github.com/SimplyLiz).
28+
29+
## Attribution
30+
31+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org),
32+
version 2.1.

SECURITY.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | --------- |
7+
| 0.3.x | Yes |
8+
| < 0.3 | No |
9+
10+
## Reporting a Vulnerability
11+
12+
If you discover a security issue, please report it responsibly.
13+
14+
**Do not open a public GitHub issue for security vulnerabilities.**
15+
16+
Instead, please email security concerns to the maintainers via the contact information on the
17+
[GitHub profile](https://github.com/SimplyLiz). Include:
18+
19+
- A description of the vulnerability
20+
- Steps to reproduce
21+
- Potential impact
22+
- Suggested fix (if any)
23+
24+
You can expect an initial response within 72 hours. We will work with you to understand the issue
25+
and coordinate a fix before any public disclosure.
26+
27+
## Scope
28+
29+
This policy applies to all packages in the `@device-router/*` scope published to npm, as well as
30+
the source code in this repository.

packages/middleware-express/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@
2222
],
2323
"main": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
25+
"sideEffects": false,
2526
"exports": {
2627
".": {
2728
"types": "./dist/index.d.ts",
28-
"import": "./dist/index.js"
29+
"import": "./dist/index.js",
30+
"default": "./dist/index.js"
2931
}
3032
},
3133
"files": [
3234
"dist"
3335
],
36+
"funding": "https://github.com/sponsors/SimplyLiz",
3437
"publishConfig": {
35-
"access": "public"
38+
"access": "public",
39+
"provenance": true
3640
},
3741
"engines": {
3842
"node": ">=20"

packages/middleware-fastify/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@
2222
],
2323
"main": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
25+
"sideEffects": false,
2526
"exports": {
2627
".": {
2728
"types": "./dist/index.d.ts",
28-
"import": "./dist/index.js"
29+
"import": "./dist/index.js",
30+
"default": "./dist/index.js"
2931
}
3032
},
3133
"files": [
3234
"dist"
3335
],
36+
"funding": "https://github.com/sponsors/SimplyLiz",
3437
"publishConfig": {
35-
"access": "public"
38+
"access": "public",
39+
"provenance": true
3640
},
3741
"engines": {
3842
"node": ">=20"

packages/middleware-hono/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@
2222
],
2323
"main": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
25+
"sideEffects": false,
2526
"exports": {
2627
".": {
2728
"types": "./dist/index.d.ts",
28-
"import": "./dist/index.js"
29+
"import": "./dist/index.js",
30+
"default": "./dist/index.js"
2931
}
3032
},
3133
"files": [
3234
"dist"
3335
],
36+
"funding": "https://github.com/sponsors/SimplyLiz",
3437
"publishConfig": {
35-
"access": "public"
38+
"access": "public",
39+
"provenance": true
3640
},
3741
"engines": {
3842
"node": ">=20"

packages/middleware-koa/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@
2222
],
2323
"main": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
25+
"sideEffects": false,
2526
"exports": {
2627
".": {
2728
"types": "./dist/index.d.ts",
28-
"import": "./dist/index.js"
29+
"import": "./dist/index.js",
30+
"default": "./dist/index.js"
2931
}
3032
},
3133
"files": [
3234
"dist"
3335
],
36+
"funding": "https://github.com/sponsors/SimplyLiz",
3437
"publishConfig": {
35-
"access": "public"
38+
"access": "public",
39+
"provenance": true
3640
},
3741
"engines": {
3842
"node": ">=20"

packages/probe/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,24 @@
2222
],
2323
"main": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
25+
"browser": "./dist/device-router-probe.min.js",
26+
"sideEffects": false,
2527
"exports": {
2628
".": {
2729
"types": "./dist/index.d.ts",
28-
"import": "./dist/index.js"
30+
"import": "./dist/index.js",
31+
"default": "./dist/index.js"
2932
},
33+
"./browser": "./dist/device-router-probe.min.js",
3034
"./dist/device-router-probe.min.js": "./dist/device-router-probe.min.js"
3135
},
3236
"files": [
3337
"dist"
3438
],
39+
"funding": "https://github.com/sponsors/SimplyLiz",
3540
"publishConfig": {
36-
"access": "public"
41+
"access": "public",
42+
"provenance": true
3743
},
3844
"engines": {
3945
"node": ">=20"

packages/storage/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,17 +22,21 @@
2222
],
2323
"main": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
25+
"sideEffects": false,
2526
"exports": {
2627
".": {
2728
"types": "./dist/index.d.ts",
28-
"import": "./dist/index.js"
29+
"import": "./dist/index.js",
30+
"default": "./dist/index.js"
2931
}
3032
},
3133
"files": [
3234
"dist"
3335
],
36+
"funding": "https://github.com/sponsors/SimplyLiz",
3437
"publishConfig": {
35-
"access": "public"
38+
"access": "public",
39+
"provenance": true
3640
},
3741
"engines": {
3842
"node": ">=20"

packages/types/package.json

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,18 +22,22 @@
2222
],
2323
"main": "./dist/index.js",
2424
"types": "./dist/index.d.ts",
25+
"sideEffects": false,
2526
"exports": {
2627
".": {
2728
"types": "./dist/index.d.ts",
28-
"import": "./dist/index.js"
29+
"import": "./dist/index.js",
30+
"default": "./dist/index.js"
2931
}
3032
},
3133
"files": [
3234
"dist",
3335
"schemas"
3436
],
37+
"funding": "https://github.com/sponsors/SimplyLiz",
3538
"publishConfig": {
36-
"access": "public"
39+
"access": "public",
40+
"provenance": true
3741
},
3842
"engines": {
3943
"node": ">=20"

0 commit comments

Comments
 (0)