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
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This repository contains a reusable Cloudflare Workers package for in-process [f

## Repository Guide

- npm: [`@openfeature/flagd-ofrep-cf-worker`](https://www.npmjs.com/package/@openfeature/flagd-ofrep-cf-worker)
- Package docs: [`packages/js-ofrep-worker/README.md`](packages/js-ofrep-worker/README.md)
- Example worker: [`examples/js-worker`](examples/js-worker)
- Shared test fixtures: [`shared/test-flags.json`](shared/test-flags.json)
Expand Down Expand Up @@ -61,7 +62,7 @@ The repo has two similar flag sets for different purposes:

## Workers Compatibility

`@openfeature/flagd-core@1.3.0` and later support Cloudflare Workers and other V8 isolate runtimes without relying on dynamic code generation. This repo consumes the released package directly and uses `disableDynamicCodeGeneration: true` so targeting rules stay compatible with Workers runtime restrictions. The upstream work landed through [open-feature/js-sdk-contrib#1480](https://github.com/open-feature/js-sdk-contrib/issues/1480).
`@openfeature/flagd-core@^2.0.0` supports Cloudflare Workers and other V8 isolate runtimes without relying on dynamic code generation. This repo consumes the released package directly and uses `disableDynamicCodeGeneration: true` so targeting rules stay compatible with Workers runtime restrictions. The upstream work landed through [open-feature/js-sdk-contrib#1480](https://github.com/open-feature/js-sdk-contrib/issues/1480).
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The update to @openfeature/flagd-core@^2.0.0 in this section might be misleading. The original text correctly identified that support for Cloudflare Workers began with version 1.3.0. By changing it to ^2.0.0, it implies that earlier versions (like 1.3.0 to 1.x) do not support it, which is not the case. It's better to maintain the historical compatibility information while noting the version currently used by this repository.

Suggested change
`@openfeature/flagd-core@^2.0.0` supports Cloudflare Workers and other V8 isolate runtimes without relying on dynamic code generation. This repo consumes the released package directly and uses `disableDynamicCodeGeneration: true` so targeting rules stay compatible with Workers runtime restrictions. The upstream work landed through [open-feature/js-sdk-contrib#1480](https://github.com/open-feature/js-sdk-contrib/issues/1480).
`@openfeature/flagd-core@1.3.0` and later (this repository uses `^2.0.0`) support Cloudflare Workers and other V8 isolate runtimes without relying on dynamic code generation. This repo consumes the released package directly and uses `disableDynamicCodeGeneration: true` so targeting rules stay compatible with Workers runtime restrictions. The upstream work landed through [open-feature/js-sdk-contrib#1480](https://github.com/open-feature/js-sdk-contrib/issues/1480).


## License

Expand Down
6 changes: 5 additions & 1 deletion packages/js-ofrep-worker/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# @openfeature/flagd-ofrep-cf-worker

[![npm version](https://img.shields.io/npm/v/@openfeature/flagd-ofrep-cf-worker)](https://www.npmjs.com/package/@openfeature/flagd-ofrep-cf-worker)
[![license](https://img.shields.io/npm/l/@openfeature/flagd-ofrep-cf-worker)](https://github.com/open-feature/flagd-ofrep-cf-worker/blob/main/LICENSE)
[![CI](https://github.com/open-feature/flagd-ofrep-cf-worker/actions/workflows/ci.yml/badge.svg)](https://github.com/open-feature/flagd-ofrep-cf-worker/actions/workflows/ci.yml)

Cloudflare Workers package for evaluating [flagd](https://flagd.dev/) flags in-process and serving [OFREP](https://github.com/open-feature/protocol) evaluation endpoints.

## Installation
Expand Down Expand Up @@ -69,7 +73,7 @@ The package also exports OFREP request/response types plus selected types from `

## Compatibility

This package is designed for Cloudflare Workers and uses the released `@openfeature/flagd-core@1.3.0+` package with `disableDynamicCodeGeneration: true` so it avoids runtime code generation paths that are not allowed in the Workers runtime.
This package is designed for Cloudflare Workers and uses `@openfeature/flagd-core@^2.0.0` with `disableDynamicCodeGeneration: true` so it avoids runtime code generation paths that are not allowed in the Workers runtime.

It supports the flagd features exercised by this repo's package and example worker, including JSONLogic targeting, fractional evaluation, semantic version comparison, string operators, metadata, and shared evaluators.

Expand Down
Loading