Skip to content

Commit e0c01e8

Browse files
committed
Give up on trying to upgrade users past 6.7.0
1 parent 758510a commit e0c01e8

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

src/constants.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ module.exports.defaultAddonBlueprintName = 'addon';
77
module.exports.glimmerPackageName = '@glimmer/blueprint';
88

99
module.exports.defaultTo = '*';
10+
11+
module.exports.EMBER_LEGACY_BLUEPRINT_VERSION = '6.7.0';

src/index.js

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,13 @@ const getBaseBlueprint = require('./get-base-blueprint');
2020
const chooseBlueprintUpdates = require('./choose-blueprint-updates');
2121
const getBlueprintFilePath = require('./get-blueprint-file-path');
2222
const resolvePackage = require('./resolve-package');
23-
const { defaultTo } = require('./constants');
23+
const {
24+
defaultTo,
25+
defaultAppBlueprintName,
26+
EMBER_LEGACY_BLUEPRINT_VERSION
27+
} = require('./constants');
2428
const normalizeBlueprintArgs = require('./normalize-blueprint-args');
29+
const semver = require('semver');
2530

2631
/**
2732
* If `version` attribute exists in the `blueprint` object and URL is empty, skip. Otherwise resolve the details of
@@ -211,6 +216,15 @@ module.exports = async function emberCliUpdate({
211216
let versions = await getVersions(packageName);
212217
let getTagVersion = _getTagVersion(versions, packageName);
213218
endBlueprint.version = await getTagVersion(to);
219+
220+
if (
221+
packageName === defaultAppBlueprintName &&
222+
semver.gt(endBlueprint.version, EMBER_LEGACY_BLUEPRINT_VERSION)
223+
) {
224+
throw new Error(
225+
`you cannot use ember-cli-update to automatically upgrade past ${EMBER_LEGACY_BLUEPRINT_VERSION}. Read the following documentation to find out how to proceed <link to somewhere> `
226+
);
227+
}
214228
}
215229

216230
let customDiffOptions = getStartAndEndCommands({

0 commit comments

Comments
 (0)