srvance / ember-cli-build-config-editor Goto Github PK
View Code? Open in Web Editor NEWUtility for ember blueprints to use to modify ember-cli-build.js
Utility for ember blueprints to use to modify ember-cli-build.js
I noticed this stack trace while perusing #-ember-cli channel in community slack, and figured I could report here with some details.
The default pattern of ember-cli-build.js
is well tested:
module.exports = function(defaults) {
var app = new EmberApp(defaults, {
// Add options here
});
return app.toTree();
});
However, some users move the config to a stand alone object like:
module.exports = function(defaults) {
var config = {
'some-things': { enabled: true }
};
var app = new EmberApp(defaults, config);
return app.toTree();
});
Doing the above throws an error:
$ ember generate ember-bootstrap
installing ember-bootstrap
Installing for Bootstrap 3 using preprocessor sass
install package bootstrap-sass
NPM: Installed bootstrap-sass@^3.3.7
Added import statement to app/styles/app.scss
Added ember-bootstrap configuration to ember-cli-build.js
Cannot read property 'properties' of undefined
TypeError: Cannot read property 'properties' of undefined
at EmberBuildConfigEditor.findOrAddConfigKey (~/projects/expel-ember/node_modules/ember-cli-build-config-editor/lib/build-config-editor.js:52:36)
at EmberBuildConfigEditor.edit (~/projects/expel-ember/node_modules/ember-cli-build-config-editor/lib/build-config-editor.js:95:40)
at Class.addBuildConfiguration (~/projects/expel-ember/node_modules/ember-bootstrap/blueprints/ember-bootstrap/index.js:193:28)
at adjustBootstrapDependencies.then.then.then (~/projects/expel-ember/node_modules/ember-bootstrap/blueprints/ember-bootstrap/index.js:73:24)
at tryCatch (~/projects/expel-ember/node_modules/rsvp/dist/rsvp.js:538:12)
at invokeCallback (~/projects/expel-ember/node_modules/rsvp/dist/rsvp.js:553:13)
at publish (~/projects/expel-ember/node_modules/rsvp/dist/rsvp.js:521:7)
at flush (~/projects/expel-ember/node_modules/rsvp/dist/rsvp.js:2373:5)
at _combinedTickCallback (internal/process/next_tick.js:67:7)
at process._tickCallback (internal/process/next_tick.js:98:9)
As a general rule, it seems good to handle any errors during parsing/updating and leave the ember-cli-build.js
untouched, but print a detailed message to the console with what the user should add/change manually to their ember-cli-build.js
. Something like:
Could not automatically update `ember-cli-build.js`. Please add the following configuration manually:
var app = new EmberApp(defaults, {
'ember-bootstrap': {
stuff: 'here'
}
});
Branch | Build failing 🚨 |
---|---|
Dependency | mocha |
Current Version | 3.3.0 |
Type | devDependency |
This version is covered by your current version range and after updating it in your project the build failed.
As mocha is “only” a devDependency of this project it might not break production or downstream projects, but “only” your build or test tools – preventing new deploys or publishes.
I recommend you give this issue a high priority. I’m sure you can resolve this 💪
Mocha is now moving to a quicker release schedule: when non-breaking changes are merged, a release should happen that week.
This week's highlights:
allowUncaught
added to commandline as --allow-uncaught
(and bugfixed)--no-warnings
and --trace-warnings
flags (@sonicdoe)The new version differs by 9 commits0.
7554b31
Add Changelog for v3.4.0
9f7f7ed
Add --trace-warnings
flag
92561c8
Add --no-warnings
flag
ceee976
lint test/integration/fixtures/simple-reporter.js
dcfc094
Revert "use semistandard
directly"
93392dd
no special case for macOS running Karma locally
4d1d91d
--allow-uncaught cli option
fb1e083
fix allowUncaught in browser
4ed3fc5
Add license report and scan status
false
See the full diff
There is a collection of frequently asked questions and of course you may always ask my humans.
Your Greenkeeper Bot 🌴
ember-bootstrap/ember-bootstrap#393 wants to add array values to support tree-shaking, which requires some additional support here.
To see what happens to your code in Node.js 10, Greenkeeper has created a branch with the following changes:
.travis.yml
If you’re interested in upgrading this repo to Node.js 10, you can open a PR with these changes. Please note that this issue is just intended as a friendly reminder and the PR as a possible starting point for getting your code running on Node.js 10.
Greenkeeper has checked the engines
key in any package.json
file, the .nvmrc
file, and the .travis.yml
file, if present.
engines
was only updated if it defined a single version, not a range..nvmrc
was updated to Node.js 10.travis.yml
was only changed if there was a root-level node_js
that didn’t already include Node.js 10, such as node
or lts/*
. In this case, the new version was appended to the list. We didn’t touch job or matrix configurations because these tend to be quite specific and complex, and it’s difficult to infer what the intentions were.For many simpler .travis.yml
configurations, this PR should suffice as-is, but depending on what you’re doing it may require additional work or may not be applicable at all. We’re also aware that you may have good reasons to not update to Node.js 10, which is why this was sent as an issue and not a pull request. Feel free to delete it without comment, I’m a humble robot and won’t feel rejected 🤖
There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.
Your Greenkeeper Bot 🌴
Allow the configuration key and properties to use identifiers instead of literals when feasible. In normal terms, allow for unquoted property keys rather than the safe but more verbose quoted keys we use now.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.