From 2da39c96f1a4ba1c1cbb8e08f9bf53f1f114849a Mon Sep 17 00:00:00 2001 From: David Reed Date: Sat, 1 Oct 2022 18:26:29 -0400 Subject: [PATCH] bump --- CHANGELOG.md | 14 ++++++++------ package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f69791..be7f638 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,23 @@ +# v1.0.2 + +This package now targets CommonJS. + # v1.0.1 In your `sw.js` script, you MUST import `uv.bundle.js` then `uv.config.js` in order. This is because we can no longer hard-code the paths. Ideally, we would import `uv.config.js` then use the config.bundle path in the serviceworker, however the config is dependant on `uv.bundle.js`, which we don't know the location to. Old: + ```js importScripts('./uv/uv.sw.js'); const sw = new UVServiceWorker(); -self.addEventListener('fetch', event => - event.respondWith( - sw.fetch(event) - ) -); +self.addEventListener('fetch', (event) => event.respondWith(sw.fetch(event))); ``` New: + ```diff + importScripts('./uv/uv.bundle.js'); + importScripts('./uv/uv.config.js'); @@ -30,4 +32,4 @@ self.addEventListener('fetch', event => ); ``` -You are still required to specify all paths in `uv.config.js`. \ No newline at end of file +You are still required to specify all paths in `uv.config.js`. diff --git a/package-lock.json b/package-lock.json index 20b8bea..fb0048a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,13 +1,13 @@ { "name": "ultraviolet", - "version": "1.0.1", + "version": "1.0.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "ultraviolet", - "version": "1.0.1", - "license": "ISC", + "version": "1.0.2", + "license": "MIT", "dependencies": { "bowser": "^2.11.0", "css-tree": "^2.0.4", diff --git a/package.json b/package.json index 34eac9f..3604d95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ultraviolet", - "version": "1.0.1", + "version": "1.0.2", "description": "Proxy", "main": "lib/index.js", "scripts": {