diff --git a/.eslintrc.cjs b/.eslintrc.cjs index f63c3a7b..cc05118c 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -39,7 +39,6 @@ module.exports = { 'jsdoc/check-param-names': 1, 'jsdoc/check-tag-names': 1, 'jsdoc/check-types': 1, - 'jsdoc/newline-after-description': 1, 'jsdoc/no-undefined-types': 1, 'jsdoc/require-description': 0, 'jsdoc/require-description-complete-sentence': 1, diff --git a/.gitignore b/.gitignore index e1ce432c..0b584a6d 100644 --- a/.gitignore +++ b/.gitignore @@ -9,4 +9,5 @@ .nyc_output /* Mocha */ -junit \ No newline at end of file +junit +.env diff --git a/package-lock.json b/package-lock.json index e07b10a1..65f53d4c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,7 +9,7 @@ "version": "3.0.3", "license": "MIT", "dependencies": { - "@adobe/fetch": "4.0.5", + "@adobe/fetch": "4.0.13", "form-data": "4.0.0", "object-hash": "3.0.0" }, @@ -21,6 +21,7 @@ "c8": "7.13.0", "commitizen": "4.3.0", "cz-conventional-changelog": "3.3.0", + "dotenv": "16.1.4", "eslint": "8.36.0", "eslint-plugin-header": "3.1.1", "eslint-plugin-import": "2.27.5", @@ -58,24 +59,24 @@ } }, "node_modules/@adobe/fetch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@adobe/fetch/-/fetch-4.0.5.tgz", - "integrity": "sha512-SFtL8AQ/zNvpV6CvXN5iGD53fbvyie+hgOZlo/RH1zhieODGqbCbeDa3ikY6iOBQ5SyG6/1mvzC9IpZP+wwYFQ==", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@adobe/fetch/-/fetch-4.0.13.tgz", + "integrity": "sha512-faw1PUmBKczEMTMYehSvu7+lEFz7zu7lxWWzYRi8kR/ILcOxU3bZXKUl/TpcnXePkcHWEDvseiCejJC9UJazog==", "dependencies": { "debug": "4.3.4", "http-cache-semantics": "4.1.1", - "lru-cache": "8.0.0" + "lru-cache": "9.1.1" }, "engines": { "node": ">=14.16" } }, "node_modules/@adobe/fetch/node_modules/lru-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.0.tgz", - "integrity": "sha512-pMu1vSJIwJPS/YuMJAJFjvKA2OC7rvgKqJHr90JmZ1kv/hO+MuzqHRSWqyn730vlOwc1Bx/c8+3izTGzmKyXNQ==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.1.tgz", + "integrity": "sha512-65/Jky17UwSb0BuB9V+MyDpsOtXKmYwzhyl+cOa9XUiI4uV2Ouy/2voFP3+al0BjZbJgMBD8FojMpAf+Z+qn4A==", "engines": { - "node": ">=16.14" + "node": "14 || >=16.14" } }, "node_modules/@adobe/helix-log": { @@ -3144,6 +3145,18 @@ "node": ">=8" } }, + "node_modules/dotenv": { + "version": "16.1.4", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.1.4.tgz", + "integrity": "sha512-m55RtE8AsPeJBpOIFKihEmqUcoVncQIwo7x9U8ZwLEZw9ZpXboz2c+rvog+jUaJvVrZ5kBOeYQBX5+8Aa/OZQw==", + "dev": true, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/motdotla/dotenv?sponsor=1" + } + }, "node_modules/duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", @@ -13831,19 +13844,19 @@ } }, "@adobe/fetch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/@adobe/fetch/-/fetch-4.0.5.tgz", - "integrity": "sha512-SFtL8AQ/zNvpV6CvXN5iGD53fbvyie+hgOZlo/RH1zhieODGqbCbeDa3ikY6iOBQ5SyG6/1mvzC9IpZP+wwYFQ==", + "version": "4.0.13", + "resolved": "https://registry.npmjs.org/@adobe/fetch/-/fetch-4.0.13.tgz", + "integrity": "sha512-faw1PUmBKczEMTMYehSvu7+lEFz7zu7lxWWzYRi8kR/ILcOxU3bZXKUl/TpcnXePkcHWEDvseiCejJC9UJazog==", "requires": { "debug": "4.3.4", "http-cache-semantics": "4.1.1", - "lru-cache": "8.0.0" + "lru-cache": "9.1.1" }, "dependencies": { "lru-cache": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-8.0.0.tgz", - "integrity": "sha512-pMu1vSJIwJPS/YuMJAJFjvKA2OC7rvgKqJHr90JmZ1kv/hO+MuzqHRSWqyn730vlOwc1Bx/c8+3izTGzmKyXNQ==" + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.1.1.tgz", + "integrity": "sha512-65/Jky17UwSb0BuB9V+MyDpsOtXKmYwzhyl+cOa9XUiI4uV2Ouy/2voFP3+al0BjZbJgMBD8FojMpAf+Z+qn4A==" } } }, @@ -16132,6 +16145,12 @@ "is-obj": "^2.0.0" } }, + "dotenv": { + "version": "16.1.4", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-16.1.4.tgz", + "integrity": "sha512-m55RtE8AsPeJBpOIFKihEmqUcoVncQIwo7x9U8ZwLEZw9ZpXboz2c+rvog+jUaJvVrZ5kBOeYQBX5+8Aa/OZQw==", + "dev": true + }, "duplexer2": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", diff --git a/package.json b/package.json index e611ebfe..81f4a235 100644 --- a/package.json +++ b/package.json @@ -51,6 +51,7 @@ "c8": "7.13.0", "commitizen": "4.3.0", "cz-conventional-changelog": "3.3.0", + "dotenv": "16.1.4", "eslint": "8.36.0", "eslint-plugin-header": "3.1.1", "eslint-plugin-import": "2.27.5", @@ -66,7 +67,7 @@ "semantic-release": "21.0.3" }, "dependencies": { - "@adobe/fetch": "4.0.5", + "@adobe/fetch": "4.0.13", "form-data": "4.0.0", "object-hash": "3.0.0" }, diff --git a/test/edgedict.integration.test.js b/test/edgedict.integration.test.js index 9aa5980d..af60cb73 100644 --- a/test/edgedict.integration.test.js +++ b/test/edgedict.integration.test.js @@ -182,11 +182,12 @@ describe('#integration edge dictionary updates', () => { fastly.writeDictItem(version, 'test_wo_dict', 'baz', undefined), ]); } finally { - // create fresh + // create fresh + // 'update' doesn't seem to work anymore on write-only dictionaries.... const res1 = await fastly.bulkUpdateDictItems( version, 'test_wo_dict', - { item_key: 'foo', item_value: 'one', op: 'create' }, + // { item_key: 'foo', item_value: 'one', op: 'create' }, { item_key: 'bar', item_value: 'two', op: 'create' }, { item_key: 'nope', item_value: 'three', op: 'create' }, { item_key: 'baz', item_value: 'four', op: 'upsert' }, @@ -197,7 +198,7 @@ describe('#integration edge dictionary updates', () => { const res2 = await fastly.bulkUpdateDictItems( version, 'test_wo_dict', - { item_key: 'foo', item_value: 'eins', op: 'update' }, + // { item_key: 'foo', item_value: 'eins', op: 'update' }, { item_key: 'bar', item_value: 'zwei', op: 'upsert' }, { item_key: 'nope', item_value: 'three', op: 'delete' }, { item_key: 'baz', item_value: 'four', op: 'delete' }, diff --git a/test/package.integration.test.js b/test/package.integration.test.js index 82c8a7c7..d02bf0b5 100644 --- a/test/package.integration.test.js +++ b/test/package.integration.test.js @@ -58,6 +58,7 @@ describe('#integration compute@edge packages', () => { authors: ['Lars Trieloff'], language: 'javascript', size: 2735861, + files_hash: 'a24353ecf54c2be005f3dea934a50e62916d829b62c16041f991cc1abbf9687a0836ec55b8c97d70b028b48a710b85a78b27c2a930a19cfbe946fb108a2eb657', hashsum: '22c0a39699a3743001c8de6fc9a9422ac1dac13e9204b80d7f5ec3988a362e7eb3d589cd2a472edded08b712fb9ddf0fffec60642e6361fb5e16e28fc00b2e17', }); }).timeout(60000); diff --git a/test/setup-env.js b/test/setup-env.js index 09a93941..41b9f431 100644 --- a/test/setup-env.js +++ b/test/setup-env.js @@ -12,6 +12,9 @@ // eslint-disable-next-line no-console import { resolve } from 'path'; import { fileURLToPath } from 'url'; +import { config } from 'dotenv'; + +config(); // eslint-disable-next-line no-console console.log('Forcing HTTP/1.1 for Helix-Fetch');