Use caret ^ dependencies instead of tilde ~ dependencies

I hope this may fix some problems with sourcemaps, by allowing to update
convert-source-map.

The decision to use ~ was explicit, and there was even a test in the
code which prevented the use of ^, added in ddfa437e34.
The rationale in 73689c7fc8 is:

    ^ operator in package.json is unnecessary and unfriendly to users

I disagree with that; let's hope I'm not wrong about that!
This commit is contained in:
Ran Benita
2017-05-28 18:40:42 +03:00
parent 0d5095dfcb
commit ea230ec3ce
3 changed files with 18 additions and 34 deletions
+3
View File
@@ -1,3 +1,6 @@
## v1.6.0 2017-05-28
* Switch from tilde ~ dependencies to ^ caret dependencies.
## v1.5.0 2017-04-29
* Support `export var varName = function($scope) { "ngInject"; }`.
* Support `/* @ngInject */ export [default] var varName = function [functionName]() {...}`.
+15 -15
View File
@@ -8,23 +8,23 @@
"url": "https://github.com/bluetech/ng-annotate-patched.git"
},
"dependencies": {
"acorn": "~5.0.3",
"alter": "~0.2.0",
"convert-source-map": "~1.1.2",
"optimist": "~0.6.1",
"simple-fmt": "~0.1.0",
"simple-is": "~0.2.0",
"source-map": "~0.5.3",
"stable": "~0.1.5",
"stringmap": "~0.2.2",
"stringset": "~0.2.1",
"tryor": "~0.1.2"
"acorn": "^5.0.3",
"alter": "^0.2.0",
"convert-source-map": "^1.1.2",
"optimist": "^0.6.1",
"simple-fmt": "^0.1.0",
"simple-is": "^0.2.0",
"source-map": "^0.5.3",
"stable": "^0.1.5",
"stringmap": "^0.2.2",
"stringset": "^0.2.1",
"tryor": "^0.1.2"
},
"devDependencies": {
"coffee-script": "~1.10.0",
"defs": "~1.1.1",
"diff": "~2.2.1",
"find-line-column": "~0.5.2"
"coffee-script": "^1.10.0",
"defs": "^1.1.1",
"diff": "^2.2.1",
"find-line-column": "^0.5.2"
},
"keywords": [
"angular",
-19
View File
@@ -163,25 +163,6 @@ function run(ngAnnotate) {
test(adf, ngAnnotate(adfAnnotated, {remove: true, plugin: [ngAnnotateAdfPlugin]}).src, "optionals/angular-dashboard-framework.js");
if (fs.existsSync("package.json")) {
console.log("testing package.json")
try {
const json = JSON.parse(slurp("package.json"));
const substr = JSON.stringify({
dependencies: json.dependencies,
devDependencies: json.devDependencies,
}, null, 4);
if (/\^/g.test(substr)) {
console.error("package.json error: shouldn't use the ^ operator");
console.error(substr);
process.exit(-1);
}
} catch (e) {
console.error("package.json error: invalid json");
process.exit(-1);
}
}
if (fs.existsSync("tests/angular.js")) {
console.log("testing performance");
const ng1 = String(fs.readFileSync("tests/angular.js"));