Skip to content
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

refactor: Improve AST-related types readability & fix existing issues #209

Merged
merged 5 commits into from
Sep 5, 2024
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
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