diff --git a/core/package/__tests__/core-package.test.js b/core/package/__tests__/core-package.test.js index 266174f1379..93be813de05 100644 --- a/core/package/__tests__/core-package.test.js +++ b/core/package/__tests__/core-package.test.js @@ -2,11 +2,15 @@ jest.mock("load-json-file"); jest.mock("write-pkg"); +jest.mock("write-json-file"); +jest.mock("fs"); const os = require("os"); const path = require("path"); const loadJsonFile = require("load-json-file"); const writePkg = require("write-pkg"); +const writeJsonFile = require("write-json-file"); +const fs = require("fs"); // file under test const Package = require(".."); @@ -29,6 +33,13 @@ describe("Package", () => { }); }); + describe("get .lockFileLocation", () => { + it("should return the package-lock location", () => { + const pkg = factory({ name: "lock-file-location" }); + expect(pkg.lockFileLocation).toBe(path.normalize("/root/path/to/lock-file-location/package-lock.json")); + }); + }); + describe("get .resolved", () => { it("returns npa.Result relative to rootPath, always posix", () => { const pkg = factory({ name: "get-resolved" }); @@ -257,8 +268,11 @@ describe("Package", () => { }); describe(".serialize()", () => { - it("writes changes to disk", async () => { - writePkg.mockImplementation(() => Promise.resolve()); + it("writes changes to package.json to disk", async () => { + writePkg.mockImplementationOnce(() => Promise.resolve()); + fs.existsSync.mockImplementationOnce(() => false); + writeJsonFile.mockImplementationOnce(() => Promise.resolve()); + loadJsonFile.mockImplementationOnce(() => Promise.resolve()); const pkg = factory({ name: "serialize-me" }); const result = await pkg.set("woo", "hoo").serialize(); @@ -271,6 +285,40 @@ describe("Package", () => { woo: "hoo", }) ); + expect(fs.existsSync).toHaveBeenCalledWith("/root/path/to/serialize-me/package-lock.json"); + expect(loadJsonFile).not.toHaveBeenCalled(); + expect(writeJsonFile).not.toHaveBeenCalled(); + }); + + it("writes changes to package-lock to disk", async () => { + writePkg.mockImplementationOnce(() => Promise.resolve()); + fs.existsSync.mockImplementationOnce(() => true); + writeJsonFile.mockImplementationOnce(() => Promise.resolve()); + loadJsonFile.mockImplementationOnce(() => Promise.resolve({ name: "something" })); + + const pkg = factory({ name: "serialize-me-lock", version: "1.0.0" }); + expect(pkg.version).toBe("1.0.0"); + + const result = await pkg.set("version", "2.0.0").serialize(); + expect(result).toBe(pkg); + expect(result.version).toBe("2.0.0"); + + expect(writePkg).toHaveBeenLastCalledWith( + pkg.manifestLocation, + expect.objectContaining({ + name: "serialize-me-lock", + version: "2.0.0", + }) + ); + expect(fs.existsSync).toHaveBeenCalledWith("/root/path/to/serialize-me-lock/package-lock.json"); + expect(loadJsonFile).toHaveBeenCalledWith("/root/path/to/serialize-me-lock/package-lock.json"); + expect(writeJsonFile).toHaveBeenCalledWith( + "/root/path/to/serialize-me-lock/package-lock.json", + expect.objectContaining({ + version: "2.0.0", + }), + { detectIndent: true } + ); }); }); }); diff --git a/core/package/index.js b/core/package/index.js index 67b9970737b..4a404577ac5 100644 --- a/core/package/index.js +++ b/core/package/index.js @@ -4,6 +4,9 @@ const npa = require("npm-package-arg"); const path = require("path"); const loadJsonFile = require("load-json-file"); const writePkg = require("write-pkg"); +const fs = require("fs"); +const writeJsonFile = require("write-json-file"); +const pWaterfall = require("p-waterfall"); // symbol used to "hide" internal state const PKG = Symbol("pkg"); @@ -30,6 +33,12 @@ function shallowCopy(json) { }, {}); } +// determine if a package-lock.json file exists +function hasPackageLock(location) { + const packageLock = path.resolve(location); + return fs.existsSync(packageLock); +} + class Package { constructor(pkg, location, rootPath = location) { // npa will throw an error if the name is invalid @@ -77,6 +86,9 @@ class Package { manifestLocation: { value: path.join(location, "package.json"), }, + lockFileLocation: { + value: path.join(location, "package-lock.json"), + }, nodeModulesLocation: { value: path.join(location, "node_modules"), }, @@ -181,7 +193,27 @@ class Package { * @returns {Promise} resolves when write finished */ serialize() { - return writePkg(this.manifestLocation, this[PKG]).then(() => this); + return writePkg(this.manifestLocation, this[PKG]) + .then(() => this.writePkgLock()) + .then(() => this); + } + + /** + * Write package-lock chagnes to disk + * @returns {Promise} resolves when write finished + */ + writePkgLock() { + // We only care about version in the lock file; a package's name never changes + const lockChanges = { version: this[PKG].version }; + + const tasks = [ + () => loadJsonFile(this.lockFileLocation), + lockFileData => Promise.resolve(Object.assign({}, lockFileData, lockChanges)), + updatedLockFileData => + writeJsonFile(this.lockFileLocation, updatedLockFileData, { detectIndent: true }), + ]; + + return hasPackageLock(this.lockFileLocation) ? pWaterfall(tasks) : Promise.resolve(); } /** diff --git a/core/package/package.json b/core/package/package.json index 5c66c805856..9321ead05de 100644 --- a/core/package/package.json +++ b/core/package/package.json @@ -33,6 +33,8 @@ "dependencies": { "load-json-file": "^4.0.0", "npm-package-arg": "^6.1.0", + "p-waterfall": "2.1.0", + "write-json-file": "4.1.0", "write-pkg": "^3.1.0" } } diff --git a/package-lock.json b/package-lock.json index b0e89b86350..fefd49eaf27 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1184,7 +1184,78 @@ "requires": { "load-json-file": "^4.0.0", "npm-package-arg": "^6.1.0", + "p-waterfall": "2.1.0", + "write-json-file": "4.1.0", "write-pkg": "^3.1.0" + }, + "dependencies": { + "detect-indent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.0.0.tgz", + "integrity": "sha512-oSyFlqaTHCItVRGK5RmrmjB+CmaMOW7IaNA/kdxqhoa6d17j/5ce9O9eWXmV/KEdRwqpQA+Vqe8a8Bsybu4YnA==" + }, + "is-plain-obj": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.0.0.tgz", + "integrity": "sha512-EYisGhpgSCwspmIuRHGjROWTon2Xp8Z7U03Wubk/bTL5TTRC5R1rGVgyjzBrk9+ULdH6cRD06KRcw/xfqhVYKQ==" + }, + "make-dir": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.0.0.tgz", + "integrity": "sha512-grNJDhb8b1Jm1qeqW5R/O63wUo4UXo2v2HMic6YT9i/HBlF93S8jkMgH7yugvY9ABDShH4VZMn8I+U8+fCNegw==", + "requires": { + "semver": "^6.0.0" + } + }, + "p-reduce": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-reduce/-/p-reduce-2.1.0.tgz", + "integrity": "sha512-2USApvnsutq8uoxZBGbbWM0JIYLiEMJ9RlaN7fAzVNb9OZN0SHjjTTfIcb667XynS5Y1VhwDJVDa72TnPzAYWw==" + }, + "p-waterfall": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-waterfall/-/p-waterfall-2.1.0.tgz", + "integrity": "sha512-Ou2oTMqAdu9CuYXr/RV1kTfovMfJncbmxr3MLe+vm8/RXtT/NciGaKtihLexy7p7JxC5wAy49ib233Yf5hwnPA==", + "requires": { + "p-reduce": "^2.0.0" + } + }, + "semver": { + "version": "6.1.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.2.tgz", + "integrity": "sha512-z4PqiCpomGtWj8633oeAdXm1Kn1W++3T8epkZYnwiVgIYIJ0QHszhInYSJTYxebByQH7KVCEAn8R9duzZW2PhQ==" + }, + "sort-keys": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/sort-keys/-/sort-keys-3.0.0.tgz", + "integrity": "sha512-77XUKMiZN5LvQXZ9sgWfJza19AvYIDwaDGwGiULM+B5XYru8Z90Oh06JvqDlJczvjjYvssrV0aK1GI6+YXvn5A==", + "requires": { + "is-plain-obj": "^2.0.0" + } + }, + "write-file-atomic": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.0.tgz", + "integrity": "sha512-EIgkf60l2oWsffja2Sf2AL384dx328c0B+cIYPTQq5q2rOYuDV00/iPFBOUiDKKwKMOhkymH8AidPaRvzfxY+Q==", + "requires": { + "imurmurhash": "^0.1.4", + "is-typedarray": "^1.0.0", + "signal-exit": "^3.0.2", + "typedarray-to-buffer": "^3.1.5" + } + }, + "write-json-file": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/write-json-file/-/write-json-file-4.1.0.tgz", + "integrity": "sha512-6k5DbY25RqGahOesErT6rLynAVorm4HhG7+40NkYyPpMApwQDsnx8jP3/tY84iMIb3WmbXlhpoHGNEPAbE1y1w==", + "requires": { + "detect-indent": "^6.0.0", + "graceful-fs": "^4.1.15", + "make-dir": "^3.0.0", + "sort-keys": "^3.0.0", + "write-file-atomic": "^3.0.0" + } + } } }, "@lerna/package-graph": { @@ -1409,13 +1480,13 @@ "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==" }, "@octokit/endpoint": { - "version": "5.1.1", - "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.1.1.tgz", - "integrity": "sha512-kCv3ZyqFTWGYmvuU0TETzC4jPGzyLCJrjXp65kRe9DHyQULZak+dpwmEbT7M2rpdr/O2im8ivrPGT6J+2WsKNg==", + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-5.1.8.tgz", + "integrity": "sha512-BVVNVVeVGySIF6nvoaO6AaickboZr7A1O6z1wmnMRslewi6O+KILSp0ZsXbkgLnP8V8pa7WM9+wSYYczIUBm5w==", "requires": { - "deepmerge": "3.2.0", + "deepmerge": "3.3.0", "is-plain-object": "^3.0.0", - "universal-user-agent": "^2.0.1", + "universal-user-agent": "^2.1.0", "url-template": "^2.0.8" }, "dependencies": { @@ -1440,16 +1511,17 @@ "integrity": "sha512-CTZr64jZYhGWNTDGlSJ2mvIlFsm9OEO3LqWn9I/gmoHI4jRBp4kpHoFYNemG4oA75zUAcmbuWblb7jjP877YZw==" }, "@octokit/request": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/@octokit/request/-/request-3.0.2.tgz", - "integrity": "sha512-lBH2hf2Yuh9XlmP3MSpn3jL9DyCGG+cuPXDRQiJMK42BwW6xFhwWmG1k6xWykcLM4GwZG/5fuwcqnQXYG0ZTSg==", + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-4.1.1.tgz", + "integrity": "sha512-LOyL0i3oxRo418EXRSJNk/3Q4I0/NKawTn6H/CQp+wnrG1UFLGu080gSsgnWobhPo5BpUNgSQ5BRk5FOOJhD1Q==", "requires": { "@octokit/endpoint": "^5.1.0", - "deprecation": "^1.0.1", + "@octokit/request-error": "^1.0.1", + "deprecation": "^2.0.0", "is-plain-object": "^3.0.0", "node-fetch": "^2.3.0", "once": "^1.4.0", - "universal-user-agent": "^2.0.1" + "universal-user-agent": "^2.1.0" }, "dependencies": { "is-plain-object": { @@ -1467,16 +1539,26 @@ } } }, + "@octokit/request-error": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-1.0.4.tgz", + "integrity": "sha512-L4JaJDXn8SGT+5G0uX79rZLv0MNJmfGa4vb4vy1NnpjSnWDLJRy6m90udGwvMmavwsStgbv2QNkPzzTCMmL+ig==", + "requires": { + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, "@octokit/rest": { - "version": "16.25.3", - "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.25.3.tgz", - "integrity": "sha512-/6/Isn9pNoKUQwuWUaskxMC6kFxtXTHhzsgYbyirEQ3UvcLciHvPgtRTbuV3bbVf0x4+4WEfKaI9UzxmPQ3W3A==", + "version": "16.28.2", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-16.28.2.tgz", + "integrity": "sha512-csuYiHvJ1P/GFDadVn0QhwO83R1+YREjcwCY7ZIezB6aJTRIEidJZj+R7gAkUhT687cqYb4cXTZsDVu9F+Fmug==", "requires": { - "@octokit/request": "3.0.2", + "@octokit/request": "^4.0.1", + "@octokit/request-error": "^1.0.2", "atob-lite": "^2.0.0", "before-after-hook": "^1.4.0", "btoa-lite": "^1.0.0", - "deprecation": "^1.0.1", + "deprecation": "^2.0.0", "lodash.get": "^4.4.2", "lodash.set": "^4.3.2", "lodash.uniq": "^4.5.0", @@ -1613,9 +1695,9 @@ "dev": true }, "agent-base": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", - "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.3.0.tgz", + "integrity": "sha512-salcGninV0nPrwpGNn4VTXBb1SOuXQBiqbrNXoeizJsHrsL6ERFM2Ne3JUSBWRE6aeNJI2ROP/WEEIDUiDe3cg==", "requires": { "es6-promisify": "^5.0.0" } @@ -1957,9 +2039,9 @@ "integrity": "sha512-l5r9ir56nda3qu14nAXIlyq1MmUSs0meCIaFAh8HwkFwP1F8eToOuS3ah2VAHHcY04jaYD7FpJC5JTXHYRbkzg==" }, "bluebird": { - "version": "3.5.4", - "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.4.tgz", - "integrity": "sha512-FG+nFEZChJrbQ9tIccIfZJBz3J7mLrAhxakAbnrJWn8d7aKOC+LWifa0G+p4ZqKp4y13T7juYvdhq9NzKdsrjw==" + "version": "3.5.5", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.5.tgz", + "integrity": "sha512-5am6HnnfN+urzt4yfg7IgTbotDjIT/u8AJpEt0sIU9FtXfVeezXAPKswrG+xKUCOYAINpSdgZVDU6QFh+cuH3w==" }, "brace-expansion": { "version": "1.1.11", @@ -2055,21 +2137,21 @@ "integrity": "sha512-82RPeneC6nqCdSwCX2hZUz3JPOvN5at/nTEw/CMf05Smu3Hrpo9Psb7LjN+k+XndNArG1EY8L4+BM3aTM4BCvw==" }, "cacache": { - "version": "11.3.2", - "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.2.tgz", - "integrity": "sha512-E0zP4EPGDOaT2chM08Als91eYnf8Z+eH1awwwVsngUmgppfM5jjJ8l3z5vO5p5w/I3LsiXawb1sW0VY65pQABg==", + "version": "11.3.3", + "resolved": "https://registry.npmjs.org/cacache/-/cacache-11.3.3.tgz", + "integrity": "sha512-p8WcneCytvzPxhDvYp31PD039vi77I12W+/KfR9S8AZbaiARFBCpsPJS+9uhWfeBfeAtW7o/4vt3MUqLkbY6nA==", "requires": { - "bluebird": "^3.5.3", + "bluebird": "^3.5.5", "chownr": "^1.1.1", "figgy-pudding": "^3.5.1", - "glob": "^7.1.3", + "glob": "^7.1.4", "graceful-fs": "^4.1.15", "lru-cache": "^5.1.1", "mississippi": "^3.0.0", "mkdirp": "^0.5.1", "move-concurrently": "^1.0.1", "promise-inflight": "^1.0.1", - "rimraf": "^2.6.2", + "rimraf": "^2.6.3", "ssri": "^6.0.1", "unique-filename": "^1.1.1", "y18n": "^4.0.0" @@ -2426,9 +2508,9 @@ "integrity": "sha512-K4avzGMLm5Xw0Ek/6eE3vdOXkqnpf9ydb68XYmCc16cJ99XMMbc2oaNMuPwAsxVK6CC1yA4/I90EhmWNj0Q6HA==" }, "conventional-changelog-writer": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.5.tgz", - "integrity": "sha512-g/Myp4MaJ1A+f7Ai+SnVhkcWtaHk6flw0SYN7A+vQ+MTu0+gSovQWs4Pg4NtcNUcIztYQ9YHsoxHP+GGQplI7Q==", + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/conventional-changelog-writer/-/conventional-changelog-writer-4.0.6.tgz", + "integrity": "sha512-ou/sbrplJMM6KQpR5rKFYNVQYesFjN7WpNGdudQSWNi6X+RgyFUcSv871YBYkrUYV9EX8ijMohYVzn9RUb+4ag==", "requires": { "compare-func": "^1.3.1", "conventional-commits-filter": "^2.0.2", @@ -2437,11 +2519,16 @@ "json-stringify-safe": "^5.0.1", "lodash": "^4.2.1", "meow": "^4.0.0", - "semver": "^5.5.0", + "semver": "^6.0.0", "split": "^1.0.0", "through2": "^3.0.0" }, "dependencies": { + "semver": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.1.1.tgz", + "integrity": "sha512-rWYq2e5iYW+fFe/oPPtYJxYgjBm8sC4rmoGdUOgBB7VnwKt6HrL793l2voH1UlsyYZpJ4g0wfjnTEO1s1NP2eQ==" + }, "through2": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/through2/-/through2-3.0.1.tgz", @@ -2462,12 +2549,12 @@ } }, "conventional-commits-parser": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.2.tgz", - "integrity": "sha512-y5eqgaKR0F6xsBNVSQ/5cI5qIF3MojddSUi1vKIggRkqUTbkqFKH9P5YX/AT1BVZp9DtSzBTIkvjyVLotLsVog==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/conventional-commits-parser/-/conventional-commits-parser-3.0.3.tgz", + "integrity": "sha512-KaA/2EeUkO4bKjinNfGUyqPTX/6w9JGshuQRik4r/wJz7rUw3+D3fDG6sZSEqJvKILzKXFQuFkpPLclcsAuZcg==", "requires": { "JSONStream": "^1.0.4", - "is-text-path": "^1.0.0", + "is-text-path": "^2.0.0", "lodash": "^4.2.1", "meow": "^4.0.0", "split2": "^2.0.0", @@ -2512,9 +2599,9 @@ } }, "readable-stream": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.3.0.tgz", - "integrity": "sha512-EsI+s3k3XsW+fU8fQACLN59ky34AZ14LoeVZpYwmZvldCFo0r0gnelwF2TcMjLor/BTL5aDJVBMkss0dthToPw==", + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.4.0.tgz", + "integrity": "sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ==", "requires": { "inherits": "^2.0.3", "string_decoder": "^1.1.1", @@ -2556,13 +2643,13 @@ "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" }, "cosmiconfig": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.0.tgz", - "integrity": "sha512-nxt+Nfc3JAqf4WIWd0jXLjTJZmsPLrA9DDc4nRw2KFJQJK7DNooqSXrNI7tzLG50CF8axczly5UV929tBmh/7g==", + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-5.2.1.tgz", + "integrity": "sha512-H65gsXo1SKjf8zmrJ67eJk8aIRKV5ff2D4uKZIBZShbhGSpEmsQOPW/SKMKYhSTrqR7ufy6RP69rPogdaPh/kA==", "requires": { "import-fresh": "^2.0.0", "is-directory": "^0.3.1", - "js-yaml": "^3.13.0", + "js-yaml": "^3.13.1", "parse-json": "^4.0.0" } }, @@ -2704,9 +2791,9 @@ "dev": true }, "deepmerge": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.2.0.tgz", - "integrity": "sha512-6+LuZGU7QCNUnAJyX8cIrlzoEgggTM6B7mm+znKOX4t5ltluT9KLjN6g61ECMS0LTsLW7yDpNoxhix5FZcrIow==" + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-3.3.0.tgz", + "integrity": "sha512-GRQOafGHwMHpjPx9iCvTgpu9NojZ49q794EEL94JVEw6VaeA8XTUyBKvAkOOjBX9oJNiV6G3P+T+tihFjo2TqA==" }, "defaults": { "version": "1.0.3", @@ -2773,9 +2860,9 @@ "integrity": "sha1-hMbhWbgZBP3KWaDvRM2HDTElD5o=" }, "deprecation": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-1.0.1.tgz", - "integrity": "sha512-ccVHpE72+tcIKaGMql33x5MAjKQIZrk+3x2GbJ7TeraUCZWHoT+KSZpoC+JQFsUBlSTXUrBaGiF0j6zVTepPLg==" + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==" }, "detect-indent": { "version": "5.0.0", @@ -2924,9 +3011,9 @@ } }, "es6-promise": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.6.tgz", - "integrity": "sha512-aRVgGdnmW2OiySVPUC9e6m+plolMAJKjZnQlCwNSuK5yQ0JN61DZSO1X1Ufd1foqWRAlig0rhduTCHe7sVtK5Q==" + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", + "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==" }, "es6-promisify": { "version": "5.0.0", @@ -4832,9 +4919,9 @@ } }, "ms": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.1.tgz", - "integrity": "sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg==" + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==" } } }, @@ -5227,11 +5314,11 @@ } }, "is-text-path": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-1.0.1.tgz", - "integrity": "sha1-Thqg+1G/vLPpJogAE5cgLBd1tm4=", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-text-path/-/is-text-path-2.0.0.tgz", + "integrity": "sha512-+oDTluR6WEjdXEJMnC2z6A4FRwFoYuvShVVEGsS7ewc0UTi2QtAKMDJuL4BDEVt+5T7MjFo12RP8ghOM75oKJw==", "requires": { - "text-extensions": "^1.0.0" + "text-extensions": "^2.0.0" } }, "is-typedarray": { @@ -6218,9 +6305,9 @@ } }, "macos-release": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.2.0.tgz", - "integrity": "sha512-iV2IDxZaX8dIcM7fG6cI46uNmHUxHE4yN+Z8tKHAW1TBPMZDIKHf/3L+YnOuj/FK9il14UaVdHmiQ1tsi90ltA==" + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/macos-release/-/macos-release-2.3.0.tgz", + "integrity": "sha512-OHhSbtcviqMPt7yfw5ef5aghS2jzFVKEFyCJndQt2YpSQ9qRVSEv2axSJI1paVThEu+FFGs584h/1YhxjVqajA==" }, "make-dir": { "version": "1.3.0", @@ -6555,9 +6642,9 @@ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==" }, "node-fetch": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.5.0.tgz", - "integrity": "sha512-YuZKluhWGJwCcUu4RlZstdAxr8bFfOVHakc1mplwHkk8J+tqM1Y5yraYvIUpeX8aY7+crCwiELJq7Vl0o0LWXw==" + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==" }, "node-fetch-npm": { "version": "2.0.2", @@ -7917,6 +8004,16 @@ "requires": { "agent-base": "~4.2.1", "socks": "~2.3.2" + }, + "dependencies": { + "agent-base": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-4.2.1.tgz", + "integrity": "sha512-JVwXMr9nHYTUXsBFKUqhJwvlcYU/blreOEUkhNR2eXZIvwd+c+o5V4MgDPKWnMS/56awN3TRzIP+KoPn+roQtg==", + "requires": { + "es6-promisify": "^5.0.0" + } + } } }, "sort-keys": { @@ -8434,9 +8531,9 @@ } }, "text-extensions": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-1.9.0.tgz", - "integrity": "sha512-wiBrwC1EhBelW12Zy26JeOUkQ5mRu+5o8rpsJk5+2t+Y5vE7e842qtZDQ2g1NpX/29HdyFeJ4nSIhI47ENSxlQ==" + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/text-extensions/-/text-extensions-2.0.0.tgz", + "integrity": "sha512-F91ZqLgvi1E0PdvmxMgp+gcf6q8fMH7mhdwWfzXnl1k+GbpQDmi8l7DzLC5JTASKbwpY3TfxajAUzAXcv2NmsQ==" }, "text-table": { "version": "0.2.0", @@ -8614,6 +8711,14 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typedarray-to-buffer": { + "version": "3.1.5", + "resolved": "https://registry.npmjs.org/typedarray-to-buffer/-/typedarray-to-buffer-3.1.5.tgz", + "integrity": "sha512-zdu8XMNEDepKKR+XYOXAVPtWui0ly0NtohUscw+UmaHiAWT8hrV1rr//H6V+0DvJ3OQ19S979M0laLfX8rm82Q==", + "requires": { + "is-typedarray": "^1.0.0" + } + }, "uglify-js": { "version": "3.5.11", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.5.11.tgz", @@ -8683,9 +8788,9 @@ } }, "unique-slug": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.1.tgz", - "integrity": "sha512-n9cU6+gITaVu7VGj1Z8feKMmfAjEAQGhwD9fE3zvpRRa0wEIx8ODYkVGfSc94M2OX00tUFV8wH3zYbm1I8mxFg==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/unique-slug/-/unique-slug-2.0.2.tgz", + "integrity": "sha512-zoWr9ObaxALD3DOPfjPSqxt4fnZiWblxHIgeWqW8x7UqDzEtHEQLzji2cuJYQFCU6KmoJikOYAZlrTHHebjx2w==", "requires": { "imurmurhash": "^0.1.4" } diff --git a/package.json b/package.json index 34e08472925..089593ec6eb 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "ci": "npm test -- --ci --maxWorkers=2 && npm run integration -- --ci", "fix": "npm run lint -- --fix", "integration": "jest --config jest.integration.js --maxWorkers=2", - "lint": "eslint . --ignore-path .gitignore --cache --cache-location ./node_modules/.cache/eslint", + "lint": "eslint . --ignore-path .gitignore --ignore-pattern \"**/node_modules/\" --cache --cache-location ./node_modules/.cache/eslint", "pretest": "npm run lint", "test": "jest" },