Skip to content

Commit

Permalink
Merge branch 'master' into syfxlin/next-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
askoufis authored Nov 9, 2023
2 parents 5394f37 + 42bdf7a commit 602b1d0
Show file tree
Hide file tree
Showing 12 changed files with 3,821 additions and 5,199 deletions.
5 changes: 5 additions & 0 deletions .changeset/grumpy-suns-doubt.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@vanilla-extract/recipes": patch
---

Improve IDE hover of `RecipeVariants` type by explicitly resolving its output
5 changes: 5 additions & 0 deletions .changeset/strange-terms-hang.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@vanilla-extract/css': patch
---

Replace dependency `ahocorasick` with `modern-ahocorasick`
2 changes: 1 addition & 1 deletion .github/workflows/deploy-site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@main

- uses: pnpm/action-setup@v2.2.2
- uses: pnpm/action-setup@master

- name: Set up Node.js
uses: actions/setup-node@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
fetch-depth: 0
token: ${{ secrets.VANILLA_EXTRACT_CI_GITHUB_TOKEN }}

- uses: pnpm/action-setup@v2.2.2
- uses: pnpm/action-setup@master

- name: Set up Node.js
uses: actions/setup-node@main
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
fetch-depth: 0
token: ${{ secrets.VANILLA_EXTRACT_CI_GITHUB_TOKEN }}

- uses: pnpm/action-setup@v2.2.2
- uses: pnpm/action-setup@master

- name: Set up Node.js
uses: actions/setup-node@main
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
matrix:
# Blank string allows us to test against version in nvmrc file
# configured in 'Set up Node.js' down below.
node: [14, ''] # Add 'lts/*' to this list when ready
node: ['', 'lts/*']
name: Lint & Test (${{ (matrix.node && matrix.node != 'lts/*') && format('node {0}', matrix.node) || matrix.node || 'nvmrc' }})
runs-on: ubuntu-latest
env:
Expand All @@ -17,7 +17,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@main

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@master

- name: Set up Node.js
uses: actions/setup-node@main
Expand All @@ -42,7 +42,7 @@ jobs:
matrix:
# Blank string allows us to test against version in nvmrc file
# configured in 'Set up Node.js' down below.
node: [''] # Add 'lts/*' to this list when ready
node: ['', 'lts/*']
name: Windows Tests (${{ (matrix.node && matrix.node != 'lts/*') && format('node {0}', matrix.node) || matrix.node || 'nvmrc' }})
runs-on: windows-latest
env:
Expand All @@ -51,7 +51,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@main

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@master

- name: Set up Node.js
uses: actions/setup-node@main
Expand All @@ -77,7 +77,7 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@main

- uses: pnpm/action-setup@v2
- uses: pnpm/action-setup@master

- name: Set up Node.js
uses: actions/setup-node@main
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16.17.0
v20.9.0
18 changes: 9 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@
"prepare-release": "pnpm copy-readme-to-packages && pnpm build",
"release": "pnpm prepare-release && changeset publish"
},
"preconstruct": {
"packages": [
"packages/*"
]
},
"volta": {
"node": "16.17.0"
},
"dependencies": {
"@babel/core": "^7.20.7",
"@babel/preset-env": "^7.20.2",
Expand Down Expand Up @@ -60,10 +52,18 @@
"typescript": "^4.9.4",
"vitest": "^0.28.5"
},
"packageManager": "[email protected]",
"preconstruct": {
"packages": [
"packages/*"
]
},
"packageManager": "[email protected]",
"pnpm": {
"patchedDependencies": {
"[email protected]": "patches/[email protected]"
}
},
"volta": {
"node": "20.9.0"
}
}
7 changes: 0 additions & 7 deletions packages/css/src/ahocorasick.d.ts

This file was deleted.

9 changes: 7 additions & 2 deletions packages/recipes/src/types.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import type { ComplexStyleRule } from '@vanilla-extract/css';

type Resolve<T> = {
[Key in keyof T]: T[Key];
} & {};

type RecipeStyleRule = ComplexStyleRule | string;

export type VariantDefinitions = Record<string, RecipeStyleRule>;
Expand Down Expand Up @@ -48,5 +52,6 @@ export type RuntimeFn<Variants extends VariantGroups> = ((
classNames: RecipeClassNames<Variants>;
};

export type RecipeVariants<RecipeFn extends RuntimeFn<VariantGroups>> =
Parameters<RecipeFn>[0];
export type RecipeVariants<RecipeFn extends RuntimeFn<VariantGroups>> = Resolve<
Parameters<RecipeFn>[0]
>;
Loading

0 comments on commit 602b1d0

Please sign in to comment.