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

Packages: Extract dom package and make it maintained with Lerna #6758

Merged
merged 2 commits into from
May 16, 2018

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented May 15, 2018

Description

Related issues: #3955, #6594.

This PR tries to provide Lerna setup similar to what we have in WordPress/packages. This would allow publishing source code of individual modules to npm to make them available for all plugin developers.

This PR extract new dom package which contains all DOM utils.

Open question

Question is if we should also provide deprecation message for all moved functions from @wordpress/utils?

How has this been tested?

Manually:

  • Removed node_modules folder.
  • npm install
  • npm test
  • npm run dev
  • npm run build
  • npm run package-plugin

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code has proper inline documentation.

@gziolo gziolo added npm Packages Related to npm packages [Type] Refactoring labels May 15, 2018
@gziolo gziolo added this to the 2.9 milestone May 15, 2018
@gziolo gziolo self-assigned this May 15, 2018
@gziolo gziolo requested review from youknowriad and ntwb May 15, 2018 10:57
Copy link
Member

@ntwb ntwb left a comment

Choose a reason for hiding this comment

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

LGTM 👍

{
selector: 'ImportDeclaration[source.value=/^dom$/]',
message: 'Use @wordpress/dom as import path instead.',
},
Copy link
Member

Choose a reason for hiding this comment

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

👍

@ntwb
Copy link
Member

ntwb commented May 15, 2018

Possible merge conflict with #6756 when it comes time to merge

@gziolo gziolo force-pushed the update/extract-dom-package branch from 9df1f7d to 2e2e857 Compare May 15, 2018 14:34
@gziolo
Copy link
Member Author

gziolo commented May 15, 2018

Added deprecation for all dom utils in wp.utils and rebased with master.

@gziolo
Copy link
Member Author

gziolo commented May 15, 2018

There are packages which depend on react and react-dom and it produces warnings when they are only hoisted, too early to remove them from root file…

The same applies to moment and tinymce, the only difference is that nothing warns :)
Removing c367c49 from this PR.

@gziolo gziolo force-pushed the update/extract-dom-package branch from c367c49 to 2e2e857 Compare May 15, 2018 14:56
@youknowriad youknowriad merged commit 5d7bc40 into master May 16, 2018
@youknowriad youknowriad deleted the update/extract-dom-package branch May 16, 2018 09:31
@ellatrix ellatrix added [Type] Code Quality Issues or PRs that relate to code quality and removed [Type] Code Quality Issues or PRs that relate to code quality labels Nov 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
npm Packages Related to npm packages [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants