Skip to content

Commit

Permalink
chore: bump csstype (#472)
Browse files Browse the repository at this point in the history
  • Loading branch information
layershifter authored Dec 8, 2023
1 parent 5169d73 commit adf1a0d
Show file tree
Hide file tree
Showing 14 changed files with 43 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: bump csstype",
"packageName": "@griffel/core",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: bump csstype",
"packageName": "@griffel/eslint-plugin",
"email": "[email protected]",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "chore: bump csstype",
"packageName": "@griffel/style-types",
"email": "[email protected]",
"dependentChangeType": "patch"
}
2 changes: 2 additions & 0 deletions e2e/typescript/src/assets/legacy/fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,11 @@ assertType({
...typedMixin,
color: 'var(--customColor)',
},
// @ts-expect-error FIXME - this is supposed to pass!
':after': {
...typedMixin,
},
// @ts-expect-error FIXME - this is supposed to pass!
':before': {
...typedMixin,
color: 'var(--customColor)',
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
"@typescript-eslint/utils": "^5.47.0",
"ajv": "^8.4.0",
"browserslist": "^4.19.1",
"csstype": "^3.1.2",
"csstype": "^3.1.3",
"enhanced-resolve": "^5.8.2",
"rtl-css-js": "^1.16.1",
"source-map-js": "1.0.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"dependencies": {
"@emotion/hash": "^0.9.0",
"@griffel/style-types": "^1.0.2",
"csstype": "^3.1.2",
"csstype": "^3.1.3",
"rtl-css-js": "^1.16.1",
"stylis": "^4.2.0",
"tslib": "^2.1.0"
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ export const LOOKUP_DIR_INDEX = 1;
export const UNSUPPORTED_CSS_PROPERTIES: Record<keyof GriffelStylesUnsupportedCSSProperties, 1> = {
all: 1,
animation: 1,
animationRange: 1,
background: 1,
backgroundPosition: 1,
border: 1,
Expand Down Expand Up @@ -128,4 +129,5 @@ export const UNSUPPORTED_CSS_PROPERTIES: Record<keyof GriffelStylesUnsupportedCS
textDecoration: 1,
textEmphasis: 1,
transition: 1,
viewTimeline: 1,
} as const;
2 changes: 1 addition & 1 deletion packages/core/src/runtime/resolveResetStyleRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function createStringFromStyles(styles: GriffelResetStyle) {
}
}

warnAboutUnresolvedRule(property, value);
warnAboutUnresolvedRule(property, value as GriffelResetStyle);
}

return [ltrCSS, rtlCSS];
Expand Down
4 changes: 2 additions & 2 deletions packages/core/src/runtime/resolveStyleRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ export function resolveStyleRules(
? {
rtlClassName,
rtlProperty: rtlDefinitions[0].key,
rtlValue: rtlDefinitions.map(d => d.value) as Array<string | number>,
rtlValue: rtlDefinitions.map(d => d.value) as unknown as Array<string | number>,
}
: undefined;

Expand All @@ -262,7 +262,7 @@ export function resolveStyleRules(
property,
support,
container,
value: value as Array<string | number>,
value: value as unknown as Array<string | number>,
...rtlCompileOptions,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"dependencies": {
"@typescript-eslint/utils": "^5.47.0",
"csstype": "^3.1.2",
"csstype": "^3.1.3",
"tslib": "^2.1.0"
},
"peerDependencies": {
Expand Down
2 changes: 2 additions & 0 deletions packages/eslint-plugin/src/rules/no-shorthands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const RULE_NAME = 'no-shorthands';
const UNSUPPORTED_CSS_PROPERTIES: Record<keyof CSS.StandardShorthandProperties, true> = {
all: true,
animation: true,
animationRange: true,
background: true,
backgroundPosition: true,
border: true,
Expand Down Expand Up @@ -76,6 +77,7 @@ const UNSUPPORTED_CSS_PROPERTIES: Record<keyof CSS.StandardShorthandProperties,
textDecoration: true,
textEmphasis: true,
transition: true,
viewTimeline: true,
};

const pxSplitter = buildShorthandSplitter({ numberUnit: 'px' });
Expand Down
2 changes: 1 addition & 1 deletion packages/style-types/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
},
"sideEffects": false,
"dependencies": {
"csstype": "^3.1.2"
"csstype": "^3.1.3"
},
"typesVersions": {
"<4.4": {
Expand Down
4 changes: 4 additions & 0 deletions packages/style-types/src/unsupported-properties.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ export interface GriffelStylesUnsupportedCSSProperties extends Record<keyof CSS.
all: never;
/** @deprecated Use corresponding longhand properties such as `animationName` and `animationDuration` instead. */
animation: never;
/** @deprecated Use corresponding longhand properties such as `animationRangeStart` and `animationRangeEnd` instead. */
animationRange: never;
/** @deprecated Use corresponding longhand properties such as `backgroundImage` and `backgroundSize` instead. */
background: never;
/** @deprecated Use corresponding longhand properties `backgroundPositionX` and `backgroundPositionY` instead. */
Expand Down Expand Up @@ -138,4 +140,6 @@ export interface GriffelStylesUnsupportedCSSProperties extends Record<keyof CSS.
textEmphasis: never;
/** @deprecated Use `shorthands.transition()` instead. */
transition: never;
/** @deprecated Use corresponding longhand properties such as `viewTimelineName` and `viewTimelineAxis` instead. */
viewTimeline: never;
}
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -11189,10 +11189,10 @@ __metadata:
languageName: node
linkType: hard

"csstype@npm:^3.0.2, csstype@npm:^3.0.5, csstype@npm:^3.1.2":
version: 3.1.2
resolution: "csstype@npm:3.1.2"
checksum: 1f39c541e9acd9562996d88bc9fb62d1cb234786ef11ed275567d4b2bd82e1ceacde25debc8de3d3b4871ae02c2933fa02614004c97190711caebad6347debc2
"csstype@npm:^3.0.2, csstype@npm:^3.0.5, csstype@npm:^3.1.3":
version: 3.1.3
resolution: "csstype@npm:3.1.3"
checksum: f593cce41ff5ade23f44e77521e3a1bcc2c64107041e1bf6c3c32adc5187d0d60983292fda326154d20b01079e24931aa5b08e4467cc488b60bb1e7f6d478ade
languageName: node
linkType: hard

Expand Down Expand Up @@ -14882,7 +14882,7 @@ __metadata:
browserslist: "npm:^4.19.1"
classnames: "npm:2.3.2"
css-loader: "npm:^6.4.0"
csstype: "npm:^3.1.2"
csstype: "npm:^3.1.3"
d3-scale-chromatic: "npm:^3.0.0"
doctoc: "npm:2.2.1"
enhanced-resolve: "npm:^5.8.2"
Expand Down

0 comments on commit adf1a0d

Please sign in to comment.