npm package diff
Package: @forge/csp
Versions: 3.2.2-experimental-9332276 - 3.2.2-experimental-264fa0f
Modified:package/out/csp/csp-processing-service.js
Index: package/out/csp/csp-processing-service.js
===================================================================
--- package/out/csp/csp-processing-service.js
+++ package/out/csp/csp-processing-service.js
@@ -1,9 +1,9 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CSPProcessingService = exports.InvalidConnectSrc = void 0;
const tslib_1 = require("tslib");
-const cheerio_1 = tslib_1.__importDefault(require("cheerio"));
+const cheerio_1 = require("cheerio");
const content_security_policy_parser_1 = tslib_1.__importDefault(require("content-security-policy-parser"));
const crypto_1 = tslib_1.__importDefault(require("crypto"));
class InvalidConnectSrc extends Error {
constructor() {
@@ -27,9 +27,9 @@
}
getCspDetails(body, permissions) {
const { scripts, styles } = permissions?.content ?? { scripts: [], styles: [] };
const external = permissions?.external ?? {};
- const $ = cheerio_1.default.load(body);
+ const $ = (0, cheerio_1.load)(body, { xml: { xmlMode: false } });
const { 'script-src': scriptSrc, 'style-src': styleSrc, ...mappedExternalCsp } = this.mapExternalPermissionsToCsp(external);
return {
'style-src': [...this.getStyleSrc($, styles), ...styleSrc],
'script-src': [...this.getScriptSrc($, scripts), ...scriptSrc],
Modified:package/package.json
Index: package/package.json
===================================================================
--- package/package.json
+++ package/package.json
@@ -1,7 +1,7 @@
{
"name": "@forge/csp",
- "version": "3.2.2-experimental-9332276",
+ "version": "3.2.2-experimental-264fa0f",
"description": "Contains the CSP configuration for Custom UI resources in Forge",
"main": "out/index.js",
"author": "Atlassian",
"license": "UNLICENSED",
@@ -10,14 +10,14 @@
"compile": "tsc -b -v",
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
},
"devDependencies": {
- "@forge/cli-shared": "5.4.0-next.0-experimental-9332276",
- "@forge/manifest": "7.5.3",
+ "@forge/cli-shared": "5.4.0-next.1-experimental-264fa0f",
+ "@forge/manifest": "7.5.4-next.0-experimental-264fa0f",
"@types/jest": "^29.5.12",
"@types/node": "14.18.63"
},
"dependencies": {
- "cheerio": "^0.22.0",
+ "cheerio": "^1.0.0",
"content-security-policy-parser": "^0.4.1"
}
}
Modified:package/CHANGELOG.md
Index: package/CHANGELOG.md
===================================================================
--- package/CHANGELOG.md
+++ package/CHANGELOG.md
@@ -1,6 +1,12 @@
# @forge/csp
+## 3.2.2-experimental-264fa0f
+
+### Patch Changes
+
+- 386c1f1: Bump cheerio from version 0.22 to version 1.0
+
## 3.2.2
### Patch Changes