mirror of
https://github.com/marko-js/marko.git
synced 2025-12-08 19:26:05 +00:00
Deprecation warnings (#1073)
* update complain * use fallback location for deprecation if node does not have a position
This commit is contained in:
parent
8e0cb388a7
commit
c6a2bf2819
6
package-lock.json
generated
6
package-lock.json
generated
@ -1171,9 +1171,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"complain": {
|
"complain": {
|
||||||
"version": "1.2.0",
|
"version": "1.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/complain/-/complain-1.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/complain/-/complain-1.3.0.tgz",
|
||||||
"integrity": "sha512-aP/MxFoYYVUZ8Xdih1vyaTSRiD99XLnlCloNre/UjFQFJkZ6YuMbGksi0jfxKeFOdlzm/6eE01vpJc99HiN/Mg==",
|
"integrity": "sha512-PA9uGpaS4BXKrhFx3rl2nZMWySnGoW1pWf+dpBqNdDx3uR6PA0EPxjD17H9OxvW5w/bODBSziQ516Guf59rW+w==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"error-stack-parser": "^2.0.1"
|
"error-stack-parser": "^2.0.1"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,7 +32,7 @@
|
|||||||
"argly": "^1.0.0",
|
"argly": "^1.0.0",
|
||||||
"browser-refresh-client": "^1.0.0",
|
"browser-refresh-client": "^1.0.0",
|
||||||
"char-props": "~0.1.5",
|
"char-props": "~0.1.5",
|
||||||
"complain": "^1.2.0",
|
"complain": "^1.3.0",
|
||||||
"deresolve": "^1.1.2",
|
"deresolve": "^1.1.2",
|
||||||
"escodegen": "^1.8.1",
|
"escodegen": "^1.8.1",
|
||||||
"esprima": "^4.0.0",
|
"esprima": "^4.0.0",
|
||||||
|
|||||||
@ -281,6 +281,8 @@ class CompileContext extends EventEmitter {
|
|||||||
|
|
||||||
if (location != null) {
|
if (location != null) {
|
||||||
location = this.getPosInfo(location).toString();
|
location = this.getPosInfo(location).toString();
|
||||||
|
} else {
|
||||||
|
location = this.filename;
|
||||||
}
|
}
|
||||||
|
|
||||||
complain(message, { location });
|
complain(message, { location });
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user