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

Types break cleye #28

Open
2 tasks done
mmkal opened this issue Jun 26, 2024 · 0 comments
Open
2 tasks done

Types break cleye #28

mmkal opened this issue Jun 26, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@mmkal
Copy link
Sponsor

mmkal commented Jun 26, 2024

Problem

Using the output of the latest develop branch with cleye breaks its types. Screenshot below:

image

I used git bisect to find what change broke it (In case you want to try, I didn't do any fancy npm linking, I just copied the dist folder into my local cleye clone. So I just ran this command for each commit git bisect suggested: pnpm i; git checkout pnpm-lock.yaml; pnpm build; rm -rf ../cleye/node_modules/type-flag/dist; rsync -r dist ../cleye/node_modules/type-flag; (cd ../cleye; pnpm build 2> /dev/null). That command succeeded on master, and failed on develop because of the above typescript error.

git bisect result:

5fcb9cc is the first bad commit
commit 5fcb9cc
Author: Hiroki Osame [email protected]
Date: Tue Apr 16 23:48:44 2024 +0900

style: remove any
path changes
README.md 6 +-
package.json 6 +-
pnpm-lock.yaml 2345 +++++++++++++++++++++++++++++++++++++------------------
src/get-flag.ts 2 +-
src/types.ts 9 +-
src/utils.ts 9 +-

6 files changed, 1587 insertions(+), 790 deletions(-)


I guess one of the any -> unknown changes broke it the typearg extends condition somehow. I'll try to find to time to dig into which exactly, but commenting in the meantime in case anything springs to mind.

Originally posted by @mmkal in #27 (comment)

Expected behavior

Output of this library to work with cleye - but maybe this issue would be better solved in the cleye repo, not sure?

Minimal reproduction URL

https://stackblitz.com/~/github.com/mmkal/cleye

Just run pnpm install && pnpm build in the above - I pushed a change to package.json in the cleye repo to install type-flag from github, then cd into node_modules and build type-flag directly before building cleye. mmkal/cleye@cd34e3a

Version

develop

Node.js version

v18.20.3, but not really relevant

Package manager

pnpm, but not really relevant

Operating system

macOS, but not really relevant

Bugs are expected to be fixed by those affected by it

  • I'm interested in working on this issue

Compensating engineering work financially will speed up resolution

  • I'm willing to offer financial support
@mmkal mmkal added the bug Something isn't working label Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant