Skip to content

Migrate to tsdown to fix dts output #146

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

Merged
merged 7 commits into from
Apr 30, 2025
Merged

Conversation

lishaduck
Copy link
Contributor

@lishaduck lishaduck commented Apr 28, 2025

Current dts:

import * as tsEslintParser from '@typescript-eslint/parser';
import { ParserOptions } from '@typescript-eslint/parser';

var name = "typescript-eslint-parser-for-extra-files"; // ← invalid
var version = "0.7.0";

declare const meta_name: typeof name;
declare const meta_version: typeof version;
declare namespace meta {
  export { meta_name as name, meta_version as version };
}

declare function parseForESLint(code: string, options?: ParserOptions): ReturnType<typeof tsEslintParser.parseForESLint>;

export { meta, name, parseForESLint };

New dts:

import * as tsEslintParser from "@typescript-eslint/parser";
import { ParserOptions } from "@typescript-eslint/parser";
import { TSESLint } from "@typescript-eslint/utils";

//#region src/meta.d.ts
declare const meta: TSESLint.FlatConfig.PluginMeta;
declare const name: string;

//#endregion
//#region src/index.d.ts
declare function parseForESLint(code: string, options?: ParserOptions): ReturnType<typeof tsEslintParser.parseForESLint>;

//#endregion
export { meta, name, parseForESLint };

Copy link

changeset-bot bot commented Apr 28, 2025

🦋 Changeset detected

Latest commit: 528908c

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
typescript-eslint-parser-for-extra-files Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Don't mark `package.json` as external.
package.json Outdated
"semver": "^7.3.5",
"svelte": "^4.0.0",
"svelte-eslint-parser": "^1.0.0",
"svelte2tsx": "^0.7.0",
"tsup": "^8.0.0",
"tsdown": "https://pkg.pr.new/tsdown@03230c4",
Copy link
Contributor Author

@lishaduck lishaduck Apr 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Owner

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I was hoping to use tsdown!

Copy link
Owner

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the changes! Looks good to me!
Has the rolldown/tsdown#169 change been released yet?

Copy link
Owner

@ota-meshi ota-meshi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@ota-meshi ota-meshi merged commit 7d42b06 into ota-meshi:main Apr 30, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants