Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ember-cli-update

Package Overview
Dependencies
Maintainers
1
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ember-cli-update - npm Package Compare versions

Comparing version 0.2.3 to 0.3.0

7

bin/ember-cli-update.js

@@ -9,11 +9,10 @@ #!/usr/bin/env node

.options(args)
.version()
.help()
.argv;
const distTag = argv['dist-tag'];
const version = argv['version'];
const to = argv['to'];
emberCliUpdate({
distTag,
version
to
});
{
"name": "ember-cli-update",
"version": "0.2.3",
"version": "0.3.0",
"description": "Update Ember CLI Ember.js apps and addons",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -9,1 +9,37 @@ # ember-cli-update

Update Ember CLI Ember.js apps and addons
## Installation
As a global executable:
`npm install -g ember-cli-update`
As an Ember CLI command:
`ember install ember-cli-update`
## Usage
Inside your project directory, either run
`ember-cli-update`
for global or
`ember update`
as an Ember CLI command.
This will update your app or addon to the latest Ember CLI version. It does this by grabbing your current installed Ember CLI version and looking up the latest version, then applying a diff of the changes to your project. You will probably encounter merge conflicts, in which your system's git merge tool will run.
## Options
| Option | Description | Examples | Default |
|---|---|---|---|
| --to | Update to a version that isn\'t latest | "2.14.1" "latest" "beta" | latest |
## Hints
If you notice ".orig" files lying around after a merge and don't want that behavior, run `git config mergetool.keepBackup false`.
To avoid being prompted "Hit return to start merge resolution tool (vimdiff):" for every conflict, set a merge tool like `git config merge.tool "vimdiff"`.
module.exports = {
'dist-tag': {
'to': {
type: 'string',
default: 'latest',
description: 'Update via dist-tag ("latest", "beta", etc...)'
},
'version': {
alias: ['v'],
type: 'string',
description: 'Update to a version that isn\'t latest'
description: 'Update to a version that isn\'t latest ("2.14.1", latest", "beta")'
}
};

@@ -13,12 +13,6 @@ 'use strict';

{
name: 'dist-tag',
description: args['dist-tag'].description,
name: 'to',
description: args['to'].description,
type: String,
default: args['dist-tag'].default
},
{
name: 'version',
description: args['version'].description,
type: String,
aliases: args['version'].alias
default: args['to'].default
}

@@ -25,0 +19,0 @@ ],

@@ -5,3 +5,16 @@ 'use strict';

module.exports = function getTagVersion(version, distTag) {
const distTags = [
'latest',
'beta'
];
module.exports = function getTagVersion(to) {
let distTag;
let version;
if (distTags.indexOf(to) > -1) {
distTag = to;
} else {
version = to;
}
if (!version) {

@@ -8,0 +21,0 @@ version = JSON.parse(

@@ -10,4 +10,3 @@ 'use strict';

module.exports = function emberCliUpdate(options) {
let distTag = options.distTag;
let version = options.version;
let to = options.to;

@@ -19,3 +18,3 @@ let packageVersion = getPackageVersion('.');

let endTag = getTagVersion(version, distTag);
let endTag = getTagVersion(to);

@@ -22,0 +21,0 @@ let projectType = getProjectType('.');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc