Nyalab / caniuse-api

request the caniuse data to check browsers compatibilities
MIT License
356 stars 27 forks source link

Explicit requires #41

Closed tiagocpontesp closed 8 years ago

tiagocpontesp commented 8 years ago

See https://github.com/Nyalab/caniuse-api/issues/40

MeoMix commented 8 years ago

I'd just like to follow-up on this and mention that this PR is riding on the tail of previous PRs intended to increase JSPM's support for deps which use caniuse-db (ref: https://github.com/postcss/autoprefixer/issues/618 and https://github.com/postcss/autoprefixer/pull/619)

MoOx commented 8 years ago

What is the issue here? I don't understand what this code is changing.

MeoMix commented 8 years ago

Heh. @tiagocpontesp I think you just shifted code around rather than removing a line of code.

The intent was to remove the logic which removes ".json" file endings. There's nothing wrong with being explicit (as far as I'm aware!) and it confuses JSPM which assumes ".js" if there's no file ending.

tiagocpontesp commented 8 years ago

hey, the code does what it's supposed to: it keeps the json file endings. PS: this doesn't affect the tests, something else made the CI fail.

MeoMix commented 8 years ago

@tiagocpontesp But nothing in the code actually changed...? Instead of two map calls (replace JSON file ending, return require statement) the code is now just a single map call, but it does both those things. So.. it's the same?

tiagocpontesp commented 8 years ago

It is changed! Did you try to run it?

MeoMix commented 8 years ago

Oh! I see it now. The return statement has both feature and file in it where file still has the .json ending. Cool :+1:

alexisvincent commented 8 years ago

@MoOx Would love to see this change merged. Will help a lot with jspm users wanting to use postcss.

Nyalab commented 8 years ago

Closing in favour of #43