Skip to content

Commit

Permalink
chore: bump deps, tests
Browse files Browse the repository at this point in the history
- bump language server deps to force version that have a Svelte 4 peer dependency
- fix tests to work with Svelte 3
  • Loading branch information
dummdidumm committed Jul 11, 2023
1 parent fd963fd commit b34aa88
Show file tree
Hide file tree
Showing 15 changed files with 92 additions and 36 deletions.
4 changes: 2 additions & 2 deletions packages/language-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@
"fast-glob": "^3.2.7",
"lodash": "^4.17.21",
"prettier": "2.8.6",
"prettier-plugin-svelte": "~2.10.0",
"prettier-plugin-svelte": "~2.10.1",
"svelte": "^3.57.0",
"svelte-preprocess": "~5.0.3",
"svelte-preprocess": "~5.0.4",
"svelte2tsx": "workspace:~",
"typescript": "*",
"vscode-css-languageservice": "~6.2.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte2tsx/test/emitDts/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ async function testEmitDts(sample: string) {
: {};
await emitDts({
declarationDir: 'package',
svelteShimsPath: require.resolve(join(process.cwd(), 'svelte-shims-v4.d.ts')),
svelteShimsPath: require.resolve(join(process.cwd(), 'svelte-shims.d.ts')), // TODO make it -v4 once we have Svelte 4 in the workspace
...config,
libRoot: config.libRoot ? join(cwd, config.libRoot) : join(cwd, 'src')
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @typedef {typeof __propDef.props} TestProps */
/** @typedef {typeof __propDef.events} TestEvents */
/** @typedef {typeof __propDef.slots} TestSlots */
export default class Test extends SvelteComponent<{
export default class Test extends SvelteComponentTyped<{
astring: string;
}, {
event: CustomEvent<any>;
Expand All @@ -17,7 +17,7 @@ export default class Test extends SvelteComponent<{
export type TestProps = typeof __propDef.props;
export type TestEvents = typeof __propDef.events;
export type TestSlots = typeof __propDef.slots;
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
astring: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @typedef {typeof __propDef.props} TestProps */
/** @typedef {typeof __propDef.events} TestEvents */
/** @typedef {typeof __propDef.slots} TestSlots */
export default class Test extends SvelteComponent<{
export default class Test extends SvelteComponentTyped<{
astring: string;
}, {
event: CustomEvent<any>;
Expand All @@ -17,7 +17,7 @@ export default class Test extends SvelteComponent<{
export type TestProps = typeof __propDef.props;
export type TestEvents = typeof __propDef.events;
export type TestSlots = typeof __propDef.slots;
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
astring: string;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @typedef {typeof __propDef.props} Test2Props */
/** @typedef {typeof __propDef.events} Test2Events */
/** @typedef {typeof __propDef.slots} Test2Slots */
export default class Test2 extends SvelteComponent<{
export default class Test2 extends SvelteComponentTyped<{
foo: boolean;
}, {
[evt: string]: CustomEvent<any>;
Expand All @@ -10,7 +10,7 @@ export default class Test2 extends SvelteComponent<{
export type Test2Props = typeof __propDef.props;
export type Test2Events = typeof __propDef.events;
export type Test2Slots = typeof __propDef.slots;
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
foo: import('./foo').Foo;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @typedef {typeof __propDef.props} TestNoScriptProps */
/** @typedef {typeof __propDef.events} TestNoScriptEvents */
/** @typedef {typeof __propDef.slots} TestNoScriptSlots */
export default class TestNoScript extends SvelteComponent<{
export default class TestNoScript extends SvelteComponentTyped<{
[x: string]: never;
}, {
click: MouseEvent;
Expand All @@ -14,7 +14,7 @@ export default class TestNoScript extends SvelteComponent<{
export type TestNoScriptProps = typeof __propDef.props;
export type TestNoScriptEvents = typeof __propDef.events;
export type TestNoScriptSlots = typeof __propDef.slots;
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
[x: string]: never;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/** @typedef {typeof __propDef.props} TestNoTypesProps */
/** @typedef {typeof __propDef.events} TestNoTypesEvents */
/** @typedef {typeof __propDef.slots} TestNoTypesSlots */
export default class TestNoTypes extends SvelteComponent<{
export default class TestNoTypes extends SvelteComponentTyped<{
noType: any;
initializer?: string;
}, {
Expand All @@ -17,7 +17,7 @@ export default class TestNoTypes extends SvelteComponent<{
export type TestNoTypesProps = typeof __propDef.props;
export type TestNoTypesEvents = typeof __propDef.events;
export type TestNoTypesSlots = typeof __propDef.slots;
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
noType: any;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
astring: string;
Expand All @@ -17,7 +17,7 @@ declare const __propDef: {
export type TestProps = typeof __propDef.props;
export type TestEvents = typeof __propDef.events;
export type TestSlots = typeof __propDef.slots;
export default class Test extends SvelteComponent<TestProps, TestEvents, TestSlots> {
export default class Test extends SvelteComponentTyped<TestProps, TestEvents, TestSlots> {
get astring(): string;
}
export {};
Expand Down

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

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
import { type TestProps } from './foo';
declare const __propDef: {
props: {
Expand All @@ -18,5 +18,5 @@ type TestProps_ = typeof __propDef.props;
export { TestProps_ as TestProps };
export type TestEvents = typeof __propDef.events;
export type TestSlots = typeof __propDef.slots;
export default class Test extends SvelteComponent<TestProps, TestEvents, TestSlots> {
export default class Test extends SvelteComponentTyped<TestProps, TestEvents, TestSlots> {
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare class __sveltets_Render<T extends boolean> {
props(): {
a: T;
Expand All @@ -15,6 +15,6 @@ declare class __sveltets_Render<T extends boolean> {
export type InterfacesProps<T extends boolean> = ReturnType<__sveltets_Render<T>['props']>;
export type InterfacesEvents<T extends boolean> = ReturnType<__sveltets_Render<T>['events']>;
export type InterfacesSlots<T extends boolean> = ReturnType<__sveltets_Render<T>['slots']>;
export default class Interfaces<T extends boolean> extends SvelteComponent<InterfacesProps<T>, InterfacesEvents<T>, InterfacesSlots<T>> {
export default class Interfaces<T extends boolean> extends SvelteComponentTyped<InterfacesProps<T>, InterfacesEvents<T>, InterfacesSlots<T>> {
}
export {};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
astring: string;
Expand All @@ -17,7 +17,7 @@ declare const __propDef: {
export type TestProps = typeof __propDef.props;
export type TestEvents = typeof __propDef.events;
export type TestSlots = typeof __propDef.slots;
export default class Test extends SvelteComponent<TestProps, TestEvents, TestSlots> {
export default class Test extends SvelteComponentTyped<TestProps, TestEvents, TestSlots> {
get astring(): string;
}
export {};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
import type { Foo } from './foo';
declare const __propDef: {
props: {
Expand All @@ -15,6 +15,6 @@ declare const __propDef: {
export type Test2Props = typeof __propDef.props;
export type Test2Events = typeof __propDef.events;
export type Test2Slots = typeof __propDef.slots;
export default class Test2 extends SvelteComponent<Test2Props, Test2Events, Test2Slots> {
export default class Test2 extends SvelteComponentTyped<Test2Props, Test2Events, Test2Slots> {
}
export {};
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SvelteComponent } from "svelte";
import { SvelteComponentTyped } from "svelte";
declare const __propDef: {
props: {
b?: () => void;
Expand All @@ -15,7 +15,7 @@ declare const __propDef: {
export type Test3PropsProps = typeof __propDef.props;
export type Test3PropsEvents = typeof __propDef.events;
export type Test3PropsSlots = typeof __propDef.slots;
export default class Test3Props extends SvelteComponent<Test3PropsProps, Test3PropsEvents, Test3PropsSlots> {
export default class Test3Props extends SvelteComponentTyped<Test3PropsProps, Test3PropsEvents, Test3PropsSlots> {
get b(): () => void;
}
export {};
76 changes: 66 additions & 10 deletions pnpm-lock.yaml

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

0 comments on commit b34aa88

Please sign in to comment.