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
14 changes: 10 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Run `npm run format` from the repository root before submitting changes. `npm ru

## Complete compatibility units only

New compatibility implementations must be completed before merge or release. A useful subset, a working framework demo, or passing tests for selected methods is not enough. The release exceptions cover existing implementations in [0.1.0 Preview and its explicitly authorized 0.1.1 and 0.1.2 follow-ups](#010-preview-exception).
New compatibility implementations must be completed before merge or release. A useful subset, a working framework demo, or passing tests for selected methods is not enough. The release exceptions cover existing implementations in [0.1.0 Preview and its explicitly authorized 0.1.1, 0.1.2 and 0.1.3 follow-ups](#010-preview-exception).

For Node.js compatibility, the acceptance unit is a module, including its Workers
exports, subpaths and observable behavior. For a binding or Web API, define the
Expand Down Expand Up @@ -73,7 +73,7 @@ unfinished production behavior.

0.1.0 Preview may include existing compatibility implementations with the limitations documented in the [compatibility inventory](docs/compatibility.md). Their inclusion does not establish complete module compatibility or certify untested behavior. Keep missing exports, unsupported operations and verification boundaries visible; a passing application scenario does not make its dependencies complete.

This exception applies only to existing implementations in 0.1.0 Preview. It does not permit new incomplete compatibility units, bypass required CI or application acceptance, or automatically extend to subsequent releases. New compatibility implementations must satisfy the acceptance gate above. Except for the explicitly authorized 0.1.1 and 0.1.2 follow-ups below, existing incomplete units remain completion debt and must be completed and verified, or excluded, before a subsequent release includes them.
This exception applies only to existing implementations in 0.1.0 Preview. It does not permit new incomplete compatibility units, bypass required CI or application acceptance, or automatically extend to subsequent releases. New compatibility implementations must satisfy the acceptance gate above. Except for the explicitly authorized 0.1.1, 0.1.2 and 0.1.3 follow-ups below, existing incomplete units remain completion debt and must be completed and verified, or excluded, before a subsequent release includes them.

### 0.1.1 Preview follow-up

Expand All @@ -83,6 +83,10 @@ This exception applies only to existing implementations in 0.1.0 Preview. It doe

`cf-workers-native@0.1.2` Preview is explicitly authorized with the current limitations documented in the [compatibility inventory](docs/compatibility.md). This version-specific exception retains existing incomplete compatibility implementations; it does not certify complete Workers or Node.js compatibility, authorize new incomplete units, bypass required regression checks or CI, or extend to later releases. Keep unsupported behavior and verification boundaries visible.

### 0.1.3 Preview follow-up

`cf-workers-native@0.1.3` is authorized as a CI-published continuation of the existing Preview, retaining the limitations in the [compatibility inventory](docs/compatibility.md). Its runtime implementation is unchanged from 0.1.2. This version-specific exception does not authorize new incomplete compatibility units or bypass regression checks and CI.

## Layout and tests

Keep runtime implementations in `src/compat/<module>/index.ts`, `src/browser/<module>/index.ts`, or
Expand Down Expand Up @@ -145,16 +149,18 @@ or a namespace match to full behavioral support.

## npm releases

All 0.x versions are Preview releases, including plain versions published to `latest`. The npm dist-tag selects the installation channel; `latest` does not imply production stability. Publish release versions through the GitHub Actions Release workflow from the exact CI-passing main commit, rather than from a local npm session.

| Trigger | npm dist-tag | Version |
| ------------------------------------------------------------------------- | ------------ | ------------------------------------------ |
| Maintainer comments `/beta` on a CI-passing PR | `beta` | `<base>-beta.pr<PR>.sha<12-character SHA>` |
| PR merged into `main`, after Compatibility succeeds for that merge commit | `beta` | `<base>-beta.pr<PR>.sha<12-character SHA>` |
| Stable tag such as `v0.1.2` | `latest` | `0.1.2` |
| Release tag such as `v0.1.3` | `latest` | `0.1.3` |
| Prerelease/revision tag such as `v0.2.0-rc.1` | `next` | `0.2.0-rc.1` |

Direct pushes and PR branches do not automatically publish beta packages. A newer main commit supersedes an older beta candidate. Beta and next releases do not change `latest`.

For a tagged release, update `package.json` to the intended version in a PR, merge it and wait for Compatibility on main to validate reuse or finish the necessary full run. Then tag that commit and push the tag, for example `git tag v0.1.2` followed by `git push origin v0.1.2`. The tag must match the package version and refer to a commit on main with successful CI. Already published versions cannot be republished; create a new version when changing package contents.
For a tagged release, update `package.json` to the intended version in a PR, merge it and wait for Compatibility on main to validate reuse or finish the necessary full run. Then tag that commit and push the tag, for example `git tag v0.1.3` followed by `git push origin v0.1.3`. The tag must match the package version and refer to a commit on main with successful CI. Already published versions cannot be republished; create a new version when changing package contents.

The [release workflow](.github/workflows/release.yml) builds without npm publishing credentials, then publishes the resulting tarball in a separate job with lifecycle scripts disabled. It uses [npm Trusted Publishing](https://docs.npmjs.com/trusted-publishers/) rather than an npm token. Configure the npm package's Trusted Publisher once with GitHub owner `rdlabo-dev`, repository `cf-workers-native`, workflow filename `release.yml`, no environment name, and permission to publish directly. No `NPM_TOKEN` secret is required.

Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,10 @@ Each guide describes its tested versions and boundaries. Already have a separate

Install the shared JavaScript package in your web project:

The current published Preview is the exact beta below. Pin it explicitly: npm
`latest` currently points to an older beta, and npm version `0.1.2` is not published.
The `latest` npm tag includes 0.x Preview releases. Install this release explicitly:

```sh
npm install --save-exact cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51
npm install --save-exact cf-workers-native@0.1.3
```

The mobile entry selects the host. For example, an iOS web entry starts with:
Expand All @@ -62,7 +61,7 @@ Use `workersAndroid` from `cf-workers-native/android` or `workersCapacitor` from

This entry is one part of the setup: connect the existing Worker to a **separate mobile build**, then package its output with your chosen native host. The [embedding guide](docs/native-embedding.md) and [Capacitor guide](docs/integration.md) cover the complete path. For an existing native app, build the web assets in the web project or CI; the native project does not need Capacitor CLI commands or configuration.

**0.1.2 is a Preview.** APIs may change. Android embedding requires WebView `MULTI_PROFILE` support. The native Android SDK is available from Maven Central at version `0.1.2`. Read the [native requirements](docs/native-embedding.md#dependency-setup) before integrating. Upgrading from `workers-capacitor`? Follow the [migration steps](docs/integration.md#migrating-from-the-old-npm-package).
**All 0.x releases are Preview releases.** APIs may change. Android embedding requires WebView `MULTI_PROFILE` support. The native Android SDK is available from Maven Central at version `0.1.2`. Read the [native requirements](docs/native-embedding.md#dependency-setup) before integrating. Upgrading from `workers-capacitor`? Follow the [migration steps](docs/integration.md#migrating-from-the-old-npm-package).

## Build with your AI assistant

Expand All @@ -71,7 +70,7 @@ Open your application repository and give your assistant this prompt, replacing
```text
Read https://github.com/rdlabo-dev/cf-workers-native/blob/main/README.md
and the integration guide for our target: <iOS, Android or Capacitor>.
Bring this Workers application to that target using cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51.
Bring this Workers application to that target using cf-workers-native@0.1.3.
Preserve its pages, routes, authentication and Cloudflare deployment configuration.
For an existing native app, preserve its entry point and navigation.
Verify the actual user flows on the target platform and report remaining limits.
Expand Down
4 changes: 2 additions & 2 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Bring the app you built with Workers or Void to people who use the web and peopl
| **Android** | [Embed in an existing app](native-embedding.md#android) | Build the Android SDK artifact locally and open its dedicated screen from an Activity. Requires WebView `MULTI_PROFILE`. |
| **Capacitor** | [Build a mobile app](integration.md) | Use a Capacitor app shell and general native plugins, starting from your existing Worker. |

The [shared web build](native-embedding.md#shared-web-build) connects the iOS and Android hosts to your Worker. The Capacitor guide includes its own build steps. All three use `cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51`, with a separate mobile build that preserves the Cloudflare deployment inputs.
The [shared web build](native-embedding.md#shared-web-build) connects the iOS and Android hosts to your Worker. The Capacitor guide includes its own build steps. All three use `cf-workers-native@0.1.3`, with a separate mobile build that preserves the Cloudflare deployment inputs.

## Connect your framework

Expand Down Expand Up @@ -40,7 +40,7 @@ Start with network execution: requests go to your existing deployed Worker. Bund

Follow the [native embedding verification](native-embedding.md#verification) or [Capacitor acceptance flow](integration.md#6-verify-the-existing-application-in-capacitor). Test navigation, authentication, mutations, lifecycle and network failures in your own app. Simulator/emulator results do not replace checking the devices you intend to support.

Review [security responsibilities](integration.md#5-security-the-device-is-not-a-trusted-server) and [known limitations](compatibility.md). This release is **0.1.2 Preview**; native embedding does not supply general Capacitor plugin integration or automatic store publication.
Review [security responsibilities](integration.md#5-security-the-device-is-not-a-trusted-server) and [known limitations](compatibility.md). This release is **0.1.3 Preview**; native embedding does not supply general Capacitor plugin integration or automatic store publication.

## Examples and development

Expand Down
2 changes: 1 addition & 1 deletion docs/build-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ application's runtime import changes; Worker source and execution options are sh
| Android | `workersAndroid` from `cf-workers-native/android` | [Existing Android app](native-embedding.md#android) |
| Capacitor | `workersCapacitor` from `cf-workers-native/capacitor` | [Capacitor app](integration.md) |

Use `cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51` with matching
Use `cf-workers-native@0.1.3` with matching
native dependencies; see [dependency setup](native-embedding.md#dependency-setup).
Build the corresponding entry for each target, then package the entire output
directory. Existing Capacitor examples below use `workersCapacitor`; the same
Expand Down
8 changes: 4 additions & 4 deletions docs/compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,18 @@ profile uses workerd `1.20261012.1`, compatibility date `2026-10-17`, without
additional flags. Other dates and flags are not covered by this profile.
The WebView does not contain workerd or V8; iOS uses its own JavaScript engine.

The earlier `workers-capacitor` package releases 0.1.0 Preview and the explicitly authorized 0.1.1 Preview follow-up include existing compatibility implementations with the limits below under a [version-specific release exception](../CONTRIBUTING.md#010-preview-exception). The explicitly authorized `cf-workers-native@0.1.2` Preview retains the documented limitations under its [release exception](../CONTRIBUTING.md#012-preview-follow-up). Inclusion is not a claim of complete Workers or Node.js compatibility.
The earlier `workers-capacitor` package releases 0.1.0 Preview and the explicitly authorized 0.1.1 Preview follow-up include existing compatibility implementations with the limits below under a [version-specific release exception](../CONTRIBUTING.md#010-preview-exception). The explicitly authorized `cf-workers-native@0.1.3` Preview retains the documented limitations under its [release exception](../CONTRIBUTING.md#013-preview-follow-up). Inclusion is not a claim of complete Workers or Node.js compatibility.

## Native hosts

| Host | Scope |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| iOS embedding | 0.1.2 Preview `WorkersIOS` SwiftPM product for UIKit/SwiftUI. Close before removing a UIKit controller; SwiftUI dismantling closes automatically. |
| iOS embedding | 0.1.3 Preview `WorkersIOS` SwiftPM product for UIKit/SwiftUI. Close before removing a UIKit controller; SwiftUI dismantling closes automatically. |
| Android embedding | Maven Central SDK `io.github.rdlabo:cf-workers-native-android:0.1.2`. Requires WebView `MULTI_PROFILE`; one SDK screen at a time, with persistent SDK cookies isolated from host cookies. |
| Capacitor | Existing Capacitor 8 integration, verified with 8.5.3; use this path for general native plugins. |

The published npm beta uses the name `cf-workers-native`; use the exact version
and matching native dependencies in the [dependency matrix](native-embedding.md#dependency-setup). The embedding hosts require matching JS/native source revisions; they are not included in the earlier
The npm Preview uses the name `cf-workers-native`; use the exact version
and matching native dependencies in the [dependency matrix](native-embedding.md#dependency-setup). Use the documented compatible JS/native dependency set; they are not included in the earlier
`workers-capacitor@0.1.1` release. Both detect incomplete startup after 30 seconds. They reuse the
runtime and build tooling, so they retain the API/framework limits below. See
[embedding setup and lifecycle](native-embedding.md) for the platform behavior
Expand Down
2 changes: 1 addition & 1 deletion docs/development.md
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ requires a verified namespace, release signing key and explicit publication.
Run the independent consumer suite against an exact registry version:

```sh
CONSUMER_PACKAGE=cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51 npm run test:package
CONSUMER_PACKAGE=cf-workers-native@0.1.3 npm run test:package
```

This downloads the published tarball instead of packing the checkout. The same
Expand Down
12 changes: 6 additions & 6 deletions docs/integration.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,10 @@ npx cap init

For the Vite example below, install `vite@7` as a dev dependency if it is not already present. Keep an existing supported esbuild setup instead of adding Vite.

Set the application's own ID/name and `webDir: "www"`. Use Swift Package Manager for iOS; this library does not include CocoaPods integration. Install the published Preview beta from npm using its exact version. npm `latest` currently points to an older beta; npm version `0.1.2` is not yet published:
Set the application's own ID/name and `webDir: "www"`. Use Swift Package Manager for iOS; this library does not include CocoaPods integration. Install the npm Preview using its exact version. The `latest` tag includes 0.x Preview releases:

```sh
npm install --save-exact cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51
npm install --save-exact cf-workers-native@0.1.3
```

For a source build instead, create a package tarball from a checkout of this repository:
Expand All @@ -97,20 +97,20 @@ npm install
npm pack

# In the application package:
npm install /path/to/cf-workers-native/cf-workers-native-0.1.2.tgz
npm install /path/to/cf-workers-native/cf-workers-native-0.1.3.tgz
```

`npm pack` runs the SDK build through `prepack`. Install the generated tarball rather than the checkout directory: directory installs can create a symlink back to the SDK tree, including a recursive path when the app lives inside that checkout. The tarball filename above uses the current source version.

The installed package is named `cf-workers-native`; the checkout directory can retain the repository name. The earlier published `workers-capacitor@0.1.1` Preview uses the old package name and does not provide the imports shown here. Keep JavaScript and native dependencies on the same source revision.
The installed package is named `cf-workers-native`; the checkout directory can retain the repository name. The earlier published `workers-capacitor@0.1.1` Preview uses the old package name and does not provide the imports shown here. Use the [documented JS/native dependency set](native-embedding.md#dependency-setup), or keep source-build dependencies on the same revision.

### Migrating from the old npm package

If your application already depends on `workers-capacitor`, remove it before installing the renamed package. Keeping both dependencies can make Capacitor discover and register the same native plugin twice. In the application package, using 0.1.2 Preview:
If your application already depends on `workers-capacitor`, remove it before installing the renamed package. Keeping both dependencies can make Capacitor discover and register the same native plugin twice. In the application package, using 0.1.3 Preview:

```sh
npm uninstall workers-capacitor
npm install --save-exact cf-workers-native@0.1.2-beta.pr65.shae5092d3abc51
npm install --save-exact cf-workers-native@0.1.3
```

Change runtime imports from `workers-capacitor` to `cf-workers-native/capacitor`, and change other package subpaths to the `cf-workers-native` prefix. Rebuild the application's mobile web assets with its existing build command, then run `npx cap sync` to regenerate native plugin dependencies. New applications use the installation steps above directly.
Expand Down
Loading