Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 49 additions & 0 deletions docs/upgrading-past-6-7.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Upgrading your Ember project past 6.7

`ember-cli@6.7.0` is the first release to publish the default app blueprint as
its own package [@ember-tooling/classic-build-app-blueprint][npm].

[npm]: https://www.npmjs.com/package/@ember-tooling/classic-build-app-blueprint

Starting with `ember@6.8`, creating an Ember application will use the new
Vite-based blueprint and build process.

## Moving to the new classic app blueprint

If you want to stay with the classic build process, you will need to update
`config/ember-cli-update.json` and replace the base blueprint:

```diff
@@ -2,13 +2,11 @@
{
"schemaVersion": "1.0.0",
"packages": [
{
- "name": "ember-cli",
- "version": "6.7.0",
+ "name": "@ember-tooling/classic-build-app-blueprint",
+ "version": "6.7.1",
"blueprints": [
{
- "name": "app",
- "outputRepo": "https://github.com/ember-cli/ember-new-output",
- "codemodsSource": "ember-app-codemods-manifest@1",
+ "name": "@ember-tooling/classic-build-app-blueprint",
"isBaseBlueprint": true,
"options": [
"--ci-provider=github"
]
}
]
}
]
}
```

Re-run `ember-cli-update` after that.

## Moving to Vite

Use [ember-vite-codemod][mod] to upgrade your project.

[mod]: https://github.com/mainmatter/ember-vite-codemod/
19 changes: 18 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,13 @@ const getBaseBlueprint = require('./get-base-blueprint');
const chooseBlueprintUpdates = require('./choose-blueprint-updates');
const getBlueprintFilePath = require('./get-blueprint-file-path');
const resolvePackage = require('./resolve-package');
const { defaultTo } = require('./constants');
const {
defaultTo,
defaultPackageName,
defaultAppBlueprintName
} = require('./constants');
const normalizeBlueprintArgs = require('./normalize-blueprint-args');
const semver = require('semver');

/**
* If `version` attribute exists in the `blueprint` object and URL is empty, skip. Otherwise resolve the details of
Expand Down Expand Up @@ -211,6 +216,18 @@ module.exports = async function emberCliUpdate({
let versions = await getVersions(packageName);
let getTagVersion = _getTagVersion(versions, packageName);
endBlueprint.version = await getTagVersion(to);

if (
packageName === defaultPackageName &&
endBlueprint.name === defaultAppBlueprintName &&
semver.gte(endBlueprint.version, '6.8.0')
) {
console.log(
`You cannot use ember-cli-update to automatically upgrade past 6.7. Read the following documentation to find out how to proceed: https://github.com/ember-cli/ember-cli-update/blob/master/docs/upgrading-past-6-7-0.md `
);

process.exit(1);
}
}

let customDiffOptions = getStartAndEndCommands({
Expand Down