Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update toolchain #1576

Merged
merged 12 commits into from
May 6, 2021
Merged

Update toolchain #1576

merged 12 commits into from
May 6, 2021

Conversation

Marc-Andre-Rivet
Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet commented Mar 25, 2021

Fixes partially plotly/dash-core#203

py37 Percy run with all the changes, prior to bumping to py39: https://percy.io/plotly/dash/builds/9542243/unchanged/538975044?browser=firefox&viewLayout=side-by-side&viewMode=new&width=1280

  • Followup: remove py37 build checks in GH
  • Update Webpack and Eslint (transition from deprecated Tslint)
  • Port tests from Jest to Karma+Mocha: two pluses for this is that it now actually runs the tests in the browser instead of node and it's a more stable stack

@Marc-Andre-Rivet Marc-Andre-Rivet marked this pull request as ready for review March 25, 2021 22:31
@@ -13,12 +13,12 @@ jobs:

artifacts:
docker:
- image: circleci/python:3.7.9-stretch-node-browsers
- image: circleci/python:3.9.2-buster-node-browsers
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updating to py39 and latest py36 image

]
},
"parser": "babel-eslint",
"extends": [
Copy link
Contributor Author

@Marc-Andre-Rivet Marc-Andre-Rivet Mar 27, 2021

Choose a reason for hiding this comment

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

  • update eslint
  • port deprecated tslint to eslint plugin
  • drop redundant explict react linting configuration

@@ -7,12 +7,4 @@ module.exports = {
plugins: [
'@babel/plugin-proposal-class-properties',
],
env: {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needed by Jest but irrelevant with Karma/Mocha


const WAIT = 1000;
const WAIT = 500;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Mocha times out by default after 2000ms. Shorten the wait to prevent failure.

});

await new Promise(r => setTimeout(r, WAIT));
expect(done).toEqual(true);
expect(done).to.equal(true);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Slight syntax differences with toEqual and toBe being replaced by to.equal and to.deep.equal depending on the situation

@@ -20,6 +20,7 @@
"traceResolution": false
},
"include": [
"src/*"
"src/**/*",
"tests/**/*"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also lint tests

...defaults
};

module.exports = options => [
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Small change here allowing further customization of the Webpack configuration for (a) the build, (b) testing

];
};
module.exports = config({
target: ['web', 'es5']
Copy link
Contributor Author

Choose a reason for hiding this comment

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

New to Webpack 5, by default webpack's injected code is not ES5

}

return mutateCallbacks(s, a);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Funny that these new rules prohibit if(...) {return a} else { return b} but not the same with else if 🤷

Copy link
Collaborator

@alexcjohnson alexcjohnson left a comment

Choose a reason for hiding this comment

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

💃 Excellent.

@Marc-Andre-Rivet
Copy link
Contributor Author

Updated checks, removing py 3.7 entries in favor of py 3.9 entries.

@Marc-Andre-Rivet Marc-Andre-Rivet merged commit 6ef7a6d into dev May 6, 2021
@Marc-Andre-Rivet Marc-Andre-Rivet deleted the update-toolchain-20210322 branch May 6, 2021 13:32
@alexcjohnson alexcjohnson mentioned this pull request May 28, 2021
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants