Skip to content

Conversation

@vojtechszocs
Copy link
Contributor

Follow-up to #1871

Using programmatic ts-node registration to un-ignore (i.e. allow transpiling) selected packages in node_modules, which is a work-around of ts-node's design philosophy of ignoring everything under node_modules by default.

This should fix issues encountered by @rawagner and @christianvogt, i.e. ES module syntax errors coming from node_modules code, while trying to dynamically load plugins (their entry modules) as part of the plugin-stats script.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Jul 3, 2019
@spadgett
Copy link
Member

spadgett commented Jul 3, 2019

/assign @christianvogt

@christianvogt
Copy link
Contributor

@vojtechszocs why is the other PR also in here? can this not be a standalone change?

@vojtechszocs
Copy link
Contributor Author

vojtechszocs commented Jul 4, 2019

@vojtechszocs why is the other PR also in here? can this not be a standalone change?

No, this had to be based on #1871 since the jsdom setup is necessary for plugin-stats to correctly load plugins within the Node.js runtime.

Edit: #1871 is merged so I'll update this PR.

@spadgett spadgett added this to the v4.2 milestone Jul 5, 2019
@vojtechszocs
Copy link
Contributor Author

vojtechszocs commented Jul 8, 2019

Edit: #1871 is merged so I'll update this PR.

Edit: PR updated, added one more commit.

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jul 8, 2019
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've realized that Jest takes care of this already via testEnvironment option which defaults to jsdom, i.e. using jest-environment-jsdom implementation.

Jest TestEnvironment is sandboxed, with each test suite having its own env. instance prepared upon setup and destroyed upon teardown.

Since plugin-stats now uses browser-env to setup jsdom, I'm removing this import.

@vojtechszocs vojtechszocs mentioned this pull request Jul 8, 2019
@christianvogt
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 8, 2019
@spadgett
Copy link
Member

spadgett commented Jul 9, 2019

/refresh

@spadgett
Copy link
Member

spadgett commented Jul 9, 2019

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 9, 2019
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2019
@vojtechszocs
Copy link
Contributor Author

Some entries in package.json aren't sorted but I didn't want to change that here, to minimize the changes.

@jelkosz
Copy link

jelkosz commented Jul 9, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 9, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: christianvogt, jelkosz, spadgett, vojtechszocs

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@vojtechszocs
Copy link
Contributor Author

/retest ci/prow/e2e-aws

@vojtechszocs
Copy link
Contributor Author

/retest

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-merge-robot openshift-merge-robot merged commit 499e661 into openshift:master Jul 10, 2019
@logonoff logonoff deleted the fix-plugin-stats branch September 25, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants