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
16 changes: 4 additions & 12 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ module.exports = {
env: {
es6: true
},
extends: [
'sane-node'
],
extends: ['sane-node', 'prettier'],
overrides: [
{
files: ['bin/**/*.js'],
Expand All @@ -19,18 +17,12 @@ module.exports = {
}
},
{
files: [
'test/**/*-test.js'
],
files: ['test/**/*-test.js'],
env: {
mocha: true
},
plugins: [
'mocha'
],
extends: [
'plugin:mocha/recommended'
],
plugins: ['mocha'],
extends: ['plugin:mocha/recommended'],
rules: {
'mocha/no-exclusive-tests': 'error',
'mocha/no-empty-description': 'off',
Expand Down
8 changes: 4 additions & 4 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
If you are submitting a bug report, please run your command with the debug flag:

* Unix (global): `DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember-cli-update ...`
* Windows (global): `set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update ...`
* Unix (command): `DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember update ...`
* Windows (command): `set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember update ...`
- Unix (global): `DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember-cli-update ...`
- Windows (global): `set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update ...`
- Unix (command): `DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember update ...`
- Windows (command): `set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember update ...`

and post the console output in the block below:

Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'

- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 3 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
test/fixtures/**
pnpm-lock.yaml
CHANGELOG.md
8 changes: 2 additions & 6 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,15 @@
"env": {
"DEBUG": "ember-cli-update,boilerplate-update,git-diff-apply"
},
"skipFiles": [
"<node_internals>/**"
],
"skipFiles": ["<node_internals>/**"],
"outputCapture": "std"
},
{
"type": "node",
"request": "attach",
"name": "Attach",
"port": 9229,
"skipFiles": [
"<node_internals>/**"
]
"skipFiles": ["<node_internals>/**"]
}
]
}
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
Update [Ember CLI](https://ember-cli.com/) projects

The 2 use cases are:

1. Updating a project's boilerplate code from an older Ember version to a newer one like 3.4.0 to 3.20.0 for example. These are called base blueprints and there are 3 types officially provided by ember-cli: `app`, `addon`, and `glimmer`.
- This is different from the existing `ember init` command. That command tries to reset your project back to a brand new project. It removes all your changes and additions.
2. Updating boilerplate code for a blueprint from an Ember addon from an older version to a newer one. These are called custom blueprints.
Expand Down Expand Up @@ -315,8 +316,8 @@ And then you're done! You have a freshly updated app (or addon). As noted, you c

Need help using `git mergetool`? Here are some starting points:

* https://git-scm.com/docs/git-mergetool
* https://gist.github.com/karenyyng/f19ff75c60f18b4b8149
- https://git-scm.com/docs/git-mergetool
- https://gist.github.com/karenyyng/f19ff75c60f18b4b8149

If you made a mistake during the update/conflict resolution, run these commands to undo everything and get you back to before the update:

Expand All @@ -335,9 +336,9 @@ If you run into an error like `error: unrecognized input`, you may need to updat

If you are getting an error or unexpected results, running the command with the debug flag:

* Unix (global):&nbsp;&nbsp;&nbsp;`DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember-cli-update`
* Windows (global):&nbsp;&nbsp;&nbsp;`set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update`
* Unix (command):&nbsp;&nbsp;&nbsp;`DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember update`
* Windows (command):&nbsp;&nbsp;&nbsp;`set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember update`
- Unix (global):&nbsp;&nbsp;&nbsp;`DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember-cli-update`
- Windows (global):&nbsp;&nbsp;&nbsp;`set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember-cli-update`
- Unix (command):&nbsp;&nbsp;&nbsp;`DEBUG=ember-cli-update,boilerplate-update,git-diff-apply ember update`
- Windows (command):&nbsp;&nbsp;&nbsp;`set DEBUG=ember-cli-update,boilerplate-update,git-diff-apply && ember update`

will give you more detailed logging.
16 changes: 8 additions & 8 deletions RELEASE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,24 @@ guiding principle here is that changelogs are for humans, not machines.

When reviewing merged PR's the labels to be used are:

* breaking - Used when the PR is considered a breaking change.
* enhancement - Used when the PR adds a new feature or enhancement.
* bug - Used when the PR fixes a bug included in a previous release.
* documentation - Used when the PR adds or updates documentation.
* internal - Used for internal changes that still require a mention in the
- breaking - Used when the PR is considered a breaking change.
- enhancement - Used when the PR adds a new feature or enhancement.
- bug - Used when the PR fixes a bug included in a previous release.
- documentation - Used when the PR adds or updates documentation.
- internal - Used for internal changes that still require a mention in the
changelog/release notes.

## Release

Once the prep work is completed, the actual release is straight forward:

* First, ensure that you have installed your projects dependencies:
- First, ensure that you have installed your projects dependencies:

```sh
npm install
```

* Second, ensure that you have obtained a
- Second, ensure that you have obtained a
[GitHub personal access token][generate-token] with the `repo` scope (no
other permissions are needed). Make sure the token is available as the
`GITHUB_AUTH` environment variable.
Expand All @@ -47,7 +47,7 @@ npm install

[generate-token]: https://github.com/settings/tokens/new?scopes=repo&description=GITHUB_AUTH+env+variable

* And last (but not least 😁) do your release.
- And last (but not least 😁) do your release.

```sh
npx release-it
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
environment:
matrix:
- nodejs_version: "14"
DEBUG: "ember-cli-update,boilerplate-update,git-diff-apply"
- nodejs_version: '14'
DEBUG: 'ember-cli-update,boilerplate-update,git-diff-apply'

branches:
only:
Expand Down
11 changes: 4 additions & 7 deletions bin/ember-cli-update.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
#!/usr/bin/env node
'use strict';

require('yargs')
.commandDir('commands')
.parserConfiguration({
'populate--': true,
'unknown-options-as-args': true
})
.argv;
require('yargs').commandDir('commands').parserConfiguration({
'populate--': true,
'unknown-options-as-args': true
}).argv;

// Displays a message on the terminal if a new version of the package is available.
const updateNotifier = require('update-notifier');
Expand Down
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"src"
],
"scripts": {
"lint": "eslint . --ext js,json",
"lint": "eslint . --ext js,json && prettier --check .",
"lint:fix": "eslint . --ext js,json --fix && prettier --write .",
"start": "node bin/ember-cli-update",
"test": "mocha",
"test:bin": "mocha --config .mocharc.bin.js",
Expand Down Expand Up @@ -56,6 +57,7 @@
"chai-string": "^1.5.0",
"ember-cli": "3.16.0",
"eslint": "^8.16.0",
"eslint-config-prettier": "^10.1.8",
"eslint-config-sane": "^1.0.2",
"eslint-config-sane-node": "^1.1.1",
"eslint-plugin-json-files": "^1.3.0",
Expand All @@ -66,6 +68,7 @@
"git-fixtures": "^6.0.0",
"mocha": "^10.0.0",
"mocha-helpers": "^6.2.1",
"prettier": "^3.6.2",
"release-it": "^15.5.0",
"renovate-config-standard": "2.1.2",
"sinon": "^14.0.0",
Expand Down
23 changes: 23 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions prettier.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
singleQuote: true,
trailingComma: 'none',
tabWidth: 2,
semi: true,
printWidth: 80,
bracketSpacing: true,
arrowParens: 'avoid'
};
8 changes: 2 additions & 6 deletions renovate.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
{
"extends": [
"standard"
],
"ignoreDeps": [
"ember-cli"
]
"extends": ["standard"],
"ignoreDeps": ["ember-cli"]
}
23 changes: 14 additions & 9 deletions src/args.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,24 @@ module.exports = {
'package-name': {
alias: ['package', 'p'],
type: 'string',
description: 'Provide a package that can contain many blueprints ("@glimmer/blueprint", "git+https://git@github.com/tildeio/libkit.git", "../blueprint")'
description:
'Provide a package that can contain many blueprints ("@glimmer/blueprint", "git+https://git@github.com/tildeio/libkit.git", "../blueprint")'
},
'blueprint': {
blueprint: {
alias: ['b'],
type: 'string',
description: 'Provide a custom blueprint for use in the update ("@glimmer/blueprint", "git+https://git@github.com/tildeio/libkit.git", "../blueprint")'
description:
'Provide a custom blueprint for use in the update ("@glimmer/blueprint", "git+https://git@github.com/tildeio/libkit.git", "../blueprint")'
},
'from': {
from: {
type: 'string',
description: 'Use a starting version that is different than what is in your package.json ("2.9.1")'
description:
'Use a starting version that is different than what is in your package.json ("2.9.1")'
},
'to': {
to: {
type: 'string',
description: 'Update to a version that isn\'t latest ("2.14.1", "~2.15", "latest", "beta")'
description:
'Update to a version that isn\'t latest ("2.14.1", "~2.15", "latest", "beta")'
},
'resolve-conflicts': {
type: 'boolean',
Expand All @@ -31,13 +35,14 @@ module.exports = {
},
'codemods-source': {
type: 'string',
description: 'Supply your own codemods manifest via URL ("ember-app-codemods-manifest@*", "git+https://github.com/ember-cli/ember-app-codemods-manifest.git#semver:*")'
description:
'Supply your own codemods manifest via URL ("ember-app-codemods-manifest@*", "git+https://github.com/ember-cli/ember-app-codemods-manifest.git#semver:*")'
},
'codemods-json': {
type: 'string',
description: 'Supply your own codemods manifest via JSON (`{ /* json */ }`)'
},
'reset': {
reset: {
type: 'boolean',
default: false,
description: 'Reset your code to the default blueprint at the new version'
Expand Down
4 changes: 1 addition & 3 deletions src/bootstrap.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ const saveBlueprint = require('./save-blueprint');
const loadDefaultBlueprintFromDisk = require('./load-default-blueprint-from-disk');
const getBlueprintFilePath = require('./get-blueprint-file-path');

module.exports = async function bootstrap({
cwd = process.cwd()
} = {}) {
module.exports = async function bootstrap({ cwd = process.cwd() } = {}) {
let emberCliUpdateJsonPath = await getBlueprintFilePath(cwd);

let blueprint = await loadDefaultBlueprintFromDisk({ cwd });
Expand Down
Loading
Loading