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

[MAJOR] Convert to ES Modules #95

Merged
merged 5 commits into from
Aug 16, 2021
Merged

[MAJOR] Convert to ES Modules #95

merged 5 commits into from
Aug 16, 2021

Conversation

decompil3d
Copy link
Contributor

This PR converts Pullie to native ECMAScript Modules (from CommonJS).

@coveralls
Copy link

coveralls commented Aug 11, 2021

Pull Request Test Coverage Report for Build 1137078901

  • 129 of 129 (100.0%) changed or added relevant lines in 12 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 677286295: 0.0%
Covered Lines: 1132
Relevant Lines: 1132

💛 - Coveralls

plugins/jira/index.js Outdated Show resolved Hide resolved
Co-authored-by: Bradley Farias <bradley.meck@gmail.com>
Copy link

@msluther msluther left a comment

Choose a reason for hiding this comment

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

A few comments, nothing really blocking though.

@@ -16,7 +16,7 @@ jobs:

strategy:
matrix:
node-version: [10.x, 12.x, 14.x]
node-version: [12.x, 14.x, 16.x]

Choose a reason for hiding this comment

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

Does it still need to support node@12? You're updating ESLint to ecma version 2020, but I don't believe node@12 supports most of that. A new major version would be a great time to drop support for an older node version. That said EOL for node@12 isn't until 2022-04-30

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nothing says that I have to support ALL Node.js versions -- might as well just cull down to 14 and 16.

Comment on lines 3 to 7
import sinon from 'sinon';

assume.use(assumeSinon);

import processConfig, { applyExcludeList, applyIncludeList } from '../../config-processor.js';

Choose a reason for hiding this comment

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

IMHO stylistically, imports belong above code.

Also IMHO move the assume.use(assumeSinon) into a global test setup so you don't have to do it everywhere or assume some file executed before another (i.e. this is leaky)

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 like to do this only in the test files that use sinon as the typings for assume-sinon extend the assume types in VS Code, so the import actually does something.

assume.use(assumeSinon);

import WelcomePlugin from '../../../plugins/welcome/index.js';
import Commenter from '../../../commenter.js';

const sandbox = sinon.createSandbox();

Choose a reason for hiding this comment

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

Do you still need a sinon sandbox? 99% of the time you just want to use the default sandbox of sinon itself

@decompil3d decompil3d merged commit 1c83802 into main Aug 16, 2021
@decompil3d decompil3d deleted the esm branch August 16, 2021 21:46
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.

None yet

4 participants