-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Spec Parser: Move generated spec parser to package #13493
Conversation
@@ -21,16 +21,6 @@ fi | |||
|
|||
npm run build || exit 1 | |||
|
|||
# Make sure phpegjs parser is up to date | |||
node bin/create-php-parser.js || exit 1 | |||
if ! git diff --quiet --exit-code lib/parser.php; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is already accounted for in CI by:
- The files are automatically built as a
postinstall
step - CI runs
check-local-changes
to verify no commit-able files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @aduth! This seems like a good improvement on code organization and reducing noise in the repo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, this is all good. As long as those files land on npm they can be ingored from git repository.
Very nice refactor.
@@ -21,16 +21,6 @@ fi | |||
|
|||
npm run build || exit 1 | |||
|
|||
# Make sure phpegjs parser is up to date | |||
node bin/create-php-parser.js || exit 1 | |||
if ! git diff --quiet --exit-code lib/parser.php; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I think this might not actually be working as expected yet. I learned recently that apparently npm will inherit a
https://docs.npmjs.com/files/package.json#files Indeed, running We could define |
Started with a whitelist, but apparently some of the main exports of the package include tests, so switched to an empty |
Thanks for exploring it further. I took it by surprise that it works this way. It should be okey to proceed as is 💯 |
Thanks for this! |
…rnmobile/372-enter-key-detection-to-title * 'master' of https://github.com/WordPress/gutenberg: (29 commits) Update for RangeControl documentation (#12564) Plugin: Deprecate gutenberg_load_list_reusable_blocks (#13456) Update the columns attribute in onSelectImages so that if images are removed via the media modal, the columns can't be higher than the new number of images (#13488) Replace the fullscreen "exit" icon with a back arrow (#13403) Include :visited links in button color (#12183) Amazon Kindle block (#13510) Plugin: Deprecate gutenberg_prepare_blocks_for_js (#13457) Add watcher on Linux: change fs to node-watch (#13448) Plugin: Deprecate `gutenberg` theme support (#13458) Datepicker: Add inValidDay support (#12962) Block Switcher: Render disabled button even if multi-selection (#13431) Plugin: Deprecate gutenberg_register_post_types (#13468) Plugin: Deprecate register_tinymce_scripts (#13466) Set minimum of words for RSS excerpt (#13502) Plugin: Deprecate gutenberg_get_block_categories (#13454) Plugin: Deprecate gutenberg_content_block_version (#13469) API Fetch: Expose nonce on created middleware function (#13451) Plugin: Remove list screens integrations (#13459) Plugin: Remove core-defined block detection functions (#13467) Spec Parser: Move generated spec parser to package (#13493) ...
* Spec Parser: Move generated spec parser to package * Spec Parser: Add empty npmignore * Spec Parser: Add CHANGELOG entry
* Spec Parser: Move generated spec parser to package * Spec Parser: Add empty npmignore * Spec Parser: Add CHANGELOG entry
This pull request seeks to treat
lib/parser.php
as a generated build artifact of theblock-serialization-spec-parser
package, both removing it fromlib/
and from source altogether, assumed to be generated as part ofnpm run build
in time for a package publish. This treatment has been applied to theparser.js
generated result as well.Testing instructions:
lib/parser.php
is not actually used by Gutenberg, so it should have no impact on the effective behavior of the plugin.Verify that
parser.js
andparser.php
are generated topackages/block-serialization-spec-parser
afternpm install
.Ensure that tests pass covering the generated files: