Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
23 changes: 22 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
6 changes: 3 additions & 3 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class MajornutcrackerReactNativeSelectableTextModule : Module() {
Name("MajornutcrackerReactNativeSelectableText")

Constant("version") {
"1.2.0"
"1.2.1"
}
}
}
47 changes: 41 additions & 6 deletions docs/VERSION-UPDATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion ios/MajornutcrackerReactNativeSelectableTextModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ public class MajornutcrackerReactNativeSelectableTextModule: Module {
Name("MajornutcrackerReactNativeSelectableText")

Constant("version") {
"1.2.0"
"1.2.1"
}
}
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down Expand Up @@ -64,7 +64,7 @@
"bugs": {
"url": "https://github.com/majornutcracker-dev/react-native-selectable-text/issues"
},
"author": "Majornutcracker <joshiparsa@gmail.com> (JoshuaPariona)",
"author": "Majornutcracker <joshiparsa@gmail.com> (https://github.com/majornutcracker-dev)",
"license": "MIT",
"homepage": "https://developer.majornutcracker.com/docs/react-native-selectable-text",
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion snack/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -697,4 +697,4 @@ export const BridgingNames = {
*/
export const HISTORY_LIMIT = 50;

export const VERSION = "1.2.0";
export const VERSION = "1.2.1";
Loading