From 474f0a2184f3da62767d21de4a0b6ec149cd3d3f Mon Sep 17 00:00:00 2001 From: Daniel Lockyer Date: Mon, 24 Feb 2020 18:01:53 +0000 Subject: [PATCH] Updated semver dependency no issue - required code change for new API --- core/frontend/services/themes/engines/create.js | 4 ++-- package.json | 2 +- yarn.lock | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/core/frontend/services/themes/engines/create.js b/core/frontend/services/themes/engines/create.js index c1aa51abb5..c4716389fc 100644 --- a/core/frontend/services/themes/engines/create.js +++ b/core/frontend/services/themes/engines/create.js @@ -33,12 +33,12 @@ module.exports = (packageJson) => { if (version === 'canary') { availableApiVersions.canary = version; } else { - availableApiVersions[semver(semver.coerce(version).version).major] = version; + availableApiVersions[semver.major(semver.coerce(version).version)] = version; } }); const apiVersion = packageJson.engines['ghost-api']; - const apiVersionMajor = apiVersion === 'canary' ? 'canary' : semver(semver.coerce(apiVersion).version).major; + const apiVersionMajor = apiVersion === 'canary' ? 'canary' : semver.major(semver.coerce(apiVersion).version); if (availableApiVersions[apiVersionMajor]) { packageJson.engines['ghost-api'] = availableApiVersions[apiVersionMajor]; diff --git a/package.json b/package.json index 5076bff11e..d650495450 100644 --- a/package.json +++ b/package.json @@ -122,7 +122,7 @@ "probe-image-size": "5.0.0", "rss": "1.2.2", "sanitize-html": "1.22.0", - "semver": "6.3.0", + "semver": "7.1.3", "simple-dom": "0.3.2", "simple-html-tokenizer": "0.5.9", "uuid": "3.4.0", diff --git a/yarn.lock b/yarn.lock index 93836cf628..10ad77d910 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7906,16 +7906,16 @@ secure-keys@^1.0.0: resolved "https://registry.yarnpkg.com/semver/-/semver-5.7.1.tgz#a954f931aeba508d307bbf069eff0c01c96116f7" integrity sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ== -semver@6.3.0, semver@^6.0.0, semver@^6.1.2: - version "6.3.0" - resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" - integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== - -semver@^7.1.3: +semver@7.1.3, semver@^7.1.3: version "7.1.3" resolved "https://registry.yarnpkg.com/semver/-/semver-7.1.3.tgz#e4345ce73071c53f336445cfc19efb1c311df2a6" integrity sha512-ekM0zfiA9SCBlsKa2X1hxyxiI4L3B6EbVJkkdgQXnSEEaHlGdvyodMruTiulSRWMMB4NeIuYNMC9rTKTz97GxA== +semver@^6.0.0, semver@^6.1.2: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + send@0.17.1: version "0.17.1" resolved "https://registry.yarnpkg.com/send/-/send-0.17.1.tgz#c1d8b059f7900f7466dd4938bdc44e11ddb376c8"