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 viewport package #7975

Merged
merged 1 commit into from
Jul 16, 2018
Merged

Packages: Extract viewport package #7975

merged 1 commit into from
Jul 16, 2018

Conversation

gziolo
Copy link
Member

@gziolo gziolo commented Jul 16, 2018

Part of #3955.

This PR moves viewport module to packages folder and converts it to npm package maintained by Lerna. It's mostly boils down to moving files. In addition, I had to add package.json file and a few small adjustments to the existing setup.

There are NO breaking changes

I also added a few unrelated changes where I discovered that we didn't list dev dependencies in other packages.

Testing instructions

  • Make sure the tests pass without regression
  • Make sure that editor still works

@gziolo gziolo added the npm Packages Related to npm packages label Jul 16, 2018
@gziolo gziolo added this to the 3.3 milestone Jul 16, 2018
@gziolo gziolo self-assigned this Jul 16, 2018
@gziolo gziolo requested review from youknowriad, gwwar and aduth July 16, 2018 08:59
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

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

Straightforward 👍

@@ -0,0 +1,34 @@
{
"name": "@wordpress/viewport",
"version": "1.0.0-alpha.3",
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess it's not that important but I thought we were using -beta.0 for the first unpublished versions. Since we publish stable versions directly, it's not very important.

Copy link
Member Author

Choose a reason for hiding this comment

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

I think we are going to publish 1.0.0 later this week for all packages to make publishing with 2FA maintinanable 😄

@gziolo gziolo merged commit b00aea3 into master Jul 16, 2018
@gziolo gziolo deleted the add/viewport-package branch July 16, 2018 09:47
@gziolo gziolo added the [Package] Viewport /packages/viewport label Jul 16, 2018
@aduth
Copy link
Member

aduth commented Jul 16, 2018

I think this may have broken npm run docs:build:

> [email protected] docs:build /Users/andrew/Documents/Code/vvv/www/editor/htdocs/wp-content/plugins/gutenberg
> node docs/tool

fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open '/Users/andrew/Documents/Code/vvv/www/editor/htdocs/wp-content/plugins/gutenberg/viewport/store/selectors.js'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at namespaceConfig.(anonymous function).forEach (/Users/andrew/Documents/Code/vvv/www/editor/htdocs/wp-content/plugins/gutenberg/docs/tool/parser.js:25:21)
    at Array.forEach (<anonymous>)
    at forEach (/Users/andrew/Documents/Code/vvv/www/editor/htdocs/wp-content/plugins/gutenberg/docs/tool/parser.js:24:28)
    at Array.forEach (<anonymous>)
    at Object.entries.forEach (/Users/andrew/Documents/Code/vvv/www/editor/htdocs/wp-content/plugins/gutenberg/docs/tool/parser.js:23:30)
    at Array.forEach (<anonymous>)
    at module.exports (/Users/andrew/Documents/Code/vvv/www/editor/htdocs/wp-content/plugins/gutenberg/docs/tool/parser.js:15:27)
    at Object.<anonymous> (/Users/andrew/Documents/Code/vvv/www/editor/htdocs/wp-content/plugins/gutenberg/docs/tool/index.js:14:23)

@gziolo
Copy link
Member Author

gziolo commented Jul 16, 2018

Right, I should remove it from yet another list of non-package modules 😃
This line: https://github.com/WordPress/gutenberg/blob/master/docs/tool/config.js#L23

And also path to store folder is outdated now.

@gziolo
Copy link
Member Author

gziolo commented Jul 17, 2018

@aduth, the issue was fixed in #7994.

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 [Package] Viewport /packages/viewport
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants