create-react-native-library-template 0.1.1 → 0.1.5
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "create-react-native-library-template",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.5",
|
|
4
4
|
"description": "Scaffold a React Native UI library monorepo: Bun workspaces, Expo, Storybook (web + native), Vitest, Biome and Changesets",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -24,7 +24,6 @@ jobs:
|
|
|
24
24
|
with:
|
|
25
25
|
bun-version: latest
|
|
26
26
|
|
|
27
|
-
# `changeset publish` shells out to npm, which needs Node and registry auth.
|
|
28
27
|
- uses: actions/setup-node@v4
|
|
29
28
|
with:
|
|
30
29
|
node-version: 22
|
|
@@ -43,4 +42,4 @@ jobs:
|
|
|
43
42
|
env:
|
|
44
43
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
45
44
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
46
|
-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
45
|
+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
package/template/AGENTS.md
CHANGED
|
@@ -87,12 +87,26 @@ implementation. For a component named `Foo`:
|
|
|
87
87
|
## Releasing
|
|
88
88
|
|
|
89
89
|
CI (`.github/workflows/ci.yml`) runs lint, typecheck, tests, build, and Storybook tests on
|
|
90
|
-
every PR.
|
|
91
|
-
a "Version Packages" PR; merging it
|
|
92
|
-
|
|
93
|
-
`
|
|
94
|
-
|
|
95
|
-
`
|
|
90
|
+
every PR. Releasing is driven entirely by changesets: on pushes to `main`,
|
|
91
|
+
`.github/workflows/release.yml` opens/updates a "Version Packages" PR; merging it runs
|
|
92
|
+
`changeset version` (bumping versions and writing changelogs) and the next push runs
|
|
93
|
+
`bun run release` (`changeset publish`) to publish to npm. It needs the `NPM_TOKEN` repository
|
|
94
|
+
secret. Never edit versions in `package.json` or `CHANGELOG.md` by hand — write a changeset
|
|
95
|
+
(`bun run changeset`) instead.
|
|
96
|
+
|
|
97
|
+
What actually publishes differs by context, and the difference is entirely config-driven (same
|
|
98
|
+
workflow both places):
|
|
99
|
+
|
|
100
|
+
- **This template repo** publishes only the scaffolder (`create-react-native-library-template`).
|
|
101
|
+
`create/` is a Bun workspace member, so changesets versions it natively. The three
|
|
102
|
+
`@template/*` packages are `private` **and** listed in the changesets `ignore` array
|
|
103
|
+
(`.changeset/config.json`), so they are never versioned or published here — they are
|
|
104
|
+
placeholder code. Write changesets against `create-react-native-library-template`.
|
|
105
|
+
- **Scaffolded projects** publish their library. The scaffolder strips `create` from the
|
|
106
|
+
root `workspaces`, removes `@template/ui` from the changesets `ignore` array, and drops its
|
|
107
|
+
`private` flag — so the library releases through this very same workflow once you rename the
|
|
108
|
+
`@template/*` packages to your own npm scope (update the same `ignore` array) and set `NPM_TOKEN`.
|
|
109
|
+
|
|
96
110
|
`.github/workflows/deploy-storybook.yml` builds the web Storybook (`storybook/web`) on every
|
|
97
111
|
push to `main` and deploys it to GitHub Pages (repo Settings → Pages → Source: GitHub Actions).
|
|
98
112
|
|
package/template/bun.lock
CHANGED
|
@@ -16,6 +16,13 @@
|
|
|
16
16
|
"typescript": "^6",
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
|
+
"create": {
|
|
20
|
+
"name": "create-react-native-library-template",
|
|
21
|
+
"version": "0.1.4",
|
|
22
|
+
"bin": {
|
|
23
|
+
"create-react-native-library-template": "index.mjs",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
19
26
|
"packages/ui": {
|
|
20
27
|
"name": "@template/ui",
|
|
21
28
|
"version": "0.1.0",
|
|
@@ -1049,6 +1056,8 @@
|
|
|
1049
1056
|
|
|
1050
1057
|
"core-js-compat": ["core-js-compat@3.49.0", "", { "dependencies": { "browserslist": "^4.28.1" } }, "sha512-VQXt1jr9cBz03b331DFDCCP90b3fanciLkgiOoy8SBHy06gNf+vQ1A3WFLqG7I8TipYIKeYK9wxd0tUrvHcOZA=="],
|
|
1051
1058
|
|
|
1059
|
+
"create-react-native-library-template": ["create-react-native-library-template@workspace:create"],
|
|
1060
|
+
|
|
1052
1061
|
"cross-fetch": ["cross-fetch@3.2.0", "", { "dependencies": { "node-fetch": "^2.7.0" } }, "sha512-Q+xVJLoGOeIMXZmbUK4HYk+69cQH6LudR0Vu/pRm2YlU/hDV9CiS0gKUMaWY5f2NeUH9C1nV3bsTlCo0FsTV1Q=="],
|
|
1053
1062
|
|
|
1054
1063
|
"cross-spawn": ["cross-spawn@7.0.6", "", { "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", "which": "^2.0.1" } }, "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA=="],
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# @template/ui
|
|
2
|
-
|
|
3
|
-
## 0.1.4
|
|
4
|
-
|
|
5
|
-
### Patch Changes
|
|
6
|
-
|
|
7
|
-
- 2618470: Mark `@template/ui` as `private` so the release workflow no longer tries to publish the placeholder `@template` scope to npm (which 404s). Changesets still versions it and writes its changelog; the template only publishes the `create/` scaffolder. Scaffolded projects publish their library normally once the `@template/*` packages are renamed to your own npm scope and the `NPM_TOKEN` repository secret is set.
|
|
8
|
-
- 4424a60: Remove the `private` flag from `@template/ui` so the release workflow publishes it to npm (the flag was preventing `changeset publish` from touching it). The scaffolder no longer strips it — scaffolded projects get a publishable library by default, which publishes once the scope is renamed and `NPM_TOKEN` is set.
|
|
9
|
-
|
|
10
|
-
## 0.1.3
|
|
11
|
-
|
|
12
|
-
### Patch Changes
|
|
13
|
-
|
|
14
|
-
- a6ba45e: Mark `@template/ui` as `private` so the release workflow no longer tries to publish the placeholder `@template` scope to npm (which 404s). Changesets still versions it and writes its changelog; the template only publishes the `create/` scaffolder. Scaffolded projects that want to publish their library should rename the `@template/*` packages to their own npm scope, remove `"private": true` from `packages/ui/package.json`, and set the `NPM_TOKEN` repository secret.
|
|
15
|
-
- f8a35ba: Add live-demo and npm badges plus a hosted-Storybook/scaffolder description to the repo `README.md`, and wrap those repo-only sections in `template-exclude` markers so scaffolded projects get a clean README without the template's own demo links and package badges. No runtime changes to the published package.
|
|
16
|
-
|
|
17
|
-
## 0.1.2
|
|
18
|
-
|
|
19
|
-
### Patch Changes
|
|
20
|
-
|
|
21
|
-
- 6c594db: Add a husky `pre-commit` hook that runs lint, typecheck, and unit tests before every commit. Hooks install via a `prepare` script on `bun install`, and the setup is included in scaffolded projects (`bun create react-native-library-template`). The scaffolder's "Next steps" now runs `git init` before `bun install` so the hooks install on the first install. No runtime changes to the published package.
|
|
22
|
-
|
|
23
|
-
## 0.1.1
|
|
24
|
-
|
|
25
|
-
### Patch Changes
|
|
26
|
-
|
|
27
|
-
- f77680d: Repo housekeeping: Storybook workspaces moved from `apps/` to `storybook/` (`storybook/web`, `storybook/native`), the web Storybook demo now deploys to GitHub Pages from `main`, and the contributor guide documents the exports-map convention (per-subpath `exports` in `package.json`, no barrel files). No runtime changes to the published package.
|
|
28
|
-
- 98fd966: Remove `.tsx` extensions from relative imports in test and story files — they made `tsc --noEmit` fail with TS5097 since `allowImportingTsExtensions` is not enabled.
|