compat-table icon indicating copy to clipboard operation
compat-table copied to clipboard

Publish runnable tests & browser data to npm

Open RReverser opened this issue 9 years ago • 9 comments

See previous discussion at https://twitter.com/kangax/status/678916594089795584.

It would be useful to be able to npm install compat-table and run tests locally in given Node.js engine or bundle into browser. Also, it would be great to have always-fresh officially maintained feature support data (which requires just setting automatic npm-publish on compat-table release).

RReverser avatar Dec 22 '15 12:12 RReverser

If you want to run tests in node though, you'd want to run the test262 tests since those are the official metric, and are much more thorough than what the compat-table has.

It would be great to have the tests browserifiable tho.

ljharb avatar Dec 22 '15 17:12 ljharb

@ljharb Well test262 as you said is much more thorough and what I want is just quick-and-dirty checks that wouldn't slow down initialization.

RReverser avatar Dec 22 '15 17:12 RReverser

Closing this in favour of #785 to keep all discussions in a single place

chicoxyzzy avatar Sep 21 '16 08:09 chicoxyzzy

@chicoxyzzy Usually it's the duplicate (that is, newest) issue that gets closed in favor of previous discussion :P

RReverser avatar Sep 21 '16 09:09 RReverser

@RReverser sorry for that. I'll reopen this issue

chicoxyzzy avatar Sep 21 '16 10:09 chicoxyzzy

Babel team started to implement their babel-preset-env and they want to use data from compat-table https://github.com/babel/babel-preset-env/issues/7. I want to help them. Next week I'll create PR with merging browsers definitions data into one module. That can help us to split test results and test runner easier.

chicoxyzzy avatar Sep 24 '16 11:09 chicoxyzzy

+1 to a separate npm package for data! My use case is that I'm interested in building a list of features available in a given set of browsers and Node versions.

doingweb avatar Nov 06 '16 00:11 doingweb

This would definitely be helpful. I'm currently manually building a JSON file with the info I need from compat-table in my app, which is prone to breaking when certain changes are made to compat-table. A separate npm package for the data, or even just a single JSON file with all the data in this repo, would be great.

jgardella avatar Nov 15 '16 21:11 jgardella

@jgardella we are currently moving in that direction

chicoxyzzy avatar Nov 16 '16 00:11 chicoxyzzy