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

chore: do not publish ts files to npm #21

Closed
wants to merge 3 commits into from
Closed
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
5 changes: 1 addition & 4 deletions packages/compat/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"exports": "./dist/esm/index.js",
"publish": {
"include": [
"dist/esm/index.js",
"dist/esm/index.d.ts",
"dist/esm/types.d.ts",
"dist/esm/types.ts",
"dist/esm/*",
"README.md",
"jsr.json",
"LICENSE"
Expand Down
2 changes: 1 addition & 1 deletion packages/compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"files": [
"dist"
"dist/**/*.{js,cjs,mjs,d.ts}"
Copy link
Member Author

@aladdin-add aladdin-add May 13, 2024

Choose a reason for hiding this comment

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

mjs was not used; it was included in case there may be some mjs files later.

Copy link
Member

Choose a reason for hiding this comment

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

Screenshot 2024-05-13 at 1 53 52 PM

I can see ts imports from declarations file. I dont think ignoring it would work?

Copy link
Member Author

@aladdin-add aladdin-add May 13, 2024

Choose a reason for hiding this comment

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

I did not see this line; have you pulled the latest changes?

just pushed a commit: 3baee87

Copy link
Member

Choose a reason for hiding this comment

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

We still would need the ts file after resolving to .js the import inside the d.ts is actually resolving to types.ts and not types.js. Try looking at the compat build files once 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, good catch! seems it's always required (not only jsr as described in #16 (comment)).

],
"publishConfig": {
"access": "public"
Expand Down
10 changes: 5 additions & 5 deletions packages/compat/src/fixup-rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
// Types
//-----------------------------------------------------------------------------

/** @typedef {import("./types.ts").FixupRuleDefinition} FixupRuleDefinition */
/** @typedef {import("./types.ts").FixupLegacyRuleDefinition} FixupLegacyRuleDefinition */
/** @typedef {import("./types.ts").FixupPluginDefinition} FixupPluginDefinition */
/** @typedef {import("./types.ts").FixupConfig} FixupConfig */
/** @typedef {import("./types.ts").FixupConfigArray} FixupConfigArray */
/** @typedef {import("./types.js").FixupRuleDefinition} FixupRuleDefinition */
/** @typedef {import("./types.js").FixupLegacyRuleDefinition} FixupLegacyRuleDefinition */
/** @typedef {import("./types.js").FixupPluginDefinition} FixupPluginDefinition */
/** @typedef {import("./types.js").FixupConfig} FixupConfig */
/** @typedef {import("./types.js").FixupConfigArray} FixupConfigArray */

//-----------------------------------------------------------------------------
// Data
Expand Down
5 changes: 1 addition & 4 deletions packages/config-array/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"exports": "./dist/esm/index.js",
"publish": {
"include": [
"dist/esm/index.js",
"dist/esm/index.d.ts",
"dist/esm/types.ts",
"dist/esm/types.d.ts",
"dist/esm/*",
"README.md",
"jsr.json",
"LICENSE"
Expand Down
2 changes: 1 addition & 1 deletion packages/config-array/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
}
},
"files": [
"dist"
"dist/**/*.{js,cjs,mjs,d.ts}"
],
"publishConfig": {
"access": "public"
Expand Down
5 changes: 1 addition & 4 deletions packages/object-schema/jsr.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
"exports": "./dist/esm/index.js",
"publish": {
"include": [
"dist/esm/index.js",
"dist/esm/index.d.ts",
"dist/esm/types.ts",
"dist/esm/types.d.ts",
"dist/esm/*",
"README.md",
"jsr.json",
"LICENSE"
Expand Down
2 changes: 1 addition & 1 deletion packages/object-schema/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
}
},
"files": [
"dist"
"dist/**/*.{js,cjs,mjs,d.ts}"
],
"publishConfig": {
"access": "public"
Expand Down