Deprecation warnings (#1073)

* update complain
* use fallback location for deprecation if node does not have a position
This commit is contained in:
Michael Rawlings 2018-07-02 14:20:47 -07:00 committed by GitHub
parent 8e0cb388a7
commit c6a2bf2819
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 4 deletions

6
package-lock.json generated
View File

@ -1171,9 +1171,9 @@
"dev": true
},
"complain": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/complain/-/complain-1.2.0.tgz",
"integrity": "sha512-aP/MxFoYYVUZ8Xdih1vyaTSRiD99XLnlCloNre/UjFQFJkZ6YuMbGksi0jfxKeFOdlzm/6eE01vpJc99HiN/Mg==",
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/complain/-/complain-1.3.0.tgz",
"integrity": "sha512-PA9uGpaS4BXKrhFx3rl2nZMWySnGoW1pWf+dpBqNdDx3uR6PA0EPxjD17H9OxvW5w/bODBSziQ516Guf59rW+w==",
"requires": {
"error-stack-parser": "^2.0.1"
}

View File

@ -32,7 +32,7 @@
"argly": "^1.0.0",
"browser-refresh-client": "^1.0.0",
"char-props": "~0.1.5",
"complain": "^1.2.0",
"complain": "^1.3.0",
"deresolve": "^1.1.2",
"escodegen": "^1.8.1",
"esprima": "^4.0.0",

View File

@ -281,6 +281,8 @@ class CompileContext extends EventEmitter {
if (location != null) {
location = this.getPosInfo(location).toString();
} else {
location = this.filename;
}
complain(message, { location });