From 1005770bb07a45658c7d42a06dba045a62514bb8 Mon Sep 17 00:00:00 2001 From: JoshuaPariona Date: Thu, 24 Sep 2026 23:16:52 -0500 Subject: [PATCH 1/4] fix: point the author field at a real profile url --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b892439..87bcc86 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "bugs": { "url": "https://github.com/majornutcracker-dev/react-native-selectable-text/issues" }, - "author": "Majornutcracker (JoshuaPariona)", + "author": "Majornutcracker (https://github.com/majornutcracker-dev)", "license": "MIT", "homepage": "https://developer.majornutcracker.com/docs/react-native-selectable-text", "devDependencies": { From 4ce59462968f0c300f149c51f533ec573c9e587b Mon Sep 17 00:00:00 2001 From: JoshuaPariona Date: Thu, 24 Sep 2026 23:22:13 -0500 Subject: [PATCH 2/4] docs: show every package manager in the install section --- README.md | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b60e27..313c599 100644 --- a/README.md +++ b/README.md @@ -58,13 +58,34 @@ highlight. ## Installation +In an Expo project, let the CLI pick the version that matches your SDK: + +```sh +npx expo install @majornutcracker/react-native-selectable-text react-native-webview ``` + +Or install it directly, with whichever package manager the project uses: + +```sh npm install @majornutcracker/react-native-selectable-text ``` +```sh +yarn add @majornutcracker/react-native-selectable-text +``` + +```sh +pnpm add @majornutcracker/react-native-selectable-text +``` + +```sh +bun add @majornutcracker/react-native-selectable-text +``` + This is an Expo module. In bare React Native projects, [install and configure `expo`](https://docs.expo.dev/bare/installing-expo-modules/) -first, then run `npx pod-install`. +first, then run `npx pod-install`. Expo Go needs nothing else: the native module +is optional and `react-native-webview` already ships inside it. **Peer dependencies:** `expo`, `react`, `react-native`, and `react-native-webview` `^13.16.1` (`>=13.16.1 <14`; v14 ships incompatible types). From eedd13c3b6a3921004eac29eaf02354f59f68952 Mon Sep 17 00:00:00 2001 From: JoshuaPariona Date: Fri, 9 Oct 2026 22:30:26 -0500 Subject: [PATCH 3/4] docs: update the release flow for the protected main --- docs/VERSION-UPDATE.md | 47 ++++++++++++++++++++++++++++++++++++------ 1 file changed, 41 insertions(+), 6 deletions(-) diff --git a/docs/VERSION-UPDATE.md b/docs/VERSION-UPDATE.md index 17a7937..7579132 100644 --- a/docs/VERSION-UPDATE.md +++ b/docs/VERSION-UPDATE.md @@ -10,7 +10,10 @@ the same way without being the package version. Given `MAJOR.MINOR.PATCH`: -- **PATCH** (`1.0.0 → 1.0.1`) — bug fixes only; no public API change. +- **PATCH** (`1.0.0 → 1.0.1`) — bug fixes only; no public API change. This includes + changes to what the package _says about itself_ — `author`, `description`, + `keywords`, the README — which only reach npm and React Native Directory inside a + published version. A metadata-only patch is how they get fixed. - **MINOR** (`1.0.0 → 1.1.0`) — new backward-compatible API (a new prop, ref method, callback, highlighter option, or bridge event that doesn't break existing usage). - **MAJOR** (`1.0.0 → 2.0.0`) — breaking change to the public API or the RN ↔ WebView bridge @@ -89,10 +92,14 @@ grep -RIn "1\.1\.0" \ src/types.ts \ android/build.gradle \ android/src/main/java/com/majornutcracker/reactnativeselectablewebview/MajornutcrackerReactNativeSelectableTextModule.kt \ - ios/MajornutcrackerReactNativeSelectableTextModule.swift + ios/MajornutcrackerReactNativeSelectableTextModule.swift \ + snack/package.json \ + .github/ISSUE_TEMPLATE/bug_report.yml ``` Every listed file should appear (and `versionCode` should be one higher than before). +The last two are the [cosmetic references](#cosmetic-references-nice-to-keep-current-never-release-blocking): +the release does not check them, so this is the only place a stale one gets caught. ## Other version strings in this repo @@ -133,11 +140,17 @@ grep -rIn "rangy@" --exclude-dir=node_modules --exclude-dir=build . Publishing is automated: the [`Release`](../.github/workflows/release.yml) workflow triggers on any pushed tag matching `v*.*.*`. Do **not** run `npm publish` by hand. -1. Bump every file in [Files to update](#files-to-update-must-all-match) and update - `CHANGELOG.md`. The cosmetic references can ride along. +`main` is protected by a ruleset: nothing is pushed to it directly, a pull request is +required, and the `Lint · test · typecheck` check has to pass. So the bump travels in a PR. + +1. On a branch, bump every file in [Files to update](#files-to-update-must-all-match) and + update `CHANGELOG.md`. The cosmetic references can ride along. 2. Commit — `bump:` or `chore:` per the commit conventions, e.g. `bump: v1.1.0`. -3. Push the commit to `main` and let CI pass. -4. Tag and push the tag: +3. Open a pull request, let CI pass and merge it. Then update your local `main`: + ```sh + git checkout main && git pull --ff-only + ``` +4. Tag **that merge commit** and push the tag — this is the step that publishes: ```sh git tag v1.1.0 git push origin v1.1.0 @@ -146,14 +159,36 @@ any pushed tag matching `v*.*.*`. Do **not** run `npm publish` by hand. for version drift (the table above), runs lint/test/typecheck, publishes to npm with provenance (the `prepublishOnly` script builds first), and opens a GitHub Release with generated notes. +6. After it finishes, see [After publishing](#after-publishing). If the tag and `package.json` disagree, or any native file still holds the old version, the workflow fails **before** publishing. To recover, delete the tag (`git push --delete origin v1.1.0`), fix the versions, and re-tag. +A second ruleset protects `v*` tags: they cannot be force-pushed or moved. Deleting one is +allowed on purpose, so the recovery above works — but **only before the workflow has +published**. Once npm has the version it is immutable; do not re-tag it. Fix forward with the +next patch. + +### After publishing + +npm takes a few minutes to show a new version, and the checks below lag behind it: + +- **npm** — `npm view @majornutcracker/react-native-selectable-text version --prefer-online` + shows the new version, and the version has provenance. +- **The Snack** — raise the pinned version in the published Snack's dependency panel, and + paste any file under `snack/` that changed. This is not automated; see + [`snack/README.md`](../snack/README.md). +- **React Native Directory** — the listing rebuilds from npm roughly every two hours. The + versions tab reads npm live; the score and the rest of the card follow at the next rebuild. + `https://reactnative.directory/api/libraries?search=selectable-text` shows what it holds. + ### Required repository secret - `NPM_TOKEN` — an npm automation token with publish rights on the `@majornutcracker` scope. + It is the only publishing credential today, and it is meant to be replaced by npm Trusted + Publishing (OIDC from GitHub Actions) when the GitHub account is renamed, because the trusted + publisher pins the owner and repository. > Tip: the native/gradle files duplicate the version by hand, which is easy to forget. A future > improvement is to read the version from `package.json` in `build.gradle` and expose the JS From 7cde3132b0d6520e03870df8e6bab8185ffac098 Mon Sep 17 00:00:00 2001 From: JoshuaPariona Date: Fri, 9 Oct 2026 22:30:27 -0500 Subject: [PATCH 4/4] bump: v1.2.1 --- .github/ISSUE_TEMPLATE/bug_report.yml | 2 +- CHANGELOG.md | 16 +++++++++++++++- android/build.gradle | 6 +++--- ...rnutcrackerReactNativeSelectableTextModule.kt | 2 +- ...tcrackerReactNativeSelectableTextModule.swift | 2 +- package.json | 2 +- snack/package.json | 2 +- src/types.ts | 2 +- 8 files changed, 24 insertions(+), 10 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yml b/.github/ISSUE_TEMPLATE/bug_report.yml index 65df1d6..ac2c0a6 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yml +++ b/.github/ISSUE_TEMPLATE/bug_report.yml @@ -37,7 +37,7 @@ body: id: package-version attributes: label: "@majornutcracker/react-native-selectable-text version" - placeholder: 1.2.0 + placeholder: 1.2.1 validations: required: true diff --git a/CHANGELOG.md b/CHANGELOG.md index 29828fd..9f63cdf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.2.1] - 2026-10-09 + +### Fixed + +- The `author` field carried a bare name where npm expects a URL, so the + registry stored `"url": "JoshuaPariona"` and React Native Directory linked the + author to a page that does not exist. It now points at the GitHub profile. + +### Changed + +- The README's installation section lists `npx expo install`, npm, yarn, pnpm + and bun, each in its own block so every command gets its own copy button. + ## [1.2.0] - 2026-09-24 > **Read this before upgrading.** The `highlights` prop is gone, so code that @@ -91,7 +104,8 @@ Initial release. - Font helpers (`googleFonts()`, `mergeFonts()`), ignored elements, and viewport zoom options. -[unreleased]: https://github.com/majornutcracker-dev/react-native-selectable-text/compare/v1.2.0...HEAD +[unreleased]: https://github.com/majornutcracker-dev/react-native-selectable-text/compare/v1.2.1...HEAD +[1.2.1]: https://github.com/majornutcracker-dev/react-native-selectable-text/compare/v1.2.0...v1.2.1 [1.2.0]: https://github.com/majornutcracker-dev/react-native-selectable-text/compare/v1.1.0...v1.2.0 [1.1.0]: https://github.com/majornutcracker-dev/react-native-selectable-text/compare/v1.0.0...v1.1.0 [1.0.0]: https://github.com/majornutcracker-dev/react-native-selectable-text/releases/tag/v1.0.0 diff --git a/android/build.gradle b/android/build.gradle index ad9a97b..aff755f 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -4,13 +4,13 @@ plugins { } group = 'com.majornutcracker.reactnativeselectablewebview' -version = '1.2.0' +version = '1.2.1' android { namespace "com.majornutcracker.reactnativeselectablewebview" defaultConfig { - versionCode 3 - versionName "1.2.0" + versionCode 4 + versionName "1.2.1" } lintOptions { abortOnError false diff --git a/android/src/main/java/com/majornutcracker/reactnativeselectablewebview/MajornutcrackerReactNativeSelectableTextModule.kt b/android/src/main/java/com/majornutcracker/reactnativeselectablewebview/MajornutcrackerReactNativeSelectableTextModule.kt index b318a60..d28cb13 100644 --- a/android/src/main/java/com/majornutcracker/reactnativeselectablewebview/MajornutcrackerReactNativeSelectableTextModule.kt +++ b/android/src/main/java/com/majornutcracker/reactnativeselectablewebview/MajornutcrackerReactNativeSelectableTextModule.kt @@ -8,7 +8,7 @@ class MajornutcrackerReactNativeSelectableTextModule : Module() { Name("MajornutcrackerReactNativeSelectableText") Constant("version") { - "1.2.0" + "1.2.1" } } } diff --git a/ios/MajornutcrackerReactNativeSelectableTextModule.swift b/ios/MajornutcrackerReactNativeSelectableTextModule.swift index a91858b..8b3047c 100644 --- a/ios/MajornutcrackerReactNativeSelectableTextModule.swift +++ b/ios/MajornutcrackerReactNativeSelectableTextModule.swift @@ -5,7 +5,7 @@ public class MajornutcrackerReactNativeSelectableTextModule: Module { Name("MajornutcrackerReactNativeSelectableText") Constant("version") { - "1.2.0" + "1.2.1" } } } diff --git a/package.json b/package.json index 87bcc86..f798233 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@majornutcracker/react-native-selectable-text", - "version": "1.2.0", + "version": "1.2.1", "description": "Text selection and persistent, animated highlights for HTML in React Native and Expo (iOS & Android). Serialize, restore and sync highlights. Built on react-native-webview and Rangy.", "main": "build/index.js", "types": "build/index.d.ts", diff --git a/snack/package.json b/snack/package.json index 3f7bebf..918cc53 100644 --- a/snack/package.json +++ b/snack/package.json @@ -1,6 +1,6 @@ { "dependencies": { - "@majornutcracker/react-native-selectable-text": "1.2.0", + "@majornutcracker/react-native-selectable-text": "1.2.1", "@expo/vector-icons": "^15.0.2", "expo-status-bar": "~55.0.6", "react-native-safe-area-context": "~5.6.2", diff --git a/src/types.ts b/src/types.ts index d0bdff8..7ad7961 100644 --- a/src/types.ts +++ b/src/types.ts @@ -697,4 +697,4 @@ export const BridgingNames = { */ export const HISTORY_LIMIT = 50; -export const VERSION = "1.2.0"; +export const VERSION = "1.2.1";