From 5aaf9b23aaf65e9124a193873764dbf115530bcd Mon Sep 17 00:00:00 2001 From: Niklas Korz Date: Wed, 17 May 2023 15:24:32 +0200 Subject: [PATCH] Version 2.2.0 --- CHANGELOG.md | 11 +++++++++++ package.json | 4 ++-- src/loadScript.ts | 1 + tsconfig.json | 4 ++-- yarn.lock | 8 ++++---- 5 files changed, 20 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 214f8a5..52af7f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,14 @@ +## v2.2.0 (2023-05-17) + +Changes: +- Target ES2015 instead of ES5 + +Fixes: +- Add [`crossorigin="anonymous"`](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/crossorigin) to script tags for compatibility with [COEP](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Cross-Origin-Embedder-Policy) + +Technical changes: +- Updated from TypeScript `4.4` to `5.0` + ## v2.1.0 (2021-09-28) Changes: diff --git a/package.json b/package.json index b983ffa..1799b0b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@alugha/ima", - "version": "2.1.0", + "version": "2.2.0", "description": "A library for asynchronously loading the Google IMA SDK with static typing for the SDK", "license": "MIT", "author": "Niklas Korz ", @@ -53,6 +53,6 @@ "lint-staged": "^11.1.2", "prettier": "^2.4.1", "rimraf": "^3.0.2", - "typescript": "^4.4.3" + "typescript": "^5.0.4" } } diff --git a/src/loadScript.ts b/src/loadScript.ts index c9c3c91..fec869c 100644 --- a/src/loadScript.ts +++ b/src/loadScript.ts @@ -7,6 +7,7 @@ const loadScript = (src: string): Promise => script.src = src; script.onload = resolve; script.onerror = reject; + script.crossOrigin = "anonymous"; document.body.appendChild(script); }); diff --git a/tsconfig.json b/tsconfig.json index f05b8fb..604892d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,7 +1,7 @@ { "compilerOptions": { - "target": "es5", - "module": "es2015", + "target": "ES2015", + "module": "ES2015", "lib": ["dom", "es5", "es2015.promise"], "outDir": "./lib/esm", "strict": true, diff --git a/yarn.lock b/yarn.lock index ed8e66a..6fbc33c 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1959,10 +1959,10 @@ type-fest@^0.20.2: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.20.2.tgz#1bf207f4b28f91583666cb5fbd327887301cd5f4" integrity sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ== -typescript@^4.4.3: - version "4.4.3" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.4.3.tgz#bdc5407caa2b109efd4f82fe130656f977a29324" - integrity sha512-4xfscpisVgqqDfPaJo5vkd+Qd/ItkoagnHpufr+i2QCHBsNYp+G7UAoyFl8aPtx879u38wPV65rZ8qbGZijalA== +typescript@^5.0.4: + version "5.0.4" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.0.4.tgz#b217fd20119bd61a94d4011274e0ab369058da3b" + integrity sha512-cW9T5W9xY37cc+jfEnaUvX91foxtHkza3Nw3wkoF4sSlKn0MONdkdEndig/qPBWXNkmplh3NzayQzCiHM4/hqw== unbox-primitive@^1.0.1: version "1.0.1"