Skip to content

Commit

Permalink
Merge pull request #209 from storybookjs/fix-check
Browse files Browse the repository at this point in the history
refactor: Improve AST-related types readability & fix existing issues
  • Loading branch information
xeho91 authored Sep 5, 2024
2 parents e0ebaf4 + 1cd8a0a commit 1732cd7
Show file tree
Hide file tree
Showing 40 changed files with 400 additions and 262 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"rimraf": "^5.0.7",
"rollup": "^4.18.0",
"storybook": "^8.2.2",
"svelte": "5.0.0-next.215",
"svelte": "5.0.0-next.244",
"svelte-check": "^3.8.4",
"tslib": "^2.6.3",
"type-fest": "^4.20.1",
Expand All @@ -109,7 +109,7 @@
"peerDependencies": {
"@storybook/svelte": "^8.0.0",
"@sveltejs/vite-plugin-svelte": "^4.0.0-next.0 || ^4.0.0",
"svelte": "^5.0.0-next.117 || ^5.0.0",
"svelte": "^5.0.0-next.244 || ^5.0.0",
"vite": "^5.0.0"
},
"packageManager": "[email protected]+sha512.7c2ea089e1a6af306409c4fc8c4f0897bdac32b772016196c469d9428f1fe2d5a21daf8ad6512762654ac645b5d9136bb210ec9a00afa8dbc4677843ba362ecd",
Expand Down
124 changes: 71 additions & 53 deletions pnpm-lock.yaml

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

7 changes: 4 additions & 3 deletions src/compiler/transform/appendix/create-export-default.test.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
import type { Program } from 'estree';
import { print } from 'esrap';
import { describe, it } from 'vitest';

import { createExportDefaultMeta } from './create-export-default';

import type { ESTreeAST } from '#parser/ast';

describe(createExportDefaultMeta.name, () => {
it('creates a new export default correctly', ({ expect }) => {
const stringified = print(
Expand All @@ -12,7 +13,7 @@ describe(createExportDefaultMeta.name, () => {
type: 'Identifier',
name: 'meta',
},
}) as unknown as Program
}) as unknown as ESTreeAST.Program
).code;

expect(stringified).toMatchInlineSnapshot(`"export default meta;"`);
Expand All @@ -25,7 +26,7 @@ describe(createExportDefaultMeta.name, () => {
type: 'Identifier',
name: '__renamed_meta',
},
}) as unknown as Program
}) as unknown as ESTreeAST.Program
).code;

expect(stringified).toMatchInlineSnapshot(`"export default __renamed_meta;"`);
Expand Down
Loading

0 comments on commit 1732cd7

Please sign in to comment.