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

@internationalization/date has two identical (?) module exports (also publint complains) #6257

Open
sparecycles opened this issue Apr 24, 2024 · 1 comment
Labels
waiting Waiting on Issue Author

Comments

@sparecycles
Copy link
Contributor

Provide your feedback here.

these two exports appear to be identical in content?

  "name": "@internationalized/date",
  "version": "3.5.2",
  "description": "Internationalized calendar, date, and time manipulation utilities",
  "license": "Apache-2.0",
  "main": "dist/main.js",
  "module": "dist/module.js", // <
  "exports": {
    "types": "./dist/types.d.ts",
    "import": "./dist/import.mjs", // <
    "require": "./dist/main.js"
  },

Also publint has some complaints... https://publint.dev/@internationalized/date@3.5.2

🔦 Context

I was seeing errors in a esm-target vite/electron/svelte build (via meltui importing @internationalized/date) but the errors cleared up after I "fixed" it and then cleared caches to reconfirm (only happened on windows, to boot).

Something bad must have gotten into the node_modules/.vite cache, possibly due to confusion between package.json having both main/module as well as exports.{require,import} while lacking a clarifying type declaration?

(I can discuss more freely internally).

💻 Code Sample

No response

Version

No response

What browsers are you seeing the problem on?

No response

If other, please specify

No response

What operating system are you using?

No response

@LFDanLu
Copy link
Member

LFDanLu commented May 2, 2024

Those two module exports are there to deal with other bundlers (webpack 4) and their interpretations of esmodules, see #4038

@LFDanLu LFDanLu added the waiting Waiting on Issue Author label May 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting Waiting on Issue Author
Projects
None yet
Development

No branches or pull requests

2 participants