Commit Graph

50 Commits

Author SHA1 Message Date
Nathan Silveira 0b69d4d6f7
Prepare @woocommerce/admin-layout and block-templates for release (#46538)
* Prepare @woocommerce/block-templates for release

* Prepare @woocommerce/admin-layout for release

* Revert mistake
2024-04-12 13:52:36 +00:00
Ron Rennick c6048b5c49
Add glob, rimraf, and uuid to Syncpack (#46278)
* add uuid to syncpack

* add rimraf to syncpack

* add glob to syncpack

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/notices, @woocommerce/navigation, @woocommerce/internal-js-tests, @woocommerce/integrate-plugin, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/eslint-plugin, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/components, @woocommerce/block-templates, @woocommerce/ai, @woocommerce/admin-layout, @woocommerce/admin-e2e-tests, woocommerce

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-04-11 12:52:49 -03:00
Christopher Allford db8da8d712
Properly Configured Wireit Production Builds (#43716) 2024-01-22 10:13:45 -08:00
Christopher Allford 95bc1189e5
Update `wireit` & Optimize Builds (#43595)
This bumps the version to 0.14.3 so that we can take advantage of some
upstream improvements. It also makes some changes to the way our
builds and watches work to minimize the number of unnecessary
Node processes involved in the execution.
2024-01-15 14:06:55 -08:00
Christopher Allford 758df4854d
Use `ci-jobs` Utility For `ci.yml` Matrix (#43532)
This adds support for using the `pnpm utils ci-jobs` command in our `ci.yml` file. One of the bigger benefits to this change too is that we're now distributing a bundled version of the utils tool. This lets us run it without actually having to install the repo and will let us speed up any workflows that currently do.
2024-01-12 20:32:14 -08:00
Matt Sherman 4114f989e5
Implement useLayoutTemplate hook (#43347)
* Add @wordpress/core-data dependency

* Update lock file

* Implement useLayoutTemplate

* Changelog

* Allow layoutTemplateId param to be undefined

* Only enable useEntityRecord when layoutTemplateId is set

* Workaround for query made when layoutTemplateID is not set

* Use getEntityConfig instead of getEntity

* Update comment with core-data version

* Add doc for useLayoutTemplate
2024-01-09 15:42:20 -05:00
Ron Rennick 8550da9959
bump php version in packages/js/*/composer.json (#42020)
* bump php version in packages/js/*/composer.json

* add package changelogs

---------

Co-authored-by: Ron Rennick <ronald.rennick@automattic.com>
2024-01-04 10:18:34 -04:00
Christopher Allford e46d6bd207
Fixed `watch:build` Race Conditions (#42802)
There's currently a bug with `wireit` that makes the watch crash.
Swiching over to `nodemon` until that is resolved will
keep that from happening.
2023-12-13 18:25:16 -08:00
Christopher Allford 4c4e89bc98
Enhance Build Watching (#42712)
Similarly to `build:project`, a new `watch:build:project`
script will watch individual projects for changes. The
`watch:build` script has been updated so that it does
a deep watch in the same vein as `build`. We have also
hooked up tool-level watching for faster performance.
2023-12-12 12:43:48 -08:00
Christopher Allford 4e89debd0c
Fix Jest Preset (#42707)
When using a preset we need to keep in mind that the transformation
paths are relative to the preset, not the consuming package. We get
around this by using `<rootDir>` in the transform paths. However,
doing this means fixing the root directory for all of the jest tests.
This keeps the tests working in the same way but lets us fix the
preset too.
2023-12-12 09:58:13 -08:00
Christopher Allford 1c635cda6f
Optimized `wireit` Fingerprinting File Inputs (#42684)
Having an explicit `"files"` definition will allow us to fingerprint
dependencies in `wireit` more granularly. This avoids problems
that can be caused by different source files and directories that
trigger a rebuild in a dependee before a dependent finishes.
2023-12-11 16:21:35 -08:00
Christopher Allford 96af36bf1f Locked `wireit` Version 2023-12-09 21:56:12 -08:00
Christopher Allford d244662669 Synchronized Dependencies 2023-12-09 14:40:16 -08:00
Christopher Allford fa011a431b Removed Unnecessary `run` From `pnpm` 2023-12-09 14:36:22 -08:00
Christopher Allford fb6424e6f2 Applied Consistent Outputs 2023-12-09 14:26:36 -08:00
Christopher Allford d015950e86 Wireit Dependencies Set 2023-12-09 14:24:51 -08:00
Christopher Allford e729417335 Revised Test Command
We will never run all tests concurrently so this is better.
2023-12-09 14:14:47 -08:00
Christopher Allford 40852f2fb6 Fixed Test Commands 2023-12-09 14:13:32 -08:00
Christopher Allford 97b5cc48fd Add Wireit: Lots of packages! 2023-12-09 14:05:39 -08:00
Christopher Allford df32d8e967 Added `wireit` Dependency
We're adding this to _every_ package since they have their own
configuration and scripts to run. This also keeps them
isolated so that they can operate independently.
2023-12-09 13:11:15 -08:00
Christopher Allford bc65f9687b Updated Syncpack Dependencies 2023-12-09 07:16:39 -08:00
Christopher Allford 3a88cc739a Updated Dependencies 2023-12-09 07:12:20 -08:00
Christopher Allford 8c6b414fe0
Revert "Refactoring Task Infrastructure" (#41928)
Revert "Refactored Task Infrastructure (#41202)"

This reverts commit 96a973b9fa.
2023-12-06 11:36:12 -08:00
Christopher Allford 96a973b9fa
Refactored Task Infrastructure (#41202)
* Fixed NPM packages with invalid names.
* Renamed plugin packages.
* Standardized package NPM scripts.
* Replaced Turborepo with Wireit.
2023-12-06 09:32:32 -08:00
Christopher Allford 88969742f2
Regenerate PNPM Lock File & Fix Errors (#41830) 2023-12-05 00:36:30 -08:00
Christopher Allford c6b74ddafa
Revert "Resolve PNPM Lock File Errors" (#41828)
Revert "Resolve PNPM Lock File Errors (#41800)"

This reverts commit 2550558a13.
2023-11-30 14:55:35 -08:00
Christopher Allford 2550558a13
Resolve PNPM Lock File Errors (#41800)
This makes the lock file constraints more specific to prevent the
backward incompatible types from WordPress types using the caret
constraint.
2023-11-30 09:33:34 -08:00
louwie17 2b60fd5e83
Prepare block templates package for release (#41707) 2023-11-27 14:09:54 -04:00
RJ 7d465c406a
dev: edited package.json lint scripts to output to console (#41498)
* edited package.jsons to output to console

* Add changefile(s) from automation for the following project(s): @woocommerce/tracks, @woocommerce/product-editor, @woocommerce/onboarding, @woocommerce/number, @woocommerce/navigation, @woocommerce/integrate-plugin, @woocommerce/expression-evaluation, @woocommerce/explat, @woocommerce/experimental, @woocommerce/dependency-extraction-webpack-plugin, @woocommerce/date, @woocommerce/data, @woocommerce/customer-effort-score, @woocommerce/currency, @woocommerce/csv-export, @woocommerce/components, @woocommerce/block-templates, @woocommerce/api, @woocommerce/ai, @woocommerce/admin-layout, @woocommerce/admin-e2e-tests

* empty commit to trigger CI

---------

Co-authored-by: github-actions <github-actions@github.com>
2023-11-21 11:16:08 +08:00
Nathan Silveira 6f6b5f5b4a
Fix typo in ts-ignore comment (#41517) 2023-11-17 14:57:31 -03:00
Nathan Silveira 9b1e5de687
Remove unnecessary focus on block divs in product editor (#41436)
* Add tabIndex -1 to useWooBlockProps

* Add changelog

* Fix property name in test

* Fix test

* Update changelog

* Add ts explanation

* Fix typo
2023-11-16 15:31:14 -03:00
Nathan Silveira 55766ac140
Template API: Conditional disabling support (#41307)
* Add disable conditions functionality to back-end

* Evaluate _templateBlockDisableConditions in registerWooBlockType

* Add 'disabled' support for number, pricing, and text

* Add disabled support for checkbox

* Add disabled for taxonomy block

* Add changelogs

* Update documentation

* Add unit tests

* Augment attribute with disabled in back-end

* Fix disabled styling

* Remove disabled from toggle since it's being added for all blocks

* Improve CSS for disabled fields

* Only add disabled attribute when it's not added on the block json and refactor

* Allow adding disable conditions in the constructor

* Fix lint issue

* Fix test

* Add disableConditions to dependencies
2023-11-14 13:17:34 -03:00
Matt Sherman 4a49683a69 Changelog 2023-10-18 18:57:22 -04:00
Matt Sherman 8a1709a275 Make useEvaluationContext param optional 2023-10-18 18:41:40 -04:00
Matt Sherman d14124c513 Fix up registerWooBlockType unit test 2023-10-18 18:41:22 -04:00
Matt Sherman 076939f2e4 Ignore ts error about lack of types for @wordpress/data 2023-10-18 15:43:26 -04:00
Matt Sherman a4002105a4 Refactor client-side attribute augmentation 2023-10-18 15:16:17 -04:00
Matt Sherman aa942771e5 Fix up TS errors 2023-10-18 15:16:17 -04:00
Matt Sherman ea6dc94897 Move useEvaluationContext implementation to product-editor 2023-10-18 15:16:17 -04:00
Matt Sherman 334a10a9a4 useEvaluationContext hook 2023-10-18 15:16:17 -04:00
Matt Sherman e244c8e025 Improve useSelect implementation 2023-10-18 15:16:17 -04:00
Matt Sherman 7161534f96 Conditional visibility implementation with useSelect 2023-10-18 15:16:17 -04:00
Matt Sherman 5845bcb768 Conditional visibility implementation with context 2023-10-18 15:16:17 -04:00
Matt Sherman 51dec2db53 Add @wordpress/data to dependencies 2023-10-18 13:31:46 -04:00
Matt Sherman 8ca38b6df2 Add react dependencies 2023-10-18 12:07:23 -04:00
Matt Sherman a1e38b0b25 Add @woocommerce/element to dependencies 2023-10-18 11:58:31 -04:00
Matt Sherman 375717c655 Changelog 2023-10-18 11:38:21 -04:00
Matt Sherman ef268fe545 Add @woocommerce/expression-evaluation dependency 2023-10-18 11:37:10 -04:00
Christopher Allford 1c30563ffc
Separate PHP and JS Unit Tests (#40639)
Since some projects might have both kinds of tests we are
going to have a `test:php` and a `test:js` script for each.
2023-10-06 15:41:47 -07:00
Matt Sherman 1e35d45c99
Template API: Expose template block id and order to client (#40263)
* Update unit tests to handle _templateBlockId and _templateBlockOrder

* Refactor get_formatted_template

* Initial @woocommerce/block-templates package

* Add block-templates to admin webpack

* Add block-templates to dependency-extraction-webpack-plugin

* Add block-templates to admin assets

* Add block-templates dependency

* Update name block

* Update syncpack

* Update regular price block

* Update tab block

* Update section block

* Add @wordpress/deprecated to package

* Deprecated initBlock

* Update attributes block

* Update catalog visibility block

* Update checkbox block

* Update conditional block

* Update collapsible block

* Allow additional props to be passed to useWooBlockProps

* Update inventory sku block

* Update inventory quantity block

* Update inventory email block

* Update images block

* Update description block

* Update radio block

* Update pricing block

* Update password block

* Update notice block

* Update shipping dimensions block

* Update shipping class block

* Update schedule sale block

* Update sale price block

* Update toggle block

* Update taxonomy block

* Update tag block

* Update summary block

* Update variations block

* Update variations options block

* Update variation items blocks

* Changelog

* Changelog

* Changelog

* Changelog

* Changelog

* Add test for registerWooBlockType

* Add @testing-library/react-hooks to devDependencies

* Add test for useWooBlockProps

* Document API

* Fix linting issues in README.md

* Fix tabs tests by mocking useWooBlockProps

* Allow header duplication under different nesting

* Remove unused import (fixes lint error)

* Update lock file
2023-09-27 13:38:56 -07:00