-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add a warning for jsnext field #85
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bluwy
approved these changes
Dec 1, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks helpful
bluwy
changed the title
feat: add a warning for jsnext field
Add a warning for jsnext field
Dec 1, 2023
Actually I realized something. We should downgrade this to a suggestion if |
renovate bot
referenced
this pull request
in tnez/starter-npm-pkg
Dec 4, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@changesets/cli](https://togithub.com/changesets/changesets/tree/main#readme) ([source](https://togithub.com/changesets/changesets)) | [`2.26.2` -> `2.27.1`](https://renovatebot.com/diffs/npm/@changesets%2fcli/2.26.2/2.27.1) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@changesets%2fcli/2.27.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@changesets%2fcli/2.27.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@changesets%2fcli/2.26.2/2.27.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@changesets%2fcli/2.26.2/2.27.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@types/node](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node) ([source](https://togithub.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)) | [`20.10.0` -> `20.10.3`](https://renovatebot.com/diffs/npm/@types%2fnode/20.10.0/20.10.3) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@types%2fnode/20.10.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@types%2fnode/20.10.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@types%2fnode/20.10.0/20.10.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@types%2fnode/20.10.0/20.10.3?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [eslint](https://eslint.org) ([source](https://togithub.com/eslint/eslint)) | [`8.54.0` -> `8.55.0`](https://renovatebot.com/diffs/npm/eslint/8.54.0/8.55.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/eslint/8.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/eslint/8.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/eslint/8.54.0/8.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/eslint/8.54.0/8.55.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [publint](https://publint.dev) ([source](https://togithub.com/bluwy/publint/tree/HEAD/pkg)) | [`0.2.5` -> `0.2.6`](https://renovatebot.com/diffs/npm/publint/0.2.5/0.2.6) | [![age](https://developer.mend.io/api/mc/badges/age/npm/publint/0.2.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/publint/0.2.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/publint/0.2.5/0.2.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/publint/0.2.5/0.2.6?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>changesets/changesets (@​changesets/cli)</summary> ### [`v2.27.1`](https://togithub.com/changesets/changesets/releases/tag/%40changesets/cli%402.27.1) [Compare Source](https://togithub.com/changesets/changesets/compare/@changesets/cli@2.27.0...@changesets/cli@2.27.1) ##### Patch Changes - [#​1267](https://togithub.com/changesets/changesets/pull/1267) [`86cfff1`](https://togithub.com/changesets/changesets/commit/86cfff1f1891e75238eec61dc97a303ad7a8c030) Thanks [@​Andarist](https://togithub.com/Andarist)! - Make `./bin.js` available through `package.json#exports` to fix compatibility with `changesets/action`. ### [`v2.27.0`](https://togithub.com/changesets/changesets/releases/tag/%40changesets/cli%402.27.0) [Compare Source](https://togithub.com/changesets/changesets/compare/@changesets/cli@2.26.2...@changesets/cli@2.27.0) ##### Minor Changes - [#​1185](https://togithub.com/changesets/changesets/pull/1185) [`a971652`](https://togithub.com/changesets/changesets/commit/a971652ec1403aab3fb89eb2f1640bd5012b895a) Thanks [@​Andarist](https://togithub.com/Andarist)! - `package.json#exports` have been added to limit what (and how) code might be imported from the package. - [#​1236](https://togithub.com/changesets/changesets/pull/1236) [`dfd4cca`](https://togithub.com/changesets/changesets/commit/dfd4cca84118df913feedfeac37a4939566ae447) Thanks [@​camertron](https://togithub.com/camertron)! - Avoid using short commit IDs ##### Patch Changes - [#​1053](https://togithub.com/changesets/changesets/pull/1053) [`90a870a`](https://togithub.com/changesets/changesets/commit/90a870af2e7bcbe1551210063492e20c256f4995) Thanks [@​paescuj](https://togithub.com/paescuj)! - Replace the dependency `is-ci` with `ci-info`. - Updated dependencies \[[`a971652`](https://togithub.com/changesets/changesets/commit/a971652ec1403aab3fb89eb2f1640bd5012b895a), [`dfd4cca`](https://togithub.com/changesets/changesets/commit/dfd4cca84118df913feedfeac37a4939566ae447)]: - [@​changesets/assemble-release-plan](https://togithub.com/changesets/assemble-release-plan)[@​6](https://togithub.com/6).0.0 - [@​changesets/get-dependents-graph](https://togithub.com/changesets/get-dependents-graph)[@​2](https://togithub.com/2).0.0 - [@​changesets/apply-release-plan](https://togithub.com/changesets/apply-release-plan)[@​7](https://togithub.com/7).0.0 - [@​changesets/get-release-plan](https://togithub.com/changesets/get-release-plan)[@​4](https://togithub.com/4).0.0 - [@​changesets/changelog-git](https://togithub.com/changesets/changelog-git)[@​0](https://togithub.com/0).2.0 - [@​changesets/config](https://togithub.com/changesets/config)[@​3](https://togithub.com/3).0.0 - [@​changesets/errors](https://togithub.com/changesets/errors)[@​0](https://togithub.com/0).2.0 - [@​changesets/logger](https://togithub.com/changesets/logger)[@​0](https://togithub.com/0).1.0 - [@​changesets/types](https://togithub.com/changesets/types)[@​6](https://togithub.com/6).0.0 - [@​changesets/write](https://togithub.com/changesets/write)[@​0](https://togithub.com/0).3.0 - [@​changesets/read](https://togithub.com/changesets/read)[@​0](https://togithub.com/0).6.0 - [@​changesets/git](https://togithub.com/changesets/git)[@​3](https://togithub.com/3).0.0 - [@​changesets/pre](https://togithub.com/changesets/pre)[@​2](https://togithub.com/2).0.0 </details> <details> <summary>eslint/eslint (eslint)</summary> ### [`v8.55.0`](https://togithub.com/eslint/eslint/releases/tag/v8.55.0) [Compare Source](https://togithub.com/eslint/eslint/compare/v8.54.0...v8.55.0) #### Features - [`8c9e6c1`](https://togithub.com/eslint/eslint/commit/8c9e6c100a6eb69da292463293b3b48cff911a01) feat: importNamePattern option in no-restricted-imports ([#​17721](https://togithub.com/eslint/eslint/issues/17721)) (Tanuj Kanti) #### Documentation - [`83ece2a`](https://togithub.com/eslint/eslint/commit/83ece2afc2dc6c49efe82678663fe4cba590c0e5) docs: fix typo `--rules` -> `--rule` ([#​17806](https://togithub.com/eslint/eslint/issues/17806)) (OKURA Masafumi) - [`fffca5c`](https://togithub.com/eslint/eslint/commit/fffca5c362bcd205dbf79d1bb52834f8a98fc6bd) docs: remove "Open in Playground" buttons for removed rules ([#​17791](https://togithub.com/eslint/eslint/issues/17791)) (Francesco Trotta) - [`a6d9442`](https://togithub.com/eslint/eslint/commit/a6d9442a9ab34d5d19f78d8c8fd0767a1237bfe3) docs: fix correct/incorrect examples of rules ([#​17789](https://togithub.com/eslint/eslint/issues/17789)) (Tanuj Kanti) - [`383e999`](https://togithub.com/eslint/eslint/commit/383e99928d7ce649ec9030c9856b03fbac0c3501) docs: update and fix examples for `no-unused-vars` ([#​17788](https://togithub.com/eslint/eslint/issues/17788)) (Tanuj Kanti) - [`5a8efd5`](https://togithub.com/eslint/eslint/commit/5a8efd5b7ad13eb320a1f468d1d4ab3c8ab99214) docs: add specific stylistic rule for each deprecated rule ([#​17778](https://togithub.com/eslint/eslint/issues/17778)) (Etienne) #### Chores - [`eb8950c`](https://togithub.com/eslint/eslint/commit/eb8950c3b811c9163b9aae23af8b6266ad98b295) chore: upgrade [@​eslint/js](https://togithub.com/eslint/js)[@​8](https://togithub.com/8).55.0 ([#​17811](https://togithub.com/eslint/eslint/issues/17811)) (Milos Djermanovic) - [`93df384`](https://togithub.com/eslint/eslint/commit/93df3849a7a25ebe0502000bf0bfb80a6613a5ae) chore: package.json update for [@​eslint/js](https://togithub.com/eslint/js) release (Jenkins) - [`fe4b954`](https://togithub.com/eslint/eslint/commit/fe4b9545a83e9aca7ba4bb77bc9c868d57de777f) chore: upgrade [@​eslint/eslintrc](https://togithub.com/eslint/eslintrc)[@​2](https://togithub.com/2).1.4 ([#​17799](https://togithub.com/eslint/eslint/issues/17799)) (Milos Djermanovic) - [`bd8911d`](https://togithub.com/eslint/eslint/commit/bd8911db85c7a1127543c9212c8cea47a5cb687d) ci: pin Node.js 21.2.0 ([#​17809](https://togithub.com/eslint/eslint/issues/17809)) (Milos Djermanovic) - [`b29a16b`](https://togithub.com/eslint/eslint/commit/b29a16b22f234f6134475efb6c7be5ac946556ee) chore: fix several `cli` tests to run in the intended flat config mode ([#​17797](https://togithub.com/eslint/eslint/issues/17797)) (Milos Djermanovic) - [`de165c1`](https://togithub.com/eslint/eslint/commit/de165c108203c6703516ac651f5b4cac5b241804) chore: remove unused config-extends fixtures ([#​17781](https://togithub.com/eslint/eslint/issues/17781)) (Milos Djermanovic) - [`d4304b8`](https://togithub.com/eslint/eslint/commit/d4304b8b66eac870ffbf4840d84add8a123b25fc) chore: remove formatting/stylistic rules from new rule templates ([#​17780](https://togithub.com/eslint/eslint/issues/17780)) (Francesco Trotta) - [`21024fe`](https://togithub.com/eslint/eslint/commit/21024fe2029420b413bed11d23761c87e9a02a1a) chore: check rule examples for syntax errors ([#​17718](https://togithub.com/eslint/eslint/issues/17718)) (Francesco Trotta) </details> <details> <summary>bluwy/publint (publint)</summary> ### [`v0.2.6`](https://togithub.com/bluwy/publint/releases/tag/v0.2.6) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.2.5...v0.2.6) ##### Features - Warn if the deprecated `jsnext:main` or `jsnext` fields are used by [@​sapphi-red](https://togithub.com/sapphi-red) ([https://github.com/bluwy/publint/pull/85](https://togithub.com/bluwy/publint/pull/85)) ##### Site - Fix command on site by [@​wooorm](https://togithub.com/wooorm) ([https://github.com/bluwy/publint/pull/82](https://togithub.com/bluwy/publint/pull/82)) ##### New Contributors - [@​wooorm](https://togithub.com/wooorm) made their first contribution in [https://github.com/bluwy/publint/pull/82](https://togithub.com/bluwy/publint/pull/82) **Full Changelog**: bluwy/publint@v0.2.5...v0.2.6 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - "before 4am on Monday" (UTC). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/tnez/starter-npm-pkg). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy41OS44IiwidXBkYXRlZEluVmVyIjoiMzcuODEuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
tnez
referenced
this pull request
in tnez/actions
Dec 30, 2023
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [publint](https://publint.dev) ([source](https://togithub.com/bluwy/publint/tree/HEAD/pkg)) | [`0.1.16` -> `0.2.7`](https://renovatebot.com/diffs/npm/publint/0.1.16/0.2.7) | [![age](https://developer.mend.io/api/mc/badges/age/npm/publint/0.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/publint/0.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/publint/0.1.16/0.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/publint/0.1.16/0.2.7?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>bluwy/publint (publint)</summary> ### [`v0.2.7`](https://togithub.com/bluwy/publint/releases/tag/v0.2.7) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.2.6...v0.2.7) ##### Features - If the library exports from both `"main"`/`"module"` and `"exports"` fields, but the `"exports"` field doesn't export the root entrypoint, warn about the inconsistency. When `"exports"` is defined, it takes the highest priority, so all the library's entrypoint (root and deep) needs to be specified here. ([https://github.com/bluwy/publint/issues/88](https://togithub.com/bluwy/publint/issues/88)) - Suggest using the `"type"` field. In [Node.js v20.10.0](https://nodejs.org/en/blog/release/v20.10.0), it introduces a new `--experimental-default-type` flag to flip the default module system from "CJS-as-default" to "ESM-as-default". It's recommended for libraries to specify the `"type"` field explicitly to prevent CJS files from being incorrectly interpreted as ESM. This suggestion helps push towards a better ESM experience in the future. ([https://github.com/bluwy/publint/issues/83](https://togithub.com/bluwy/publint/issues/83)) **Full Changelog**: bluwy/publint@v0.2.6...v0.2.7 ### [`v0.2.6`](https://togithub.com/bluwy/publint/releases/tag/v0.2.6) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.2.5...v0.2.6) ##### Features - Warn if the deprecated `jsnext:main` or `jsnext` fields are used by [@​sapphi-red](https://togithub.com/sapphi-red) ([https://github.com/bluwy/publint/pull/85](https://togithub.com/bluwy/publint/pull/85)) ##### Site - Fix command on site by [@​wooorm](https://togithub.com/wooorm) ([https://github.com/bluwy/publint/pull/82](https://togithub.com/bluwy/publint/pull/82)) ##### New Contributors - [@​wooorm](https://togithub.com/wooorm) made their first contribution in [https://github.com/bluwy/publint/pull/82](https://togithub.com/bluwy/publint/pull/82) **Full Changelog**: bluwy/publint@v0.2.5...v0.2.6 ### [`v0.2.5`](https://togithub.com/bluwy/publint/releases/tag/v0.2.5) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.2.4...v0.2.5) ##### Bug fixes - Fix missing published files check when resolving a path with fallback extensions ([https://github.com/bluwy/publint/issues/79](https://togithub.com/bluwy/publint/issues/79)) **Full Changelog**: bluwy/publint@v0.2.4...v0.2.5 ### [`v0.2.4`](https://togithub.com/bluwy/publint/releases/tag/v0.2.4) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.2.3...v0.2.4) ##### Bug fixes - Check for packed files locally before providing the `"files"` suggestion. An incorrect suggestion was given when you're using `.npmignore` or `.gitignore` to limit publishing certain files. ##### Site - Fix rules page mobile responsiveness **Full Changelog**: bluwy/publint@v0.2.3...v0.2.4 ### [`v0.2.3`](https://togithub.com/bluwy/publint/releases/tag/v0.2.3) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.2.2...v0.2.3) ##### Features - Error if `package.json` has fields with invalid string, boolean, object, etc type ([https://github.com/bluwy/publint/issues/73](https://togithub.com/bluwy/publint/issues/73)) - Suggest using the `"files"` field if detected test or config files are published ([https://github.com/bluwy/publint/issues/77](https://togithub.com/bluwy/publint/issues/77)) - Warn on `"exports"` and `"browser"` object conflict for browser-ish environments ([https://github.com/bluwy/publint/issues/58](https://togithub.com/bluwy/publint/issues/58)) For example, given this setup: ```json { "browser": { "./lib.server.js": "./lib.browser.js" }, "exports": { ".": { "worker": "./lib.server.js", "browser": "./lib.browser.js", "default": "./lib.server.js" } } } ``` When matching the `"worker"` condition, it will resolve to `"./lib.server.js"` which is intended to work in a worker environment. However, the `"browser"` field also has a matching mapping for `"./lib.server.js"`, causing the final resolved path to be `"./lib.browser.js"`. This is usually not intended and causes the wrong file to be loaded. - Error on invalid JSX extensions, such as `.cjsx`, `.mjsx`, `.ctsx`, and `.mtsx` ([https://github.com/bluwy/publint/issues/76](https://togithub.com/bluwy/publint/issues/76)) These extensions are usually mistaken as ESM and CJS variants of JSX, which is not valid. Instead they should be written in ESM with the `.jsx` extension instead. ##### Bug fixes - Skip file format checks only for globbed files - Fix `"main"` field with ESM content detection ([https://github.com/bluwy/publint/issues/75](https://togithub.com/bluwy/publint/issues/75)) ##### Site - Add sidebar menu to rules page by [@​btea](https://togithub.com/btea) ([https://github.com/bluwy/publint/pull/65](https://togithub.com/bluwy/publint/pull/65)) - Quickly scroll to the prompt information location by [@​btea](https://togithub.com/btea) ([https://github.com/bluwy/publint/pull/68](https://togithub.com/bluwy/publint/pull/68)) - Fix version switch title not updated by [@​btea](https://togithub.com/btea) ([https://github.com/bluwy/publint/pull/72](https://togithub.com/bluwy/publint/pull/72)) - Improve documentation for `"types"` format - Fix message border styles - Fix docs list missing dot **Full Changelog**: bluwy/publint@v0.2.2...v0.2.3 ### [`v0.2.2`](https://togithub.com/bluwy/publint/releases/tag/v0.2.2) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.2.1...v0.2.2) ##### Features - Lint `"typings"` field file existence ([https://github.com/bluwy/publint/pull/60](https://togithub.com/bluwy/publint/pull/60)) - Check packed files when globbing exports locally ([https://github.com/bluwy/publint/issues/61](https://togithub.com/bluwy/publint/issues/61)) - Improve `"browser"` field suggestion for using `"imports"` and `"exports"` fields instead ([https://github.com/bluwy/publint/pull/59](https://togithub.com/bluwy/publint/pull/59)) ##### Bug fixes - Lower deprecated trailing slash glob syntax as `suggestion` instead of a `warning` when it's used for backwards compatibility only ([https://github.com/bluwy/publint/issues/62](https://togithub.com/bluwy/publint/issues/62)) - Suppress invalid globbed file format if has correct adjacent file - Fix extension replacement in messages - Improve invalid types format message and docs ##### Site - Fix invalid package name not found message - Highlight code blocks in rules page ##### New Contributors - [@​btea](https://togithub.com/btea) made their first contribution in [https://github.com/bluwy/publint/pull/64](https://togithub.com/bluwy/publint/pull/64) **Full Changelog**: bluwy/publint@v0.2.1...v0.2.2 ### [`v0.2.1`](https://togithub.com/bluwy/publint/releases/tag/v0.2.1) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.2.0...v0.2.1) ##### Bug fixes - Fix `"types"` condition check with `"exports"` array format - Disable packed files search when a `vfs` is passed - Fix `"browser"` field file existence extensions check - Fix file existence check with trailing slash ##### Site - Site-wide design touch-up - New "Popular packages" section - New package version select switcher ([https://github.com/bluwy/publint/issues/56](https://togithub.com/bluwy/publint/issues/56)) - New navigation header design - Update bottom documentation for clarity - Improve repo URL parsing ##### New Contributors - [@​lachlancollins](https://togithub.com/lachlancollins) made their first contribution in [https://github.com/bluwy/publint/pull/53](https://togithub.com/bluwy/publint/pull/53) **Full Changelog**: bluwy/publint@v0.2.0...v0.2.1 ### [`v0.2.0`](https://togithub.com/bluwy/publint/releases/tag/v0.2.0) [Compare Source](https://togithub.com/bluwy/publint/compare/v0.1.16...v0.2.0) ##### Breaking changes **Note:** If you're using `publint` from the CLI, these breaking changes should not affect you. - `publint()` now returns an object with `messages` instead of the `messages` array directly. This makes way for future APIs where `publint` will return more information than just `messages`. ```diff - const messages = await publint() + const { messages } = await publint() ``` - Rename `printMessage` API to `formatMessage` to better reflect it's intent. ([https://github.com/bluwy/publint/issues/43](https://togithub.com/bluwy/publint/issues/43)) ```diff - import { printMessage } from "publint/utils" + import { formatMessage } from "publint/utils" const { messages } = await publint() for (const message of messages) { - console.log(printMessage(message)) + console.log(formatMessage(message)) } ``` - Remove `filePath` `arg` for the `FILE_DOES_NOT_EXIST` message. ```diff import type { Message } from "publint" import { getPkgPathValue } from "publint/utils" function messageToString(message: Message, pkg: Record<string, any>) { switch (message.code) { case "FILE_DOES_NOT_EXIST": - return `The file "${message.args.filePath}" does not exist.` + return `The file "${getPkgPathValue(pkg, message.path)}" does not exist.` } } ``` - Remove the `import` condition for the `publint` package. This provides a better error message if you call `require("publint")`. ##### Features - Improve warnings when the exported `"types"` condition has an invalid format in ESM or CJS. This ensures your library's types will work in both environments when dual publishing. ([https://github.com/bluwy/publint/issues/46](https://togithub.com/bluwy/publint/issues/46)) It affects packages commonly packaged like: ```json { "exports": { ".": { "types": "./index.d.ts", <-- only works in CJS "import": "./index.mjs", "require": "./index.js", } } } ``` For more information, visit the [rules documentation](https://publint.dev/rules#export_types_invalid_format). This feature is inspired by https://arethetypeswrong.github.io. ##### Bug fixes - Suppress warnings when exported JS files using the `"exports"` field have adjacent `.d.ts` files and no `"types"` condition. This follows TypeScript's resolution algorithm. For more information, visit the [rules documentation](https://publint.dev/rules#types_not_exported). ([https://github.com/bluwy/publint/issues/46](https://togithub.com/bluwy/publint/issues/46)) **Full Changelog**: bluwy/publint@v0.1.16...v0.2.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/tnez/actions). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4xMS4wIiwidXBkYXRlZEluVmVyIjoiMzcuMTAzLjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
jsnext
andjsnext:main
fields are superseded bymodule
field (jsforum/jsforum#5, https://github.com/rollup/rollup/wiki/pkg.module#:~:text=(Note%3A%20Tools%20such%20as%20rollup%2Dplugin%2Dnode%2Dresolve%20and%20Webpack%202%20treat%20jsnext%3Amain%20and%20module%20interchangeably.%20They%27re%20the%20same%20thing%2C%20except%20that%20module%20is%20more%20likely%20to%20become%20standardised.)).This PR adds a warning for those fields.