Skip to content
This repository has been archived by the owner on May 11, 2018. It is now read-only.

Normalize module format of plugins/built-ins data #376

Merged
merged 2 commits into from
Jul 17, 2017
Merged

Conversation

rtsao
Copy link
Contributor

@rtsao rtsao commented Jul 17, 2017

Slight refactor of data/plugin-features.js that makes it match the same format of data/built-in-features.js where the data is organized by ECMAScript year.

Resolves #373 by allowing package authors to import babel-preset-env/data/plugin-features.js and babel-preset-env/data/built-in-features.js and assemble the desired exclusions/inclusions (corresponding to a language target) on their own. There's no need for a first-class interface as long as the format of data/plugin-features.js and data/built-in-features.js is preserved (whereby a clean userland implementation is possible).

Note: this PR does not alter the output produced by the build-data script in any way. The output is byte-for-byte exactly as what is currently committed to master.

@rtsao rtsao changed the title Normalize plugins/built-ins modules Normalize module format of plugins/built-ins data Jul 17, 2017
@hzoo
Copy link
Member

hzoo commented Jul 17, 2017

I'm cool with the refactor and we probably won't change the file but we can't 100% guarantee that as a public "API"

@hzoo hzoo merged commit 51d9e6d into babel:master Jul 17, 2017
@rtsao
Copy link
Contributor Author

rtsao commented Jul 17, 2017

Thanks, that's good enough for me. I think ideally #373 is made part of the actual API, but since there was lot of pushback, this will suffice until there's a larger discussion.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants