Skip to content

Packages: Extract viewport package - #7975

Merged
gziolo merged 1 commit into
masterfrom
add/viewport-package
Jul 16, 2018
Merged

gziolo merged 1 commit into
masterfrom
add/viewport-package

Conversation

@gziolo

@gziolo gziolo commented Jul 16, 2018

Copy link
Copy Markdown
Member

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 aduth, gwwar and youknowriad July 16, 2018 08:59

@youknowriad youknowriad left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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

aduth commented Jul 16, 2018

Copy link
Copy Markdown
Member

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

> gutenberg@3.2.0 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

gziolo commented Jul 16, 2018 •

Copy link
Copy Markdown
Member Author

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

gziolo commented Jul 17, 2018

Copy link
Copy Markdown
Member Author

@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