-
Notifications
You must be signed in to change notification settings - Fork 85
Set up publishing of @webref/idl with Lerna #68
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
Conversation
8a39b0c
to
dc87a1a
Compare
@dontcallmedom does this look sensible? |
Can we also publish CSS things? I can try it as a separate PR though. |
Ping @dontcallmedom for a sensibility review. What's missing here is still the mechanism by which the IDL files will be fixed to be consistent. Options I've considered:
The last option is perhaps my favorite one, but it's a bit iffy that the repo wouldn't work as a shallow checkout, but depends on its own history. |
my own initial idea was to maintain the patches as files in the main branch, so that the content of the package be self-contained. What are the advantages of using a dedicated branch? Whichever way is picked, failing visibly when the patch no longer applies will be important. |
The approach I'm using on TSJS is to simply ignore the failing upstreams and maintain my own IDL. Is there a reason to keep both failing and patched ones? |
77a5950
to
4930e05
Compare
@dontcallmedom, @tidoust and I met and discussed this in a VC today. The main outstanding issue is how to maintain the fixes, as discussed in #68 (comment). Out of the options listed there, maintaining a bunch of patches as files in the repo is the easiest to get started with, so let's go with that. |
f106801
to
4f399f1
Compare
Lerna is a tool for managing monorepos, and while @webref/idl is the only package here now, the packages/* structure makes sense. Fixes #63.
4f399f1
to
28ad533
Compare
@dontcallmedom @tidoust this is ready for review now. I can't really test if the published package will look as hoped, but if we publish 1.0.0 we'll quickly know :) @saschanaz only the fixed IDL will be published, if anyone enjoys broken IDL there's always ed/idl/*.idl in this repo :) |
Co-authored-by: Dominique Hazael-Massieux <[email protected]>
I've been able to publish the 1.0.0 of the package using this pull request: https://www.npmjs.com/package/@webref/idl 🎉 @tidoust will provide a JS rewrite of prepare.sh (so that it can be used on Windows) |
That's not needed, after all. The problem is that the default (and recommended) Git config on Windows makes it convert LF line endings to CRLF in text files, and bash does not like that. I'll add a That said, with that fix, I note I still get the following error when I run the
Anyone knows what may explain this? |
@tidoust SRI.idl should indeed be deleted, and using the version of |
Same cause, different consequences...
The |
- The .gitattributes file tells Git not to convert LF line endings of the bash script. The script cannot run on typical Git configs on Windows otherwise. - The `--binary` option tells `patch` to disable any CRLF to LF conversion when applying the patches. That is also needed for patches to run smoothly on Windows.
It looks like we've found a situation where just a branch would have been easier to deal with, but oh well. Let's add in Since 1.0.0 was already published, it would be great to land this. I've discovered some issues when trying to integrate this into mdn-bcd-collector, but I'd like the original state from which 1.0.0 was published to be in the repo. |
Can we just drop the hardcoded number of IDL files ( |
I fixed a few more small things. Please squash and keep only the first commit message, because I made no effort :) |
Lerna is a tool for managing monorepos, and while @webref/idl is the
only package here now, the packages/* structure makes sense.
Fixes #63.