Skip to content

Commit 7ff2c2b

Browse files
authored
Publint (#325)
* Add publint to root package * Fix issues * Add missing "generated" folder to weak-node-api files * Add a changeset package script for discoverability * Add changesets * Run publint in CI * Run publint only in the non-private packages
1 parent c98947e commit 7ff2c2b

File tree

11 files changed

+128
-140
lines changed

11 files changed

+128
-140
lines changed

.changeset/old-poems-sing.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
"cmake-file-api": patch
3+
"weak-node-api": patch
4+
"@react-native-node-api/cli-utils": patch
5+
"@react-native-node-api/test-app": patch
6+
"react-native-node-api": patch
7+
---
8+
9+
Fix minor package issues.

.changeset/wild-boats-lay.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"weak-node-api": patch
3+
---
4+
5+
Add missing "generated" directory

.github/workflows/check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ jobs:
4949
DEBUG: eslint:eslint
5050
- run: npm run prettier:check
5151
- run: npm run depcheck
52+
- run: npm run publint
5253
unit-tests:
5354
strategy:
5455
fail-fast: false

apps/test-app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"name": "@react-native-node-api/test-app",
33
"private": true,
4+
"type": "commonjs",
45
"version": "0.2.0",
56
"scripts": {
67
"metro": "react-native start --no-interactive",

package-lock.json

Lines changed: 65 additions & 135 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,13 @@
2323
"dev": "tsc --build --watch",
2424
"lint": "eslint .",
2525
"depcheck": "node scripts/depcheck.ts",
26+
"publint": "node scripts/run-in-published.ts npx publint --strict",
2627
"prettier:check": "prettier --experimental-cli --check .",
2728
"prettier:write": "prettier --experimental-cli --write .",
2829
"test": "npm test --workspace react-native-node-api --workspace cmake-rn --workspace gyp-to-cmake --workspace node-addon-examples",
2930
"bootstrap": "node --run build && npm run bootstrap --workspaces --if-present",
3031
"prerelease": "node --run build && npm run prerelease --workspaces --if-present",
32+
"changeset": "changeset",
3133
"release": "changeset publish",
3234
"init-macos-test-app": "node scripts/init-macos-test-app.ts"
3335
},
@@ -67,6 +69,7 @@
6769
"eslint-config-prettier": "^10.1.8",
6870
"globals": "^16.0.0",
6971
"prettier": "^3.6.2",
72+
"publint": "^0.3.15",
7073
"react-native": "0.81.4",
7174
"read-pkg": "^9.0.1",
7275
"tsx": "^4.20.6",

packages/cli-utils/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,12 @@
33
"version": "0.1.1",
44
"description": "Useful utilities for the CLIs in the React Native Node API mono-repo",
55
"type": "module",
6-
"main": "dist/index.js",
6+
"files": [
7+
"dist"
8+
],
9+
"exports": {
10+
".": "./dist/index.js"
11+
},
712
"dependencies": {
813
"@commander-js/extra-typings": "^14.0.0",
914
"bufout": "^0.3.2",

0 commit comments

Comments
 (0)