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

Migrate Plugin and PluginManager to TypeScript #2133

Merged
merged 2 commits into from
Feb 11, 2023

Conversation

jovyntls
Copy link
Contributor

@jovyntls jovyntls commented Feb 5, 2023

What is the purpose of this pull request?

  • Documentation update
  • Bug fix
  • Feature addition or enhancement
  • Code maintenance
  • DevOps
  • Improve developer experience
  • Others, please explain:

Part of #1913

Overview of changes:
Migrate Plugin and PluginManager to TypeScript
Also removes plugins/types.ts and moves the types to Plugin.js

Proposed commit message: (wrap lines at 72 characters)
(rebase commit)


Checklist: ☑️

  • Updated the documentation for feature additions and enhancements
  • Added tests for bug fixes or features
  • Linked all related issues
  • No unrelated changes

@jovyntls jovyntls force-pushed the ts-migrate-plugin branch 5 times, most recently from 4fccf71 to 7bf4758 Compare February 6, 2023 08:27
@@ -55,8 +73,6 @@ class PluginManager {
* Load all plugins of the site
*/
_collectPlugins() {
module.paths.push(path.join(this.config.rootPath, 'node_modules'));
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed this line because the module object is not compatible with ES6 imports. This is manually implemented below around line 146.

packages/core/src/plugins/PluginManager.ts Show resolved Hide resolved
@jovyntls jovyntls marked this pull request as ready for review February 6, 2023 08:46
@jovyntls jovyntls changed the title [WIP] Migrate Plugin and PluginManager to TypeScript Migrate Plugin and PluginManager to TypeScript Feb 6, 2023
Copy link
Contributor

@raysonkoh raysonkoh left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, the TS migration is going at a good pace! I have added a few comments.

packages/core/src/plugins/PluginManager.ts Show resolved Hide resolved
packages/core/package.json Show resolved Hide resolved
Copy link
Contributor

@raysonkoh raysonkoh left a comment

Choose a reason for hiding this comment

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

LGTM

@jovyntls jovyntls added this to the 4.0.3 milestone Feb 11, 2023
@jovyntls jovyntls merged commit a1c6d75 into MarkBind:master Feb 11, 2023
@jovyntls jovyntls deleted the ts-migrate-plugin branch February 11, 2023 16:11
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