Spec Parser: Move generated spec parser to package#13493
Conversation
|
|
||
| # 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.
This check is already accounted for in CI by:
- The files are automatically built as a
postinstallstep - CI runs
check-local-changesto verify no commit-able files
gziolo
left a comment
There was a problem hiding this comment.
Yes, this is all good. As long as those files land on npm they can be ingored from git repository.
Very nice refactor.
|
|
||
| # 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 |
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.phpas a generated build artifact of theblock-serialization-spec-parserpackage, both removing it fromlib/and from source altogether, assumed to be generated as part ofnpm run buildin time for a package publish. This treatment has been applied to theparser.jsgenerated result as well.Testing instructions:
lib/parser.phpis not actually used by Gutenberg, so it should have no impact on the effective behavior of the plugin.Verify that
parser.jsandparser.phpare generated topackages/block-serialization-spec-parserafternpm install.Ensure that tests pass covering the generated files: