-
Notifications
You must be signed in to change notification settings - Fork 72
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
Publish crawled data with fixes to NPM? #63
Comments
Totally fine publishing webref to NPM! We hadn't done it until now simply because no one had asked ;) Also OK to include additional views with IDL guarantees in that package. I suppose that requires maintaining:
Code could either go in Reffy, in this repo directly (for instance as an action that runs any time a push is made), or perhaps in a separate "webgap" repo whose final goal is to disappear... @foolip, would you like to propose some code to create the fixed version? |
We have most of the ingredients needed for this, the question is mainly how to maintain the fixes and what should be included in the NPM package. While spec updates will often break things, it would be great if significant manual work is only needed each time broken IDL is added or changed. So the ingredients of a solution might be:
I'm not sure what should be included in the package, but would suggest starting small, so that we don't include crawl.json, or study.json in particular. @tidoust how does that sound? Does the w3c already have a NPM account, or whose secret would we add to the repo? |
That seems good. If we release one package with both the raw IDL and the fixed IDL, we could have something like the following:
We probably don't want to provide fixed IDL extracts for specs under The Alternatively, we could release two packages:
W3C already has an NPM account, although I still need to figure out who actually runs it. We may start with my account. I don't think NPM has any real notion of ownership for packages, merely of collaborators entitled to publish the package, so we can easily change accounts later on. Folder names are open for comments as usual :) |
@tidoust do you think we strictly speaking need, idlparsed, or could we have webidl2.js as a peerDependency, and provide a |
No, Discussing this again with @dontcallmedom, we rather propose to publish a minimal set of dedicated packages, that only change when relevant info changes, instead of a single package that contains everything and that is basically going to be updated each time a spec gets a minor update, making it harder to track relevant updates. In other words, we're more considering something like:
Packages would likely integrate an index file, generated from A project that needs to mix info would import multiple packages. We could also create a global package, we're just unaware of projects that need to have all the info at once for now (or that would a package with |
That sounds great actually! Do you think we should have the code for building and releasing these packages here in webref, or as separate repos? I'd like to work on the |
I'd still like to work on this. Can I just go ahead with the assumption that the package name will be |
I'm also interested as I intend to replace https://github.com/microsoft/TypeScript-DOM-lib-generator/tree/master/inputfiles/idl with webref, once microsoft/TypeScript-DOM-lib-generator#915 merges. |
Lerna is a tool for managing monorepos, and while @webref/idl is the only package here now, the packages/* structure makes sense. Fixes #63.
Lerna is a tool for managing monorepos, and while @webref/idl is the only package here now, the packages/* structure makes sense. Fixes #63.
I've suggested a setup for this in #68. It's still missing a mechanism to actually maintain the fixes, and the tests to ensure consistency of all of the IDL when interpreted together. |
Lerna is a tool for managing monorepos, and while @webref/idl is the only package here now, the packages/* structure makes sense. Fixes #63.
Lerna is a tool for managing monorepos, and while @webref/idl is the only package here now, the packages/* structure makes sense. Fixes #63.
Lerna is a tool for managing monorepos, and while @webref/idl is the only package here now, the packages/* structure makes sense. Fixes #63.
Lerna is a tool for managing monorepos, and while @webref/idl is the only package here now, the packages/* structure makes sense. Fixes #63.
Lerna is a tool for managing monorepos, and while @webref/idl is the only package here now, the packages/* structure makes sense. Fixes #63.
Package gets prepared and published from the `packages/*` subfolder with Lerna. Further packages are expected to be created. Note this introduces a couple of line ending fixes for scripts to run on Windows: - 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. Fixes #63.
I just did an experiment in to package up webref/ed/idl/*.idl with fixes from a branch and publish it as https://www.npmjs.com/package/webidl-dfns.
IDL with fixes applied is needed for mdn-bcd-collector, and I wanted to have it as a regular dependency rather than pulling it from a branch that I keep changing.
However, having done that experiment, I wonder if there would be interest in publishing webref directly to NPM? In addition to include ed/ and tr/ as-is, we would also provide fixed versions of ed/idl/* which we guarantee will parse with a given version of webidl2.js.
One could go further if one wanted to with global consistency guarantees such as:
mdn-bcd-collector already does some of this, but if it could be centralized, I think WPT would also be better off making use of released data with some guarantees.
The text was updated successfully, but these errors were encountered: