Skip to content

Convert package to pure ESM + cleanup #74

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

Merged
merged 21 commits into from
May 4, 2021
Merged

Convert package to pure ESM + cleanup #74

merged 21 commits into from
May 4, 2021

Conversation

fregante
Copy link
Member

@fregante fregante commented May 2, 2021

Closes #72

@fregante fregante marked this pull request as ready for review May 2, 2021 04:37
@@ -50,7 +45,10 @@
"*.ts"
],
"rules": {
"@typescript-eslint/no-unnecessary-condition": "error",
"ava/assertion-arguments": "off",
Copy link
Member Author

Choose a reason for hiding this comment

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

strip-indent is not ESM and the whole TS/ESM setup makes it impossible to get its types without using allowSyntheticDefaultImports in tsconfig, which can create a broken ESM module.

Copy link
Member

Choose a reason for hiding this comment

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

@@ -50,7 +45,10 @@
"*.ts"
],
"rules": {
"@typescript-eslint/no-unnecessary-condition": "error",
"ava/assertion-arguments": "off",
"@typescript-eslint/dot-notation": "off",
Copy link
Member Author

Choose a reason for hiding this comment

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

Comment on lines +50 to +51
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
Copy link
Member Author

Choose a reason for hiding this comment

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

Unfortunate but most tests use regex.test() and it won't be a problem if the result is regex.test(undefined)

]
"nonSemVerExperiments": {
"configurableModuleFormat": true
}
Copy link
Member Author

Choose a reason for hiding this comment

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

@fregante fregante changed the title Convert package to be pure ESM Convert package to be pure ESM + update dev dependencies May 2, 2021
@fregante fregante changed the title Convert package to be pure ESM + update dev dependencies Convert package to be pure ESM + cleanup May 2, 2021
@fregante
Copy link
Member Author

fregante commented May 2, 2021

@yakov116 this is a breaking change, so if you have any breaking changes in mind, I'll wait before releasing it. It can stay here a week anyway

@yakov116
Copy link
Member

yakov116 commented May 2, 2021

Not that I can think of.

Maybe drop isQuickPR? I don't see it working, unless you can give me a working link.

One minor thing needs to be updated

// `getRepositoryInfo` depends on `isRepo` and `isRepo` depends on `isRepoSearch`

getRepositoryInfo does not exist, it was renamed to getRepo.

@fregante
Copy link
Member Author

fregante commented May 2, 2021

getRepositoryInfo does not exist

Sure it does:

https://github.com/fregante/github-url-detection/blob/0b89413b619f54d1cc6264ed78009bceb24e5cff/index.ts#L624

Internally we use getRepo for shortness, but we still export it as getRepositoryInfo

Maybe drop isQuickPR? I don't see it working, unless you can give me a working link.

You can reach that page by visiting a random repository, editing a file, and clicking "Propose file change". The following page will be a compare page with the quick_pull parameter

@fregante
Copy link
Member Author

fregante commented May 2, 2021

We do have some deprecated methods though 👌

Pushed: 3a2fddf

@fregante fregante added the meta label May 3, 2021
@fregante fregante changed the title Convert package to be pure ESM + cleanup Convert package to pure ESM + cleanup May 4, 2021
@fregante fregante merged commit e58ce98 into master May 4, 2021
@fregante fregante deleted the no-cjs branch May 4, 2021 10:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

Convert package to be pure ESM
2 participants