diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 36f7dd7..a9bf51c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,7 +27,7 @@ jobs: run: | node .github/patchVersions.js cat package.json - yarn install --no-lockfile + yarn install env: GATSBY_VERSION: ${{ matrix.gatsby-version }} NODE_VERSION: ${{ matrix.node-version }} diff --git a/errorMap.js b/errorMap.js index cfb7f36..769cc92 100644 --- a/errorMap.js +++ b/errorMap.js @@ -1,15 +1,27 @@ -"use strict"; +'use strict'; -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } +function _defineProperty(obj, key, value) { + if (key in obj) { + Object.defineProperty(obj, key, { + value: value, + enumerable: true, + configurable: true, + writable: true, + }); + } else { + obj[key] = value; + } + return obj; +} var pluginPrefix = 'gatsby-source-datocms'; function prefixId(id) { - return "".concat(pluginPrefix, "_").concat(id); + return ''.concat(pluginPrefix, '_').concat(id); } var ReporterLevel = { - Error: 'ERROR' + Error: 'ERROR', }; var ReporterCategory = { // Error caused by user (typically, site misconfiguration) @@ -17,10 +29,10 @@ var ReporterCategory = { // Error caused by DatoCMS plugin ("third party" relative to Gatsby Cloud) ThirdParty: 'THIRD_PARTY', // Error caused by Gatsby process - System: 'SYSTEM' + System: 'SYSTEM', }; var CODES = { - MissingAPIToken: '10000' + MissingAPIToken: '10000', }; var ERROR_MAP = _defineProperty({}, CODES.MissingAPIToken, { @@ -28,12 +40,12 @@ var ERROR_MAP = _defineProperty({}, CODES.MissingAPIToken, { return context.sourceMessage; }, level: ReporterLevel.Error, - category: ReporterCategory.User + category: ReporterCategory.User, }); module.exports = { pluginPrefix: pluginPrefix, CODES: CODES, prefixId: prefixId, - ERROR_MAP: ERROR_MAP -}; \ No newline at end of file + ERROR_MAP: ERROR_MAP, +}; diff --git a/package.json b/package.json index 5b270be..a93dd49 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,9 @@ "build": "babel src --out-dir . --ignore __tests__", "watch": "babel -w src --out-dir . --ignore __tests__", "prepublish": "cross-env NODE_ENV=production yarn build", + "test-node-18": "yarn build && jest --forceExit --experimental_vm_modules", "test-v4": "yarn build && jest --forceExit", - "test": "yarn build && jest --forceExit --testNamePattern='^(?!tracedSVG)'" + "test": "yarn build && node --experimental-vm-modules node_modules/jest/bin/jest.js --forceExit --testNamePattern='^(?!tracedSVG)'" }, "devDependencies": { "@babel/cli": "^7.6.2",