From 27df67162bc7d4ee99c25b81cb7f82bd5f4409c6 Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Fri, 13 Jun 2025 00:22:21 +0600 Subject: [PATCH 1/3] add warning about unversioned cdn urls --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index a0ec36fb0..e176e225c 100644 --- a/README.md +++ b/README.md @@ -131,6 +131,8 @@ The package has different entry points for different environments. The browser e ``` +> ⚠️ **Warning**: Always specify a version when using CDN URLs like `unpkg` URLs above (for example: `@6` in the examples above). Using unversioned CDN URLs can automatically pull in breaking changes when new versions are released, causing unexpected problems in the application. + When evaluated, that bundle assigns the SDK's exports to `window.optimizelySdk`. If you wish to use the asset locally (for example, if unpkg is down), you can find it in your local copy of the package at dist/optimizely.browser.umd.min.js. We do not recommend using this method in production settings as it introduces a third-party performance dependency. As `window.optimizelySdk` should be a global variable at this point, you can continue to use it like so: From d6cfa56a557b5a55782bcca5249846b4656526cb Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Fri, 13 Jun 2025 00:24:32 +0600 Subject: [PATCH 2/3] major --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e176e225c..73bc7f73c 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ The package has different entry points for different environments. The browser e ``` -> ⚠️ **Warning**: Always specify a version when using CDN URLs like `unpkg` URLs above (for example: `@6` in the examples above). Using unversioned CDN URLs can automatically pull in breaking changes when new versions are released, causing unexpected problems in the application. +> ⚠️ **Warning**: Always specify a version when using CDN URLs like `unpkg` URLs above (for example: `@6` in the examples above). Using unversioned CDN URLs can automatically pull in breaking changes when new major versions are released, causing unexpected problems in the application. When evaluated, that bundle assigns the SDK's exports to `window.optimizelySdk`. If you wish to use the asset locally (for example, if unpkg is down), you can find it in your local copy of the package at dist/optimizely.browser.umd.min.js. We do not recommend using this method in production settings as it introduces a third-party performance dependency. From 287f027c315edba00ad092656069c991d318808b Mon Sep 17 00:00:00 2001 From: Raju Ahmed Date: Fri, 13 Jun 2025 00:43:39 +0600 Subject: [PATCH 3/3] update --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 73bc7f73c..08ab9f5ad 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ The package has different entry points for different environments. The browser e ``` -> ⚠️ **Warning**: Always specify a version when using CDN URLs like `unpkg` URLs above (for example: `@6` in the examples above). Using unversioned CDN URLs can automatically pull in breaking changes when new major versions are released, causing unexpected problems in the application. +> ⚠️ **Warning**: Always include a specific version number (such as @6) when using CDN URLs like the `unpkg` example above. If you use a URL without a version, your application may automatically receive breaking changes when a new major version is released, which can lead to unexpected issues. When evaluated, that bundle assigns the SDK's exports to `window.optimizelySdk`. If you wish to use the asset locally (for example, if unpkg is down), you can find it in your local copy of the package at dist/optimizely.browser.umd.min.js. We do not recommend using this method in production settings as it introduces a third-party performance dependency.