Skip to content

Commit ea9f7be

Browse files
Bump postcss from 8.5.5 to 8.5.6 in /pkg/sass-parser (#2607)
* Bump postcss from 8.5.5 to 8.5.6 in /pkg/sass-parser Bumps [postcss](https://github.com/postcss/postcss) from 8.5.5 to 8.5.6. - [Release notes](https://github.com/postcss/postcss/releases) - [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md) - [Commits](postcss/postcss@8.5.5...8.5.6) --- updated-dependencies: - dependency-name: postcss dependency-version: 8.5.6 dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> * fix type for StatementWithChildren * work around type limitation for the Declaration node type * use unknown instead of any to forcefully cast a Declaration as a StatementWithChildren --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Carlos (Goodwine) <[email protected]>
1 parent ff1847b commit ea9f7be

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

pkg/sass-parser/lib/src/statement/declaration.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
} from '.';
2525
import {_DeclarationWithChildren} from './declaration-internal';
2626
import * as sassParser from '../..';
27+
import {ContainerWithChildren} from 'postcss/lib/container';
2728

2829
// TODO(nweiz): Make sure setting non-identifier strings for prop here and name
2930
// in GenericAtRule escapes properly.
@@ -247,6 +248,8 @@ export class Declaration
247248

248249
/** @hidden */
249250
normalize(node: NewNode, sample?: postcss.Node): ChildNode[] {
250-
return normalize(this as StatementWithChildren, node, sample);
251+
// Casting is necessary because `_Declaration` can't extend
252+
// `ContainerWithChildren` because it is a union type.
253+
return normalize(this as unknown as StatementWithChildren, node, sample);
251254
}
252255
}

pkg/sass-parser/lib/src/statement/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// https://opensource.org/licenses/MIT.
44

55
import * as postcss from 'postcss';
6+
import {ContainerWithChildren} from 'postcss/lib/container';
67

78
import {Container} from '../container';
89
import {Interpolation} from '../interpolation';
@@ -178,7 +179,7 @@ export interface ContainerProps extends NodeProps {
178179
*
179180
* @category Statement
180181
*/
181-
export type StatementWithChildren = postcss.Container<postcss.ChildNode> &
182+
export type StatementWithChildren = ContainerWithChildren &
182183
Container<ChildNode, NewNode> &
183184
AnyStatement;
184185

pkg/sass-parser/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"test": "jest"
3232
},
3333
"dependencies": {
34-
"postcss": "8.5.5",
34+
"postcss": "8.5.6",
3535
"sass": "file:../../build/npm"
3636
},
3737
"devDependencies": {

0 commit comments

Comments
 (0)