Skip to content

Use NodeErrorOptions directly from the postcss types #133

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions lib/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
*/

import * as postcss from "postcss";
import * as postcssNode from "postcss/lib/node";

// Even though the concrete classes extend PostCSS classes, we can't extend
// PostCSS Node types here because they refer to statements that aren't
Expand All @@ -32,7 +31,7 @@ export interface NodeBase {
toString(stringifier?: Stringifier | Syntax): string;
error(
message: string,
options?: postcssNode.NodeErrorOptions
options?: postcss.NodeErrorOptions
): postcss.CssSyntaxError;
warn(
result: postcss.Result,
Expand Down
44 changes: 11 additions & 33 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"lint-staged": "^10.4.0",
"nyc": "^15.1.0",
"perfy": "^1.1.5",
"postcss": "^8.0.9",
"postcss": "^8.2.9",
"postcss-value-parser": "^4.1.0",
"pre-commit": "^1.2.2",
"prettier": "^2.1.2",
Expand All @@ -53,7 +53,7 @@
"typescript": "^4.2.3"
},
"peerDependencies": {
"postcss": "^8.0.9"
"postcss": "^8.2.9"
},
"keywords": [
"css",
Expand Down
5 changes: 3 additions & 2 deletions test/snapshots/atword.test.js.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ Generated by [AVA](https://avajs.dev).
source: {
input: Input {
css: ' @word ',
fromOffset: Function {},
hasBOM: false,
id: '<input css 1>',
[Symbol(fromOffset cache)]: [
0,
],
},
start: {
column: 3,
Expand All @@ -39,7 +41,6 @@ Generated by [AVA](https://avajs.dev).
},
},
type: 'atword',
[Symbol(isComplete)]: false,
[Symbol(isClean)]: false,
},
]
Binary file modified test/snapshots/atword.test.js.snap
Binary file not shown.
Loading