Closed agilgur5 closed 4 years ago
Ok fixing the conflicts with #582 in yarn.lock
was not easy 😕 . But done now, so this is ready to merge. Should go in before #525 , so need to review this soon
Realized I might be able to use yarn workspaces to have the integration-tests
dir split out. Then TSDX can still be used (and as tsdx
in scripts), but shared devDeps might not work correctly unless we put them in root similar to Lerna.
I feel like that's really involved prior to having a monorepo (see #634, #635), but that might correctly describe the relationship between TSDX and its integrations; i.e. that it's a separate dependency.
Hmmmmmm... Then again, the relationship between integration tests and E2E tests is actually the same -- they both should be separate workspaces with tsdx
used inside of them. So can hold off on this for a bit I guess, since will be refactoring the E2E to be unit tests eventually (and so might do the same for integration?)
execWithCache
everywhere like it has. This actually took a bit of effort due to the number of commits and renames to rebase against.grep
helper to utils/shell.js
util
to utils/fixture.js
(also took some effort due to renames / rewriting imports)utils/psTree.js
and its dependenciesutils-safePackageName.test.ts
to a unit test dir
This is quite a big PR as it refactors a bunch of the test set-up to handle two different types of tests, as well as adds integration tests for
tiny-invariant
,rollup-plugin-postcss
,styled-components
, andregeneratorRuntime
. Fixes #481I initially tried to have the integration tests have their own
package.json
andnode_modules
, as thebuild-withConfig
folder had before (and with a new CI workflow withworking-directory
set to the integration test dir), but this proved extremely confusing and very time-consuming to deal with. It basically requires that scripts, like tests, run from the integration test dir, as if they run from root, they won't read thenode_modules
(node scans upward, so from the integration test dir, it'll get the integration deps and the TSDX deps, but the opposite doesn't work). And trying to run scripts from there causes lots of inconsistencies all over the place, so I just scrapped that idea. Open to ideas on better integration testing structures, but the other option proved completely not worth the time, so don't want to spend a ton more time trying to get something else to work either.Also found some integration failures all over the place while adding this, welp 😕 These include:
--extractErrors
removesinvariant
but doesn't replace it withErrorProd
orErrorDev
. And it leaves the import in, just importing nothing 😕warning
isn't changed what-so-everrollup-plugin-postcss
any PostCSS plugins likeautoprefixer
andcssnano
work, but the name of the extracted CSS file is the same as the output, i.e.package-name.cjs.development.css
babel-plugin-styled-components
doesn't work, plugin order matters for it. See #543