Skip to content

Conversation

@fregante
Copy link
Member

@fregante fregante commented May 5, 2020

As discussed a while back, I'm going to extract the page detection functions into a standalone module: https://github.com/fregante/github-url-detection

Pros

  • They can be reused by others
  • This frees us from testing them here on every commit (the tests often time out)

Con

  • Function updates and additions need to be made to a separate repo (but can temporarily also be in the feature’s file)

Con alleviator

  • Set up automatic deployment and maybe automatic protected PR merging

TODO

  • Pick name (help wanted). Does github-page-detection sound good?
  • Publish package
  • Install dependency here

@fregante fregante added help wanted meta Related to Refined GitHub itself labels May 5, 2020
@fregante fregante requested a review from sindresorhus May 5, 2020 12:58
@fregante
Copy link
Member Author

fregante commented May 5, 2020

cc @Mottie would these be useful to you? https://github.com/sindresorhus/refined-github/blob/2e5c19a4d8fa7db94e775beeac9b8bd610a2fa2b/source/libs/page-detect.ts

They already depend on https://github.com/Mottie/github-reserved-names

@sindresorhus
Copy link
Member

Does github-page-detection sound good?

👍

@yakov116
Copy link
Member

yakov116 commented May 5, 2020

If you want I resorted the imports for you yakov116@defadab and removed the duplicate imports

@fregante
Copy link
Member Author

fregante commented May 5, 2020

Does github-page-detection sound good?

👍

I realized it sounds like GitHub Pages and might cause confusion. Maybe github-url-detection?

fregante and others added 5 commits May 6, 2020 02:34
Co-Authored-By: yakov116 <yakov116@users.noreply.github.com>
Undo, fix
Autofix
@fregante fregante marked this pull request as ready for review May 6, 2020 14:15
@fregante fregante changed the title Extract page-detect.ts Extract page-detect.ts into github-url-detection May 6, 2020
@fregante
Copy link
Member Author

fregante commented May 6, 2020

This is ready to be merged

@fregante fregante merged commit a24d946 into master May 7, 2020
@fregante fregante deleted the extract-page-detect branch May 7, 2020 23:42
@fregante
Copy link
Member Author

fregante commented May 7, 2020

fregante/github-url-detection 🎉

Here's the clean output that a non-webpack-built module can achieve outside Refined GitHub: https://www.unpkg.com/browse/github-url-detection@1.0.0/esm/index.js

This will also speed up our testing and avoid CI testing timeouts.

Git history was preserved in the module repository. PRs always welcome. Present Refined GitHub maintainers can ask me to be added to github-url-detection as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

help wanted meta Related to Refined GitHub itself

Development

Successfully merging this pull request may close these issues.

3 participants