Open userquin opened 10 months ago
I need to renamepostinstall
scripts in .pnpm
folder for lit-html
and nodemod
to xpostinstall
@userquin Thanks for reporting this. The postinstall
should not be run for published package as it is only required for local development. Let me look into it and raise a PR to fix that.
I run pnpm install --frozen-lockfile
from root folder.
EDIT: you should add "packageManager": "pnpm@8.14.1"
to your package.json
I'm going to fix package exports, this package should have package exports properly configured, it has some missing node10 types for some subpackages, check for example lit here https://arethetypeswrong.github.io/?p=lit%403.1.1
You can check this package here: https://arethetypeswrong.github.io/?p=app-datepicker%405.1.1 or latest 6 rc33 here https://arethetypeswrong.github.io/?p=app-datepicker%406.0.0-rc.33
@userquin Thanks for raising this issue. IIUC node10 means node v10 which is a pretty old version of node. Not sure if that is still needed. Correct me if I'm wrong.
Feel free to raise a PR to fix the exports.
It is still being used, it it about compilerOptions.moduleResolution
in tsconfig.json
file (legacy):
"moduleResolution": "node", // or node10
Feel free to raise a PR to fix the exports.
I need to build the package and the tgz to check it, and it is failing when running pnpm tsc
:
I don't remember seeing these errors. Let me check that later when I'm with my laptop.
We need to add a few entries to "typesVersions" and add some missing .js
extension in some module, for example in src/date-picker-dialog/typings.ts
L3 and fix app-datepicker/date-picker-input
(dts not being generated)
@userquin, I'm considering if it's beneficial to reference https://arethetypeswrong.github.io. It seems that the issues it uncovers aren't consistently the same, as it uses different TypeScript versions for validation. Yesterday it was 4.4.4 and today it's 5.3.3, if I'm not mistaken. Interestingly, I didn't find any errors in yesterday's check, but today's results vary. Additionally, I'm skeptical about the need for typesVersions
since exports
should be the definitive source for types exports (See here). Also, app-datepicker
doesn't support older TypeScript versions, much like lit
.
@userquin, could you kindly share the version you attempted to install? From what I can see, it's only v5 that has the typing issues that are confusing TypeScript.
exports
should be the definitive source for types exports
This is when using Node16 module resolution, if using "Node" or "Node10" the subpackages exports dts files should be present in the root directory of the package.
typesVersions
has been used in the draft PR to avoid to copy those dts files (or create them in the root folder).
Check https://github.com/motss/app-datepicker/pull/223#issuecomment-1900101535
@userquin, could you kindly share the version you attempted to install? From what I can see, it's only v5 that has the typing issues that are confusing TypeScript.
I'm using main branch
I did some checking on https://arethetypeswrong.github.io/?p=app-datepicker%406.0.0-rc.33
again not long while ago.
By referring to the above screenshot, you can see that it is clearly different from the screenshot in https://github.com/motss/app-datepicker/issues/222#issuecomment-1898572994. You can see that some do not have typing issues while some do have internal resolution error which seems like an internal issue happening under the hood which might or might not related to my exports
in package.json
.
I'm particularly curious to find out more on why not all having the exact same issue because the trace shows that the dts file can be resolved correctly but it ended up with some internal resolution error
which does not make sense to me and the tool does not show any other helpful error message for us to understand more.
I haven't tried running npm pack
then upload to verify the package. Will do it later to find out more.
By referring to the above screenshot, you can see that it is clearly different from the screenshot in https://github.com/motss/app-datepicker/issues/222#issuecomment-1898572994. You can see that some do not have typing issues while some do have internal resolution error which seems like an internal issue happening under the hood which might or might not related to my exports in package.json.
It is the same result with proper types when using "node/node10" (missing types in app-datepicker/date-picker-input
subpackage in 222 is only because the dts not being generated in my local).
You can create a simple lit-ts app with app-datepicker in StackBlitz changing tsconfig file to use node
instead bundler
importing some subpackage.
The problem is about subpackages exports when using "node" module resolution, app-datepicker
is fine.
I'm particularly curious to find out more on why not all having the exact same issue because the trace shows that the dts file can be resolved correctly but it ended up with some internal resolution error which does not make sense to me and the tool does not show any other helpful error message for us to understand more.
Missing .js
extensions in static imports in some typings.ts modules, check files changed in the draft PR.
Description
Check issue title.
There are also some
sh
usages in this repo, you can userimraf
to remove files and folders.Expected outcome
Dependencies should be installed
Actual outcome
Live Demo
NA
Steps to reproduce
Run
pnpm install
on Windows OSBrowsers Affected
NA