stripes-core won't run tests when dependencies installed from NPM

Description

In expectation of Webpack 2 handling ES6 imports pseudo-natively we don't transpile stripes-connect and stripes-components

This causes problems for testing as there we use babel (the transpiler) without Webpack and thus it doesn't follow our Webpack config.

Bertrand fixed it quickly with what he knew offhand but it's probably less roundabout to do this in the .babelrc rather than sort-of proxy it through a configured babel-register?

CSP Request Details

None

CSP Rejection Details

None

Potential Workaround

None

Attachments

1

Checklist

hide

TestRail: Results

Activity

Show:

Jason Skomorowski July 17, 2017 at 3:21 PM

I'm also seeing this sort of issue when trying to run the tests for stripes-connect and having stripes-redux installed as an npm.

Jason Skomorowski March 5, 2017 at 8:15 PM

Yes, I have no reason to believe this issue has changed as we haven't altered the way module loading is done yet. I added to track that.

What I hope to achieve is for Webpack to combine the ES2015 modules before transpilation but I'm not yet sure if that's how it actually works.

When addressing this we can also potentially deal with the current duplication of settings between the webpack config (stripes.js) and .babelrc (tests) and return to just using .babelrc (I already don't recall exactly why we needed to move it to the webpack config but it may be that the platform structure addresses this)

I'll leave this link here as I'm cleaning up the huge mess of tabs I have open:
http://stackoverflow.com/questions/34444716/babelrc-ignore-field-seems-to-be-ignored

Wolfram Schneider March 1, 2017 at 11:47 AM

Is this still an issue after we migrated to webpack2?

Jason Skomorowski January 10, 2017 at 5:05 AM
Edited

Left a bit of time on my one-day-checking-in-on-vacation to see if this made more sense with fresh eyes but doesn't seem to.

Since .babelrc is JSON the plain regex syntax doesn't work. But quoting it there also fails to transpile so that's probably not the way to specify that. So I also tried "ignore": "node_modules/@folio" ...then also "node_modules/@folio/*/**" and a variety of other permutations including full path and filename of the first file failing to transpile (also as a singleton array)

Did some research and apparently there was a point where ignore was simply unsupported in .babelrc but it appears that it ought be fixed (the version of babel and babel-register from NPM are weeks newer than when the PR was ostensibly applied) but perhaps it still hasn't percolated through.

https://github.com/babel/babel/issues/3789
https://github.com/babel/babel/pull/3644

This seems to confirm it's out though:
https://github.com/babel/babel/issues/4568

Here's an alternative approach I might try:
https://github.com/babel/babel/issues/3985

Won't Do

Details

Assignee

Reporter

Labels

Priority

Development Team

Stripes Force

TestRail: Cases

Open TestRail: Cases

TestRail: Runs

Open TestRail: Runs

Created December 13, 2016 at 11:20 PM
Updated July 1, 2020 at 2:48 PM
Resolved July 1, 2020 at 2:48 PM
TestRail: Cases
TestRail: Runs