woocommerce/plugins/woocommerce-blocks/package.json

314 lines
13 KiB
JSON
Raw Normal View History

{
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
2023-04-12 09:25:25 +00:00
"version": "10.1.0-dev",
"description": "WooCommerce blocks for the Gutenberg editor.",
"homepage": "https://github.com/woocommerce/woocommerce-gutenberg-products-block/",
"keywords": [
"woocommerce",
"wordpress",
"blocks"
],
"sideEffects": [
"*.css",
"*.scss",
Add Inner Block Rendering and Atomic Block Styles (https://github.com/woocommerce/woocommerce-blocks/pull/2607) * Register Atomic Blocks and save some block content * renderInnerBlocks utility * Frontend Rendering * Clean up atomic block classnames * Move shared styles * Create a hoc for attribute mapping * Rename some unpluralised class names * Remove prefixes from atomic component class names * Updated styles * Update styles from master * Revert product list styles * 2020 fixes * Separate renderFrontend from renderInnerBlocks * Lazy loading of components * Tweak loading classes * FIx all products loading state * Revert lazy implementation - creates too many unneccessary files due to webpack config * Cleanup * Remove wcBlocksBuildUrl * Move call to register_atomic_blocks * Remove duplicate key * reuse render frontend * Corectly handle frontend attribute mapping to keep editor working * Style updates * Update side effects * Remove width style from rating to fix alignment * Move ssr grid styles to main stylesheet * Put back prefixed classnames * 2020 styling fixes * Create frontend files instead of doing it all in block map * Update assets/js/atomic/utils/get-block-map.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/render-parent-block.js Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com> * Fix last child alignment regardless of block type * More specificity fixes * 2020 button alignment * static fix to prevent offsets * fix placeholder image in firefox * Issues reported in feedback Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-06-05 12:18:16 +00:00
"./assets/js/atomic/blocks/**",
"./assets/js/filters/**",
WIP - Checkout i2 Feature Branch Tracking (https://github.com/woocommerce/woocommerce-blocks/pull/4268) * Duplicate checkout block * Contact information block * form step block * shipping address block * Setup atomic blocks * Container structure * More formal steps rather than generic form step * Add billing and shipping forms * add checkout actions block * add order note block * Add order summary * add payment block * Add inspector controls for address fields * frontend WIP * move attributes * wrap shipping with form step * PhoneNumber to typescript * Remove column block * form steps * move payment logic to frontend * Express block * inline payment block * Add shipping method block * Render inner blocks (not standalone blocks) and add classes to Atomic Block list on php side * lazy again * Add more wrappers from old frontend file * add layout * Checkout wrappers were missing * Enqueue payment methods for new block * Add missing classnames * Move shipping as billing state to context provider * express payments rendering * try/block-registry * Remove atomic components (unused) * Fix attribute persistance due to template locking * Fix shipping display when not needed * Set correct parent blocks for inner blocks * pass data to blocks * demo/newsletter * Skeleton styling * only apply styles to loading state for now * shipping method block frontend * rename express block * lock template * fix ts warning for __webpack_public_path__ * Refactor to avoid duplicating atomic block logic * remove changes in save method * Add zones and shipping methods to the sidebar for the shipping inner block Closes woocommerce/woocommerce-blocks#4320 * Fix script handles * Fix method display when there are none * Add shipping phone * Add phone to api and sync with billing correctly * Clear hidden fields on load * fix requirePhoneField property * Enable shipping and billing phone fields * readonly field support * Handle context attributes * Fix createInterpolateElement usage * add totalswrapper * Implement Terms and Conditions block for Checkout i2 (https://github.com/woocommerce/woocommerce-blocks/pull/4436) * Setup atomic blocks * frontend WIP * Express block * try/block-registry * Set correct parent blocks for inner blocks * Skeleton styling * Refactor to avoid duplicating atomic block logic * add block locking * add terms and conditions block * hardcore settings image * lock blocks from being deleted * hide original checkout block * mark blocks as side effectful * move variations to block register function * prevent core checkout blocks from needlessly showing in the inserter * enable checkout i1 * fix broken rebase * move save back * Localise default text Co-authored-by: Mike Jolley <mike.jolley@me.com> * Add add-hoc Block locking from WooCommerce Blocks side. (https://github.com/woocommerce/woocommerce-blocks/pull/4454) * add locking * use subscribe instead * fix condition * add locking to blocks * check if the item is not a text field * Tidy up hacks CSS class handling * Fix error if node is undefined * Hide menu when move is disabled * update package lock * Add todo and fix issue where selector returns null * split todos * move todo * edit comment Co-authored-by: Mike Jolley <mike.jolley@me.com> * Un-disable the billing checkbox in the editor (https://github.com/woocommerce/woocommerce-blocks/pull/4457) * Add missing Slot fill provider on frontend Fixes woocommerce/woocommerce-blocks#4441 by adding the slot fill provider to the checkout-i2 block. * Use column style appender * Add padding/styles to actions * Add/update icon library * Multiline checkbox alignment * Icons and copy changes for i2 blocks * Add terms by default * Add notice if text is missing links (https://github.com/woocommerce/woocommerce-blocks/pull/4466) * Swap variations for toggle * Add payment settings to inspector * Update package lock * Add inline docs to block registry * Add inner block areas below each form step. This does not include the form step contents, just adds inner blocks after existing content. Moving content within the inner block area is a separate discussion. This closes woocommerce/woocommerce-blocks#4306 * Sample block registration + docs * Add tests for registerCheckoutBlock * Fix lazy component detection in tests * Add basic transform between i1 and i2 * remove template lock todo * Update scroll to top hoc * Move shared settings to new context providers Closes woocommerce/woocommerce-blocks#4472 * Remove readonly field support (unused) * Remove context code * Experimental * remove invalid typedef * FIx scrolling on validation due to misplaced context provider * Update assets/js/base/context/providers/cart-checkout/checkout-state/index.tsx Co-authored-by: Darren Ethier <darren@roughsmootheng.in> * Update comment to remove reference to phone * Update packages/checkout/blocks-registry/README.md Co-authored-by: Darren Ethier <darren@roughsmootheng.in> * Rename ScrollToTopComponent * Add explicit list of expectedType in TypeScript definition * Add todo to remove custom shipping phone handling * Remove dangerouslySetInnerHTML in External Link Card Component * Add ExternalLinkCard to storybook * update todo wording * Refactor withScrollToTop to remove useCallback and use typescript * Support children on CheckboxControl, with added Typescript * Spread getRegisteredBlocks return value Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com> Co-authored-by: Darren Ethier <darren@roughsmootheng.in>
2021-07-22 11:03:00 +00:00
"./assets/js/middleware/**",
"./assets/js/blocks/checkout/inner-blocks/**/index.tsx",
"./assets/js/blocks/checkout/inner-blocks/register-components.ts",
WIP: Add Inner blocks to order summary (https://github.com/woocommerce/woocommerce-blocks/pull/6065) * Sub/Total/Fee inner blocks * Row blocks within the inner block * Update icons * Resolve stying issues * Remove old block * Pin totals row * Locking logic update * Heading inner block * Refactor where inner blocks are defined * Add todos * Todo for Consider deprecating OrderMetaSlotFill and DiscountSlotFill in favour of inner block areas. * Improve frontend registration of components using new entrypoint * Experiment- external block context * Revert "Experiment- external block context" This reverts commit 4b75668ec7eb62f065c6a488cd942a666e26204f. * Duplicate inner blocks to avoid conflicts with context * Remove todo * Rename block dir * Some test fixes * Fix import * fix import * linting * Remove unused attributes * Optional classname * fix coupons import * fix shipping mocks * Styling * Fix selectors in e2e tests * Add back the wc-block-components-totals-wrapper class that was used for each segment in the totals Order summary Because, removing them was: - a breaking change for the old structure - was making it harder to target the inner blocks. Before the class was used to target each segment - it was making the wc-block-components-totals-item behave as a child or parent depending on the inner block, inconsitency * Reuse the TotalsWrapper component for C& C blocks inner blocks This component was removed in this PR, but we wrap components in the Cart and Checkout sidebar in a TotalsWrapper. This will ensure consistent spacing and borders are applied to items in the sidebar. Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com> Co-authored-by: Raluca Stan <ralucastn@gmail.com>
2022-04-01 13:45:18 +00:00
"./assets/js/blocks/cart/inner-blocks/**/index.tsx",
"./assets/js/blocks/cart/inner-blocks/register-components.ts",
"./assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/**/index.tsx",
2022-08-15 19:25:53 +00:00
"./assets/js/blocks/mini-cart/mini-cart-contents/inner-blocks/register-components.ts",
Convert filter blocks to inner blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6978) * register filter wrapper block * register block variation * rename the active filters wrapper * prevent 404 error * Revert "prevent 404 error" This reverts commit 8b6cb7c6658b2a5a99b890b67f1dce8c1c51cdbf. * render parent wrapper block * support price filter block * hide the active filter block from inserter * swap the title of wrapper and inner filter block for active filters * hide the legacy heading for the price filter * update block title and description for active filters and price filter * remove heading control for price filter * remove heading control for active filters * update pattern * try: upgrade button * limit the number of inner block to 2 * prevent removing the inner filter block * Revert "prevent removing the inner filter block" This reverts commit 83b7feed78a7a7f50fd5799d1706faa9f2fc9050. * convert stock filter to inner block * refactor block upgrade button to share between filter blocks * update default heading * update pattern * update icon and title * Fix stock filter error by importing translations package * Upgrade Active Filters name to Active Filter Controls * Add upgrade support to price filter * Convert attribute filter to inner block (https://github.com/woocommerce/woocommerce-blocks/pull/7101) * wip: convert attribute filter to inner block * fix: render inner attribute filter block on the front end * refactor: inner block wrapper, extract the attribute parsing logic into a utility Co-authored-by: Tom Cafferkey <tjcafferkey@gmail.com> * Set correct attribute on the new filter blocks when they are upgraded * Use the Warning component to display the upgrade message so it is consistent with Gutenberg * address code review * better detect legacy block to show the upgrade notice * rename UpgradeToolbarButton to UpgradeNotice * add upgrade notice to the stock filter block * rename InnerBlockWrapper to BlockWrapper * attribute-filter: control wrapper visibility * passing block attributes down to inner active filters control block * fix styling of inner attribute filter control block * passing attribute to inner price filter control block * passing down the attribute to inner stock filter control block * remove unneccessary parsing * use default scope for variations * fix default attribute values * use default block appender * fix: lock control blocks * remove dynamic title code from attribute filter block * register active filters as variation and set it to the default that overrides the base block * fix isActive for default variation * fix: isActive logic for the active filters block * register side effect * fix ts error * e2e: fix active filters block backend test * e2e: fix frontend active filters test * e2e: fix attribute filter test * e2e: fix price filter test * e2e: fix stock filter test * e2e: update fixture * e2e: fix attribute filter test * remove invalid test * e2e: update heading selector for price filter in backend test * e2e: fixe backend price filter heading test * fix: patterns i18n * fix: heading level when upgrading the block Co-authored-by: Tung Du <dinhtungdu@gmail.com>
2022-10-07 15:00:19 +00:00
"./assets/js/blocks/cart-checkout-shared/sidebar-notices/index.tsx",
"./assets/js/blocks/cart-checkout-shared/view-switcher/index.tsx",
"./assets/js/blocks/filter-wrapper/register-components.ts",
"./assets/js/blocks/product-query/variations/**.tsx",
"./assets/js/blocks/product-query/index.tsx",
"./assets/js/blocks/product-query/inspector-controls.tsx"
],
"repository": {
"type": "git",
"url": "https://github.com:woocommerce/woocommerce-gutenberg-products-block.git"
},
"license": "GPL-3.0+",
"scripts": {
"analyze-bundles": "cross-env WP_BUNDLE_ANALYZER=1 npm run build",
"build": "rimraf build/* && cross-env BABEL_ENV=default NODE_ENV=production webpack",
"build:check-assets": "rimraf build/* && cross-env ASSET_CHECK=true BABEL_ENV=default NODE_ENV=production webpack",
"build:deploy": "rimraf vendor/* && cross-env WOOCOMMERCE_BLOCKS_PHASE=2 composer install --no-dev && cross-env WOOCOMMERCE_BLOCKS_PHASE=2 npm run build --loglevel error",
"build:e2e-test": "npm run build",
"prebuild:docs": "rimraf docs/extensibility/actions.md & rimraf docs/extensibility/filters.md",
"build:docs": "./vendor/bin/wp-hooks-generator --input=src --output=bin/hook-docs/data && node ./bin/hook-docs",
"postbuild:docs": "./bin/add-doc-footer.sh",
"changelog": "node ./bin/changelog",
"changelog:zenhub": "node ./bin/changelog --changelogSrcType='ZENHUB_RELEASE'",
"change-versions": "source ./bin/change-versions.sh",
Release: 3.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2887) * add changelog to readme.txt * Add testing docs for release * add some new commands to help with release testing phase * Add testing notes for 3.0.0 * fix testing note typo * updae notest to reference the new package-plugin:deploy script for use as part of the release process * Add note about creating manual tag for the release. * automate creation of dev tag for release. * remove release branch from travis branches because we now do pull requests for releases * remove duplicate back order badge for cart (https://github.com/woocommerce/woocommerce-blocks/pull/2890) * update zip link in testing notes * only update stable version in readme.txt if not a pre-release * Add handling for conditional github release creation based on WP deploy question * add distignore fir wp deploy builds * Cart & Checkout: fix '0' visible when product stock was 0 and it allowed backorders (https://github.com/woocommerce/woocommerce-blocks/pull/2891) * Create wordpress-deploy.yml * fix cod not accounting for global rate values (https://github.com/woocommerce/woocommerce-blocks/pull/2894) * ensure we’re only running checks for `wc_reserved_stock` table when necessary (https://github.com/woocommerce/woocommerce-blocks/pull/2895) * update readme.txt changelog * remove unnecesary variable definitions * update github deploy script * Bumping version strings to new version. * add missing step for checking out code from tag * fix exclusion for docker-compose.yml * fix zip name (it differs from repository name) Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-07-22 16:36:55 +00:00
"deploy": "npm run build:deploy && sh ./bin/github-deploy.sh",
"dev": "rimraf build/* && cross-env BABEL_ENV=default webpack",
2020-11-27 20:41:36 +00:00
"labels:dry": "github-label-sync --labels ./.github/label-sync-config.json --allow-added-labels --dry-run woocommerce/woocommerce-gutenberg-products-block",
"labels:sync": "github-label-sync --labels ./.github/label-sync-config.json --allow-added-labels woocommerce/woocommerce-gutenberg-products-block",
"fix-package-lock": "./bin/fix-package-lock.sh",
"lint": "npm run lint:php && npm run lint:css && npm run lint:js",
"lint:ci": "npm run lint:js && npm run lint:css",
"lint:css": "stylelint '**/*.scss'",
"lint:css-fix": "stylelint '**/*.scss' --fix",
Add TypeScript support and convert cart data store to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/3768) * add typescript support * Add type declarations for Cart and CartResponse interfaces * make sure we’re resolving .ts files as well as .js files on imports * add more types * type the cart data store * Apply suggestions from code review (implement .tsx in configs) Co-authored-by: Jon Surrell <jon.surrell@automattic.com> * remove global fetchMock declaration and directly import where used. * rename type * remove named action types and just infer by returning action creator values as const * use interface instead of type * rename * renames * create CartAction type as union of action creator returned types and implement in reducer * remove unused imports * refresh package-lock after rebase * Add base TS config that projects will inherit from * Add tsconfig for assets/js/data project * Ignore TS error on cart store registration We will address this in cooldown when we have time to investigate further * Add tsc to build step to catch TypeScript errors * add a separate command for tsc and tweak build command to use * restore checkJs and allowJs values in config and remove ts check from build command * Add ts:check-all command * Add TypeScript checking workflows * Change triggers for TypeScript workflow * Use npm ci instead of npm install * Remove ts:check-all from TypeScript workflow * Remove TS Check GitHub workflow * Remove type-defs dir from TS include, and remove ts:check-all script We no longer need the ts:check-all script because ts:check will do this for us, the old ts:check did nothing and did not work. * fix coupon loading issues * include .ts files only from type-defs folder Co-authored-by: Jon Surrell <jon.surrell@automattic.com> Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2021-02-24 01:36:24 +00:00
"lint:js": "wp-scripts lint-js --ext=js,ts,tsx",
"lint:js:report": "npm run lint:js -- --output-file eslint_report.json --ext=js,ts,tsx --format json",
"lint:js-fix": "eslint assets/js --ext=js,jsx,ts,tsx --fix",
"lint:md:docs": "wp-scripts lint-md-docs",
"lint:php": "composer run-script phpcs ./src && composer run-script phpcs ./tests/mocks/woo-test-helper",
"lint:php-fix": "composer run-script phpcbf ./src && composer run-script phpcbf ./tests/mocks/woo-test-helper",
"package-plugin": "rimraf woocommerce-gutenberg-products-block.zip && ./bin/build-plugin-zip.sh",
"package-plugin:dev": "rimraf woocommerce-gutenberg-products-block.zip && ./bin/build-plugin-zip.sh -d",
"package-plugin:zip-only": "rimraf woocommerce-gutenberg-products-block.zip && ./bin/build-plugin-zip.sh -z",
Release: 3.0.0 (https://github.com/woocommerce/woocommerce-blocks/pull/2887) * add changelog to readme.txt * Add testing docs for release * add some new commands to help with release testing phase * Add testing notes for 3.0.0 * fix testing note typo * updae notest to reference the new package-plugin:deploy script for use as part of the release process * Add note about creating manual tag for the release. * automate creation of dev tag for release. * remove release branch from travis branches because we now do pull requests for releases * remove duplicate back order badge for cart (https://github.com/woocommerce/woocommerce-blocks/pull/2890) * update zip link in testing notes * only update stable version in readme.txt if not a pre-release * Add handling for conditional github release creation based on WP deploy question * add distignore fir wp deploy builds * Cart & Checkout: fix '0' visible when product stock was 0 and it allowed backorders (https://github.com/woocommerce/woocommerce-blocks/pull/2891) * Create wordpress-deploy.yml * fix cod not accounting for global rate values (https://github.com/woocommerce/woocommerce-blocks/pull/2894) * ensure we’re only running checks for `wc_reserved_stock` table when necessary (https://github.com/woocommerce/woocommerce-blocks/pull/2895) * update readme.txt changelog * remove unnecesary variable definitions * update github deploy script * Bumping version strings to new version. * add missing step for checking out code from tag * fix exclusion for docker-compose.yml * fix zip name (it differs from repository name) Co-authored-by: Albert Juhé Lluveras <contact@albertjuhe.com>
2020-07-22 16:36:55 +00:00
"package-plugin:deploy": "npm run build:deploy && npm run package-plugin:zip-only",
"postinstall": "patch-package",
"reformat-files": "prettier --ignore-path .eslintignore --write \"**/*.{js,jsx,json,ts,tsx}\"",
"release": "sh ./bin/wordpress-deploy.sh",
"start": "rimraf build/* && cross-env BABEL_ENV=default CHECK_CIRCULAR_DEPS=true webpack --watch --info-verbosity none",
"storybook": "start-storybook -c ./storybook -p 6006 --ci",
"storybook:build": "BABEL_ENV=development build-storybook -c ./storybook -o ./storybook/dist",
"storybook:deploy": "rimraf ./storybook/dist/* && npm run storybook:build && gh-pages -d ./storybook/dist",
"test": "wp-scripts test-unit-js --config tests/js/jest.config.json",
"test:debug": "ndb .",
"test:e2e": "npm run wp-env:config && cross-env JEST_PUPPETEER_CONFIG=tests/e2e/config/jest-puppeteer.config.js NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js",
"test:e2e-dev": "npm run wp-env:config && cross-env JEST_PUPPETEER_CONFIG=tests/e2e/config/jest-puppeteer.config-dev.js NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js",
"test:e2e-dev-watch": "npm run wp-env:config && cross-env JEST_PUPPETEER_CONFIG=tests/e2e/config/jest-puppeteer.config-dev.js NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --watch",
"test:e2e:update": "npm run wp-env:config && cross-env JEST_PUPPETEER_CONFIG=tests/e2e/config/jest-puppeteer.config.js NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --updateSnapshot",
"test:e2e-pw": "npx playwright test --config=tests/e2e-pw/playwright.config.ts",
"env:start": "npm run wp-env start && ./tests/e2e-pw/bin/test-env-setup.sh",
"env:restart": "npm run wp-env clean all && npm run wp-env start && ./tests/e2e-pw/bin/test-env-setup.sh",
"env:stop": "npm run wp-env stop",
"test:help": "wp-scripts test-unit-js --help",
"test:performance": "npm run wp-env:config && cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.performance.config.js -- performance",
"test:php": "npm run wp-env run phpunit '/var/www/html/wp-content/plugins/${PWD##*/}/vendor/bin/phpunit -c /var/www/html/wp-content/plugins/${PWD##*/}/phpunit.xml.dist'",
"test:update": "wp-scripts test-unit-js --updateSnapshot --config tests/js/jest.config.json",
Switch to use `wp-env` as the development/test environment (https://github.com/woocommerce/woocommerce-blocks/pull/2730) * Switch to use wp-env * fix travis config * fix spacing? * doh need to install packages before starting environment! * more fixes for errors in travis environment * hmm still have node-git issues * nope must use dash * maybe it’s a caching issue (we’re caching node_modules?) * remove configs * add wp-env override json to gitignore * remove obsolete scripts * fix config in travis * restore default env (for phpunit) * for e2e manually set WORDPRESS_BASE_URL * doh fix variable for wp version * run phpunit via docker and fix WordPress version used for tests * find out what’s going on with this thing * don’t escape? * doh phpunit needs dev installed from composer! * fix versions * looks liek we have to make sure wp db is up to date?!? - also moves pre-configuration stuff all into one file for easier maintenance. * see if I can get insight into what the siteurl is in the wp environment on travis * try env setup (known that will break phpunit but possible it might fix e2e?) * output plugin list to see what is active in travis * try flushing rules * do a hard fulsh * fix argument syntax * move things around and add pre-configuration as files so all wp commands run at once * revert back to running each container command separately Not sure, but this might affect permissions issues? * maybe re-ordering before the file sync will help? also try some configuration changes * another attempt at travis config In this attempt: - map .htaccess to the server on the environment start - try changing permissions of wp-content and wp-content/plugins as a part of the e2e test bootup * use default wp version for gute build * refactor to run all wp commands in one go * don’t return promise from setup function - this might fix the sporadic fails related to the fixtures being setup (and potential race conditions there). * make sure we activate gutenberg plugin (previously we were just installing) The syntax of the command was incorrect. * try alternative syntax for installing and activating plugin
2020-06-17 20:28:11 +00:00
"test:watch": "npm run test -- --watch",
Add TypeScript support and convert cart data store to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/3768) * add typescript support * Add type declarations for Cart and CartResponse interfaces * make sure we’re resolving .ts files as well as .js files on imports * add more types * type the cart data store * Apply suggestions from code review (implement .tsx in configs) Co-authored-by: Jon Surrell <jon.surrell@automattic.com> * remove global fetchMock declaration and directly import where used. * rename type * remove named action types and just infer by returning action creator values as const * use interface instead of type * rename * renames * create CartAction type as union of action creator returned types and implement in reducer * remove unused imports * refresh package-lock after rebase * Add base TS config that projects will inherit from * Add tsconfig for assets/js/data project * Ignore TS error on cart store registration We will address this in cooldown when we have time to investigate further * Add tsc to build step to catch TypeScript errors * add a separate command for tsc and tweak build command to use * restore checkJs and allowJs values in config and remove ts check from build command * Add ts:check-all command * Add TypeScript checking workflows * Change triggers for TypeScript workflow * Use npm ci instead of npm install * Remove ts:check-all from TypeScript workflow * Remove TS Check GitHub workflow * Remove type-defs dir from TS include, and remove ts:check-all script We no longer need the ts:check-all script because ts:check will do this for us, the old ts:check did nothing and did not work. * fix coupon loading issues * include .ts files only from type-defs folder Co-authored-by: Jon Surrell <jon.surrell@automattic.com> Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2021-02-24 01:36:24 +00:00
"ts:check": "tsc --build",
"ts:log-errors": "npm --silent run ts:check | npx -y @bartekbp/typescript-checkstyle > checkstyle.xml",
Switch to use `wp-env` as the development/test environment (https://github.com/woocommerce/woocommerce-blocks/pull/2730) * Switch to use wp-env * fix travis config * fix spacing? * doh need to install packages before starting environment! * more fixes for errors in travis environment * hmm still have node-git issues * nope must use dash * maybe it’s a caching issue (we’re caching node_modules?) * remove configs * add wp-env override json to gitignore * remove obsolete scripts * fix config in travis * restore default env (for phpunit) * for e2e manually set WORDPRESS_BASE_URL * doh fix variable for wp version * run phpunit via docker and fix WordPress version used for tests * find out what’s going on with this thing * don’t escape? * doh phpunit needs dev installed from composer! * fix versions * looks liek we have to make sure wp db is up to date?!? - also moves pre-configuration stuff all into one file for easier maintenance. * see if I can get insight into what the siteurl is in the wp environment on travis * try env setup (known that will break phpunit but possible it might fix e2e?) * output plugin list to see what is active in travis * try flushing rules * do a hard fulsh * fix argument syntax * move things around and add pre-configuration as files so all wp commands run at once * revert back to running each container command separately Not sure, but this might affect permissions issues? * maybe re-ordering before the file sync will help? also try some configuration changes * another attempt at travis config In this attempt: - map .htaccess to the server on the environment start - try changing permissions of wp-content and wp-content/plugins as a part of the e2e test bootup * use default wp version for gute build * refactor to run all wp commands in one go * don’t return promise from setup function - this might fix the sporadic fails related to the fixtures being setup (and potential race conditions there). * make sure we activate gutenberg plugin (previously we were just installing) The syntax of the command was incorrect. * try alternative syntax for installing and activating plugin
2020-06-17 20:28:11 +00:00
"wp-env": "wp-env",
"wp-env:config": "./bin/wp-env-pre-config.sh"
},
"devDependencies": {
"@actions/core": "1.9.1",
"@actions/github": "5.0.3",
"@automattic/color-studio": "2.5.0",
"@babel/cli": "7.18.9",
"@babel/core": "7.18.9",
"@babel/plugin-proposal-class-properties": "7.18.6",
"@babel/plugin-proposal-optional-chaining": "^7.20.7",
"@babel/plugin-syntax-jsx": "7.18.6",
"@babel/polyfill": "7.12.1",
"@babel/preset-typescript": "7.18.6",
"@bartekbp/typescript-checkstyle": "5.0.0",
"@octokit/graphql": "4.8.0",
"@playwright/test": "1.32.3",
"@storybook/addon-a11y": "6.5.16",
"@storybook/addon-essentials": "6.5.9",
"@storybook/addon-links": "6.5.9",
"@storybook/addon-storysource": "6.5.9",
"@storybook/addons": "6.5.9",
"@storybook/client-api": "6.5.14",
"@storybook/react": "6.5.15",
"@testing-library/jest-dom": "5.16.5",
"@testing-library/react": "12.1.5",
"@testing-library/react-hooks": "7.0.2",
"@testing-library/user-event": "13.5.0",
"@types/classnames": "2.3.0",
"@types/dinero.js": "1.9.0",
"@types/dompurify": "2.3.4",
"@types/gtag.js": "0.0.10",
"@types/jest": "27.5.2",
"@types/jest-environment-puppeteer": "5.0.2",
"@types/jquery": "3.5.14",
"@types/lodash": "4.14.182",
"@types/puppeteer": "5.4.6",
"@types/react": "18.0.29",
"@types/react-dom": "18.0.10",
Feature Branch: Updated Shopper Notices (https://github.com/woocommerce/woocommerce-blocks/pull/8659) * Notice banner component * Snackbar support * Switch to new components * Finish snackbar implementation * Summary notice * Styling issues * Fix text wrap in shipping calculator * Storybook entries * Docs and tests for NoticeBanner * Framer motion to avoid components dependency * Snackbar list stories * Docs for snackbar list * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Types/docblocks * Docs * Update notice type * Use NoticeBannerProps for type of noticeProps * Raw html to fix notice encoding * getClassNameFromStatus is unused * Update position text * Clarify notice text * Fix hover style in whisper TT3 theme * remove div styles * Add new templates for legacy buyer notices in WooCommerce core (https://github.com/woocommerce/woocommerce-blocks/pull/8732) * Add templates for legacy core notices * Update src/Domain/Services/Notices.php Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com> * Remove debugging code * DRY get_notices_template * Simplify error template * Fix padding * Only include new notices if using block cart/checkout --------- Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com> * Fix view box tag * Hover and focus styles * Styling when notices added via ajax * Remove margin change * Implement react-transition-group instead of framer (https://github.com/woocommerce/woocommerce-blocks/pull/8920) * Add screenshots to docs --------- Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-04-05 12:43:03 +00:00
"@types/react-transition-group": "^4.4.5",
"@types/wordpress__block-editor": "6.0.6",
"@types/wordpress__blocks": "11.0.9",
"@types/wordpress__components": "^23.0.0",
Add dismissible compatibility notice to sidebar when editing Cart and Checkout (https://github.com/woocommerce/woocommerce-blocks/pull/6869) * Add default page notice * show notice all inner blocks * support flow when page isnt saved * switch from where we get the current post id * update lock * fix types * Remove old compatibility notices from Cart and Checkout * Move useCompatibilityNotice to sidebar-compatibility-notice directory * Remove old CartCheckoutCompatibilityNotice * Create sidebar compatibility notice hoc * Add isCartOrCheckoutOrInnerBlock function * Refactor defaultNotice to use new isCartOrCheckoutOrInnerBlock func * Remove BlockSettings from checkout edit and export from checkout-shared * Change so component still renders, it is just hidden with display: none This is required because when it returns null the component gets skipped from being added to the Slot, then when it does return a component, then it gets rendered at the bottom of the Slot. By ensuring it always renders we can have it at the top all the time. * Set the priorities of the hoc filters so compat notice renders first * Make isCartOrCheckoutInnerBlock a hook * Remove old compatibility notice related tests * Remove BlockSettings from Cart * Remove withDefaultNotice hoc * Include DefaultNotice in compatibility notice * Remove DefaultNotice from Checkout * Rename withSidebarCompatibilityNotice to withSidebarNotices This is because it includes the sidebar compatibility notice and the default notices * Remove useIsCartOrCheckoutOrInnerBlock hook * Remove compatibility notice code from tests * Revert DefaultNotice back to the old one * Remove unused components * Remove withBlockSettings HOC and fix TS types This is an abstraction that is no longer required, we can just include BlockSettings in the Cart and Checkout blocks * Remove CartCheckoutFeedbackPrompt from BlockSettings It will be included in sidebar-notices instead * Fix TS Types in DefaultNotice * Add BlockSettings to cart and checkout edit * Editor: Add feedback box to the Cart & Checkout Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6881) * Show "Feedback prompt" for all inner blocks * Fix the "feedback" notice position for these blocks The "checkout fields", "checkout billing address" and "checkout shipping address" have the addressFields option which gets rerendered and placed at the bottom of the inspector controls. * Tidy up the address-fields hoc * Use correct block name to check for billing or shipping address * Revert "Editor: Add feedback box to the Cart & Checkout Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6881)" This reverts commit 5f3d6cf15ce08d9c303e62ec3e0d0315ead1281f. * Add hack to get feedback prompt to render last * Fix TS errors for context and attributes * Include CartCheckoutFeedbackPrompt in accountcontrols & addresscontrols * Do not include feedback prompt if on an address block or contact info * Remove unused hoc for address fields Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com> Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-08-12 14:23:08 +00:00
"@types/wordpress__core-data": "^2.4.5",
"@types/wordpress__data": "^6.0.2",
"@types/wordpress__data-controls": "2.2.0",
Add dismissible compatibility notice to sidebar when editing Cart and Checkout (https://github.com/woocommerce/woocommerce-blocks/pull/6869) * Add default page notice * show notice all inner blocks * support flow when page isnt saved * switch from where we get the current post id * update lock * fix types * Remove old compatibility notices from Cart and Checkout * Move useCompatibilityNotice to sidebar-compatibility-notice directory * Remove old CartCheckoutCompatibilityNotice * Create sidebar compatibility notice hoc * Add isCartOrCheckoutOrInnerBlock function * Refactor defaultNotice to use new isCartOrCheckoutOrInnerBlock func * Remove BlockSettings from checkout edit and export from checkout-shared * Change so component still renders, it is just hidden with display: none This is required because when it returns null the component gets skipped from being added to the Slot, then when it does return a component, then it gets rendered at the bottom of the Slot. By ensuring it always renders we can have it at the top all the time. * Set the priorities of the hoc filters so compat notice renders first * Make isCartOrCheckoutInnerBlock a hook * Remove old compatibility notice related tests * Remove BlockSettings from Cart * Remove withDefaultNotice hoc * Include DefaultNotice in compatibility notice * Remove DefaultNotice from Checkout * Rename withSidebarCompatibilityNotice to withSidebarNotices This is because it includes the sidebar compatibility notice and the default notices * Remove useIsCartOrCheckoutOrInnerBlock hook * Remove compatibility notice code from tests * Revert DefaultNotice back to the old one * Remove unused components * Remove withBlockSettings HOC and fix TS types This is an abstraction that is no longer required, we can just include BlockSettings in the Cart and Checkout blocks * Remove CartCheckoutFeedbackPrompt from BlockSettings It will be included in sidebar-notices instead * Fix TS Types in DefaultNotice * Add BlockSettings to cart and checkout edit * Editor: Add feedback box to the Cart & Checkout Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6881) * Show "Feedback prompt" for all inner blocks * Fix the "feedback" notice position for these blocks The "checkout fields", "checkout billing address" and "checkout shipping address" have the addressFields option which gets rerendered and placed at the bottom of the inspector controls. * Tidy up the address-fields hoc * Use correct block name to check for billing or shipping address * Revert "Editor: Add feedback box to the Cart & Checkout Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6881)" This reverts commit 5f3d6cf15ce08d9c303e62ec3e0d0315ead1281f. * Add hack to get feedback prompt to render last * Fix TS errors for context and attributes * Include CartCheckoutFeedbackPrompt in accountcontrols & addresscontrols * Do not include feedback prompt if on an address block or contact info * Remove unused hoc for address fields Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com> Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-08-12 14:23:08 +00:00
"@types/wordpress__editor": "^11.0.0",
"@types/wordpress__notices": "^3.5.0",
"@typescript-eslint/eslint-plugin": "5.56.0",
"@typescript-eslint/parser": "5.35.1",
"@woocommerce/api": "0.2.0",
Add dismissible compatibility notice to sidebar when editing Cart and Checkout (https://github.com/woocommerce/woocommerce-blocks/pull/6869) * Add default page notice * show notice all inner blocks * support flow when page isnt saved * switch from where we get the current post id * update lock * fix types * Remove old compatibility notices from Cart and Checkout * Move useCompatibilityNotice to sidebar-compatibility-notice directory * Remove old CartCheckoutCompatibilityNotice * Create sidebar compatibility notice hoc * Add isCartOrCheckoutOrInnerBlock function * Refactor defaultNotice to use new isCartOrCheckoutOrInnerBlock func * Remove BlockSettings from checkout edit and export from checkout-shared * Change so component still renders, it is just hidden with display: none This is required because when it returns null the component gets skipped from being added to the Slot, then when it does return a component, then it gets rendered at the bottom of the Slot. By ensuring it always renders we can have it at the top all the time. * Set the priorities of the hoc filters so compat notice renders first * Make isCartOrCheckoutInnerBlock a hook * Remove old compatibility notice related tests * Remove BlockSettings from Cart * Remove withDefaultNotice hoc * Include DefaultNotice in compatibility notice * Remove DefaultNotice from Checkout * Rename withSidebarCompatibilityNotice to withSidebarNotices This is because it includes the sidebar compatibility notice and the default notices * Remove useIsCartOrCheckoutOrInnerBlock hook * Remove compatibility notice code from tests * Revert DefaultNotice back to the old one * Remove unused components * Remove withBlockSettings HOC and fix TS types This is an abstraction that is no longer required, we can just include BlockSettings in the Cart and Checkout blocks * Remove CartCheckoutFeedbackPrompt from BlockSettings It will be included in sidebar-notices instead * Fix TS Types in DefaultNotice * Add BlockSettings to cart and checkout edit * Editor: Add feedback box to the Cart & Checkout Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6881) * Show "Feedback prompt" for all inner blocks * Fix the "feedback" notice position for these blocks The "checkout fields", "checkout billing address" and "checkout shipping address" have the addressFields option which gets rerendered and placed at the bottom of the inspector controls. * Tidy up the address-fields hoc * Use correct block name to check for billing or shipping address * Revert "Editor: Add feedback box to the Cart & Checkout Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/6881)" This reverts commit 5f3d6cf15ce08d9c303e62ec3e0d0315ead1281f. * Add hack to get feedback prompt to render last * Fix TS errors for context and attributes * Include CartCheckoutFeedbackPrompt in accountcontrols & addresscontrols * Do not include feedback prompt if on an address block or contact info * Remove unused hoc for address fields Co-authored-by: Nadir Seghir <nadir.seghir@gmail.com> Co-authored-by: Saad Tarhi <saad.trh@gmail.com>
2022-08-12 14:23:08 +00:00
"@woocommerce/data": "^4.1.0",
"@woocommerce/e2e-utils": "0.2.0",
"@woocommerce/eslint-plugin": "2.2.0",
"@woocommerce/woocommerce-rest-api": "1.0.1",
"@wordpress/api-fetch": "6.21.0",
"@wordpress/babel-preset-default": "7.8.0",
"@wordpress/base-styles": "4.14.0",
Fix 404 and 500 errors in E2E test logs, editor and front-end. (https://github.com/woocommerce/woocommerce-blocks/pull/5989) * Change atomic blocks to not use custom webpack build paths we want to always load lazy loaded components from their default paths to avoid having to handle importing components in different ways for regular and atomic component packages * Add footer parts to test themes The Site Editor is expecting the footer parts to be there or it will try to load them anyways and throw a 404. It's not breaking, but it's polluting the console. * Use REST API to tear down the templates Previously, we used a util called `trashAllPosts` which navigated to the post UI and deleted all the posts to tear down any side-effects of template editing tests. However, with a [recent change](https://github.com/WordPress/wordpress-develop/commit/14e20f72b568cfb5a85f57c77eaa538c17a5f302), WP Core removed the UI for those and that made our tests meet a 500 error. Using the REST API should also make everything faster. * Remove deprecated pupeteer waitFor usage was still present in attribute-filter.test.js * Update package-lock.json * pin package versions * Unify all atomic blocks to register on php side * Remove Atomic Blcoks chunk_translation handling from AllBlocks Before it was responsible for enabling translations for all the atomic blocks * Add per atomic block chunk_translation registration * update @wordpress/e2e-test-utils to 6.0.2 * add optional puppeteer * pin workflows node version to 16.13.2 * upgrade package-lock * upgrade package-lock * set react and react-dom as peerDeps * remove atomic block registration Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com> Co-authored-by: Luigi <gigitux@gmail.com>
2022-03-10 10:00:23 +00:00
"@wordpress/block-editor": "8.2.0",
"@wordpress/blocks": "11.1.5",
"@wordpress/browserslist-config": "5.14.0",
"@wordpress/components": "19.1.5",
"@wordpress/data-controls": "2.2.7",
"@wordpress/dependency-extraction-webpack-plugin": "3.2.1",
"@wordpress/dom": "3.27.0",
"@wordpress/e2e-test-utils": "10.1.0",
"@wordpress/e2e-tests": "4.6.0",
"@wordpress/element": "4.20.0",
Add PHP8 Unit Testing (https://github.com/woocommerce/woocommerce-blocks/pull/7528) * fixed method sig * Updated to @wordpress/env@5.5.0 and set default PHP 7.4 for wp-env. * updated Coding Standards flow to use PHP 8.0 * Added comment to E2E flows explaining what PHP version is used * Revert "Updated to @wordpress/env@5.5.0 and set default PHP 7.4 for wp-env." This reverts commit 696cd7f42edc9d9726b777cf4f83a501a6d63936. * Added comment to Unit test flows explaining what PHP version is used. Specified PHP version on .wp-env.json * Fixed composer-lock.json version. * Updated tests to run on PHP Unit 9.2.6 * Updated tests to run on PHP 8 * Reverted test, mismatched results between local and pipeline * Removed Todo * Updated platform overrides * Update Migrationb tests with Mockery for PHP8 compat * try at PHP unit flow matrix * Fix blocks.ini invalid config * Temp disable E2E * Downgraded woocommerce/woocommerce-sniffs as it introduced new sniffs we should be handling on a different PR * re-enable E2E tests * blocks.ini fix * revert blocks.ini fix * Update @wordpress/env * remove .htaccess mapping * Fix permissions for tests * Debug permissions * Attempt at perm fix * Attempt at perm fix * Downgraded @wordpress/env * Another attempt at upgrade @wordpress/env * Attempt at cleaning wp-env before run * Attempt at destroying wp-env before run. Disabled E2E. * Attempt at destroying wp-env before run. * debug wp-env data * attempt at deleting wp-env data (destroy won't work due to prompt) * re-enable E2E * Fix deprecation warnings * Cleaned wp-env data for E2E * Fix perms for E2E * Updated RateLimitsTests * debug * Force 7.4 for wp-env * Run sh outside of npm * Reverted E2E flow * reverted wp-env-config.sh debug test * reverted .wp-env.json phpVersion force * Update tests/php/StoreApi/Utilities/ProductQueryFilters.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/CartExtensions.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/CartItems.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/Products.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/ProductCollectionData.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/Batch.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/Checkout.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/CartCoupons.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/ProductAttributes.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Update tests/php/StoreApi/Routes/Cart.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * downgraded @wordpress/env to v4 * Reverted back to reflection class for pivate attribs manipulation on tests * reverted JS unit testing job name * Update tests/php/StoreApi/Formatters/TestMoneyFormatter.php Co-authored-by: Mike Jolley <mike.jolley@me.com> * Typo fix Co-authored-by: Mike Jolley <mike.jolley@me.com>
2022-11-09 15:28:08 +00:00
"@wordpress/env": "^4.9.0",
"@wordpress/html-entities": "3.24.0",
"@wordpress/i18n": "4.24.0",
"@wordpress/is-shallow-equal": "4.24.0",
"@wordpress/prettier-config": "1.4.0",
"@wordpress/scripts": "22.3.0",
"autoprefixer": "10.4.7",
"axios": "0.27.2",
"babel-plugin-explicit-exports-references": "^1.0.2",
"babel-plugin-react-docgen": "4.2.1",
"babel-plugin-transform-async-generator-functions": "6.24.1",
"babel-plugin-transform-object-rest-spread": "6.26.0",
"babel-plugin-transform-react-jsx": "6.24.1",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"chalk": "4.1.2",
"circular-dependency-plugin": "5.2.2",
"commander": "9.4.0",
"copy-webpack-plugin": "6.4.1",
"core-js": "3.25.0",
"create-file-webpack": "1.0.2",
"cross-env": "7.0.3",
"cssnano": "5.1.12",
All Products with Inner Blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1032) * Inital block creation * Update labels * Columns, rows, sample data json * Output data from API * thumbnail_html * Split into smaller components of grid * Price handling * Image handling * Remove ! * frontend * Work on cart api * Cart error handling and product type conditions * innerblock progress * Implement layoutConfig as set from innerblocks shape. Note: - this is just a poc - where things are configured likely needs changed - will still need to work out how this gets persisted for the frontend and how things get displayed there (but likely will work fairly similar in terms of mapping to components). * use correct prop name * Working edit button * Clean up block controls and edit view * Add link with innerblocks * update link description * correctly handle components with inner blocks as children * Re-organise atomic components and blocks into own directories * Unique keys for components * Fix default layout when inserting block for first time * Working layoutconfig save * Save attributes * Move sale badge to image component * Add disabled to render preview and blocks * icons * Editor view styling * Update withComponetId to stop component ID incrementing too many times Co-Authored-By: Darren Ethier <darren@roughsmootheng.in> * Improve key generation * done/cancel buttons on edit * Create withProducts HOC for All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/994) * Create withProducts HOC for All Products block * Add order select and pagination to All Products block * Go to first page when changing order * Add HOC test * Make sure block is updated whem columns/rows change in the editor * Fix 'SALE' badge positioning * Remove unnecessary key * Honor 'perPage' value when generating placeholders * Make placeholder sizes match rendered block item * Several CSS improvements * Remove unused CSS properties * Move getProducts to hocs utils * Remove All Products sample-data.json * Fix order select wrong margin in the editor * Refactor how loading image gets its size * Clear products when loadProducts start * Enhance pagination logic * Fix placeholder width * Fix regular_price check * Set product link max-width * Implement querystrings for the All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/997) * Implement querystrings for the All Products block * Create withWindow HOC * Add with-window tests * Use renderFrontend util in All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1003) * Add with-window tests * Use renderFrontend util in All Products block * Rename properties and components from 'order' to 'sort' (https://github.com/woocommerce/woocommerce-blocks/pull/1012) * Rename properties and components from 'order' to 'sort' * Rename onOrderChange to onSortChange * Remove unnecessary stylint-disable-line (https://github.com/woocommerce/woocommerce-blocks/pull/1016) * Create withBrowserLocation and withBrowserHistory HOC (https://github.com/woocommerce/woocommerce-blocks/pull/1022) * Create withBrowserWindowProp HOC * Remove unnecessary expect's * Always pass window prop to propMap if it exists * Scroll to top when switching pages in All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1011) * Scroll to top when switching pages in All Pages block * Improve keyboard navigation in the All Products block * Create withScrollToTop HOC * Fix variable name typo * Update paths with aliases * Avoid first and last page being included in pagination 'pagesToDisplay' (https://github.com/woocommerce/woocommerce-blocks/pull/1015) * Update lock * constants * linting * Clean up styling * Prettier * Block options for title/image * Prettier * Remove shared content controls * Update atomic block descriptions * Summary block * Prettier * Impoved template edit appearance and added inline tips * Apply prettier * Reset and cancel buttons * Improved keys * Tweak tip placement * Remove incorrect comments * Remove disabled ofr non interactive elements * Fragment not needed * Update assets/js/atomic/components/product-list/title/index.js Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com> * Move componentId hoc * Comment * Implement onImageLoaded * Pagination: disable first/last page if they are active (https://github.com/woocommerce/woocommerce-blocks/pull/1041) * Update assets/js/atomic/components/product-list/rating/index.js Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com> * Sale badges refactoring Adds sale badges blocks and improves how the default blocks are defined. * revert changes in withComponentId * fix flexbox alignment * Create withQueryStringValues HOC and use it in ProductGrid component (https://github.com/woocommerce/woocommerce-blocks/pull/1040) * Create withQueryStringValues HOC and use it in ProductGrid component * Add tests * Add comment explaining urlParameterSuffix * Don't destructure props if only used once * Move dependencies check outside the HOC * Update test description * Remove HOCs no longer used * Update assets/js/atomic/blocks/product-list/image/index.js Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/components/product-list/sale-badge/index.js Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/index.js Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com> * Update assets/js/atomic/utils/index.js Co-Authored-By: Albert Juhé Lluveras <contact@albertjuhe.com> * Feedback * Grid to List * Improved badge handling * update package-lock after merge from master * Add wp.data store for schema and lists. (https://github.com/woocommerce/woocommerce-blocks/pull/1008) * install @wordpress/data-controls and deepFreeze * add schema store * add query-state store * add collections store * add bundle entry point (and export store keys and constants) * add master README.md for new stores * add bundle configuration and register asset php side * Add missing param name Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com> * code style fixes * remove unnecessary period from test description * Simplify conditional * reorder imports (code style) * reorder imports and codestyle * refactor using lodash for state utils * reorder imports * reorder imports * reorder dependencies * reorder dependnecies an remove duplication block * remove errant tab * reorder dependencies * Modify collections store to add headers to the store state. (https://github.com/woocommerce/woocommerce-blocks/pull/1073) * add control for getting unparsed response from apiFetch * Modify action so it recieves a response object. * modify reducer to handle response object * improve selectors to make headers accessible - modifys existing `getCollection` to retrieve items from state. - adds `getCollectionHeader` selector * update resolvers to handle full response from request - also adds resolver for `getCollectionHeader` * update docs for changes * Improve spacing in doc Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com> * Fix spacing in inline docs Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com> * change `getFromState` to receive an object instead of arguments list. * Prepare All Products block to accept extension inner blocks (https://github.com/woocommerce/woocommerce-blocks/pull/1047) * Simplify BLOCK_MAP * Prepare All Products block to accept extension inner blocks * Change filter name * Update filter name * Add check that block exists in BLOCK_MAP * Create REVERSED_BLOCK_MAP instead of searching blocks each time * Change how child blocks are registered for All Products block * Refactor All Products block so reverse map isn't needed * Remove getDefaultBlocks * Make sure getRegisteredInnerBlocks always returns an object and add checks to registerInnerBlock * Add missing blockName arg * Add inline docs to block registry * Move 'blockName' prop to context * Typos * Improve registerInnerBlock error messages and create a validation function * Refactor context * Rename validateOption to assertOption * refactor where new context lives and add alias for base-context * fix doc block * remove todo block (there’s an issue for it) * rename context * Update assets/js/atomic/components/product-list/sale-badge/index.js Co-Authored-By: Albert Juhé Lluveras <aljullu@gmail.com> * HeadingToolbar comment * Tweak bool comparison * Improve how default layouts are set so all blocks can be removed and the no-content message is correct * Sale centering * Fix default template * Product example switch to preview * Update preview schema and image data to match latest schema * Add @woocommerce/atomic-components alias * Alias for previews to prevent need for relative paths * Drop `align` for sale block Align disrupts other blocks in unexpected and unavoidable ways. Drop support so the sale block is a block level item. * Rename atomic components and blocks (and create ProductLayoutContext) (https://github.com/woocommerce/woocommerce-blocks/pull/1089) * rename atomic blocks and components to be more generic (drop list) * create new context for productlayout and implement provider * Rename ProductSalesBadge to ProductSaleBadge * Add php5.3 restriction for All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1090) * enable legacy builds and add handling for AllProducts to be wp5.3 only * fix legacy builds * Prevent filemtime notice * Implement new data stores with All Products block (https://github.com/woocommerce/woocommerce-blocks/pull/1067) * add new hooks and tests and alias for hooks * various fixes for stores after implementation tests * implement new stores for ProductList component * add doc blocks for useStoreProducts hooks * fix typo in property on returned object
2019-10-28 13:53:09 +00:00
"deep-freeze": "0.0.1",
"eslint-import-resolver-typescript": "3.2.4",
"eslint-import-resolver-webpack": "0.13.2",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-woocommerce": "file:bin/eslint-plugin-woocommerce",
"eslint-plugin-you-dont-need-lodash-underscore": "6.12.0",
"expect-puppeteer": "6.1.1",
"fast-xml-parser": "4.0.7",
"follow-redirects": "1.15.1",
"fs-extra": "10.1.0",
"gh-pages": "4.0.0",
"github-label-sync": "2.2.0",
"glob": "7.2.3",
"glob-promise": "4.2.2",
"husky": "8.0.3",
"ignore-loader": "0.1.2",
"jest-circus": "27.5.1",
"jest-environment-puppeteer": "6.1.1",
"jest-fetch-mock": "3.0.3",
"jest-html-reporters": "3.0.10",
"json2md": "1.12.0",
"lint-staged": "13.2.0",
"lodash": "4.17.21",
"markdown-it": "13.0.1",
"merge-config": "2.0.0",
"mini-css-extract-plugin": "1.6.2",
"patch-package": "6.4.7",
"postcss": "8.4.14",
"postcss-loader": "4.2.0",
"prettier": "npm:wp-prettier@2.6.2",
"progress-bar-webpack-plugin": "2.1.0",
"promptly": "3.2.0",
"puppeteer": "15.3.2",
"react-docgen": "5.4.3",
"react-test-renderer": "17.0.2",
"request-promise": "4.2.6",
"rimraf": "3.0.2",
"sass-loader": "10.1.0",
"storybook-addon-react-docgen": "1.2.42",
"terser-webpack-plugin": "3.0.3",
"typescript": "4.7.4",
"utility-types": "3.10.0",
"webpack": "4.44.2",
"webpack-bundle-analyzer": "4.5.0",
"webpack-cli": "3.3.12",
"webpack-rtl-plugin": "2.0.0",
"wp-types": "3.61.0",
"zenhub-api": "0.2.0"
},
"engines": {
"node": "^16.13.0",
"npm": "^8.0.0"
},
"dependencies": {
"@dnd-kit/core": "^6.0.5",
"@dnd-kit/modifiers": "^6.0.0",
"@dnd-kit/sortable": "^7.0.1",
"@dnd-kit/utilities": "^3.2.0",
"@emotion/styled": "^11.10.5",
"@preact/signals": "^1.1.2",
"@wordpress/autop": "3.16.0",
"@wordpress/compose": "5.5.0",
"@wordpress/deprecated": "3.16.0",
"@wordpress/icons": "6.1.1",
"@wordpress/notices": "3.12.0",
"@wordpress/plugins": "4.10.0",
"@wordpress/primitives": "3.0.4",
"@wordpress/server-side-render": "3.10.0",
"@wordpress/url": "3.13.0",
"@wordpress/wordcount": "3.13.0",
"classnames": "2.3.1",
"compare-versions": "4.1.3",
"config": "3.3.7",
"dataloader": "2.1.0",
"deepsignal": "^1.1.0",
"dinero.js": "1.9.1",
"dompurify": "^2.4.0",
"downshift": "6.1.7",
"html-react-parser": "3.0.4",
"postcode-validator": "3.7.0",
"preact": "^10.11.3",
"react-number-format": "4.9.3",
Feature Branch: Updated Shopper Notices (https://github.com/woocommerce/woocommerce-blocks/pull/8659) * Notice banner component * Snackbar support * Switch to new components * Finish snackbar implementation * Summary notice * Styling issues * Fix text wrap in shipping calculator * Storybook entries * Docs and tests for NoticeBanner * Framer motion to avoid components dependency * Snackbar list stories * Docs for snackbar list * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Update assets/js/base/components/notice-banner/README.md Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> * Types/docblocks * Docs * Update notice type * Use NoticeBannerProps for type of noticeProps * Raw html to fix notice encoding * getClassNameFromStatus is unused * Update position text * Clarify notice text * Fix hover style in whisper TT3 theme * remove div styles * Add new templates for legacy buyer notices in WooCommerce core (https://github.com/woocommerce/woocommerce-blocks/pull/8732) * Add templates for legacy core notices * Update src/Domain/Services/Notices.php Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com> * Remove debugging code * DRY get_notices_template * Simplify error template * Fix padding * Only include new notices if using block cart/checkout --------- Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com> * Fix view box tag * Hover and focus styles * Styling when notices added via ajax * Remove margin change * Implement react-transition-group instead of framer (https://github.com/woocommerce/woocommerce-blocks/pull/8920) * Add screenshots to docs --------- Co-authored-by: Thomas Roberts <5656702+opr@users.noreply.github.com> Co-authored-by: Paulo Arromba <17236129+wavvves@users.noreply.github.com>
2023-04-05 12:43:03 +00:00
"react-transition-group": "^4.4.5",
"reakit": "1.3.11",
"snakecase-keys": "5.4.2",
Active filters block (https://github.com/woocommerce/woocommerce-blocks/pull/1168) * Basic block construction * Register on PHP side * wc-active-filters script * Price utils * Refactor price slider so state reflects the query Moves some logic from the component to the block so that min and max price can change (via query) and be reflected by the price sliders. This allows the active filters block to change the query and have those new values reflected by the slider. * Fix type checking of numbers * Styles for filter block * Improved attribute helper for getting attribute taxonomy data from ID/taxonomy * Refactor attribute filter to use updateAttributeFilter helper * Disable checkboxes when loading to avoid multiple queries * Add todos - this is blocked * Remove checked state from Attribute Filter so it gets updated from the store (https://github.com/woocommerce/woocommerce-blocks/pull/1170) * isLoading check * active price filtering rendering * Block heading * Implement block options; chip display with clear button * Clear all should remove all attributes * Enable previews * Introduce a component to look up terms from slugs using collections (which are cached) * Correct all docblocks * activePriceFilters null return * renderRemovableListItem * Remove useMemo for hasFilters * Switch classnames notation * Ensure slug is array in removeAttributeFilterBySlug * null -> undefined return types for attributes * Remove fragment * Check we have a termObject in ActiveAttributeFilters * Refactor formatPriceRange return statements * Ensure query array index will exist * Only sort when adding a query * Remove aria-label with dupe text * hasFilters is function * Update useQueryStateByKey usage * More doc block fixes * Update getAttributeFromTaxonomy return and docblock * getAttributeFromID return/docblock
2019-11-15 14:41:23 +00:00
"trim-html": "0.1.9",
"use-debounce": "7.0.1",
"wordpress-components": "npm:@wordpress/components@14.2.0"
},
Fix 404 and 500 errors in E2E test logs, editor and front-end. (https://github.com/woocommerce/woocommerce-blocks/pull/5989) * Change atomic blocks to not use custom webpack build paths we want to always load lazy loaded components from their default paths to avoid having to handle importing components in different ways for regular and atomic component packages * Add footer parts to test themes The Site Editor is expecting the footer parts to be there or it will try to load them anyways and throw a 404. It's not breaking, but it's polluting the console. * Use REST API to tear down the templates Previously, we used a util called `trashAllPosts` which navigated to the post UI and deleted all the posts to tear down any side-effects of template editing tests. However, with a [recent change](https://github.com/WordPress/wordpress-develop/commit/14e20f72b568cfb5a85f57c77eaa538c17a5f302), WP Core removed the UI for those and that made our tests meet a 500 error. Using the REST API should also make everything faster. * Remove deprecated pupeteer waitFor usage was still present in attribute-filter.test.js * Update package-lock.json * pin package versions * Unify all atomic blocks to register on php side * Remove Atomic Blcoks chunk_translation handling from AllBlocks Before it was responsible for enabling translations for all the atomic blocks * Add per atomic block chunk_translation registration * update @wordpress/e2e-test-utils to 6.0.2 * add optional puppeteer * pin workflows node version to 16.13.2 * upgrade package-lock * upgrade package-lock * set react and react-dom as peerDeps * remove atomic block registration Co-authored-by: Lucio Giannotta <lucio.giannotta@a8c.com> Co-authored-by: Luigi <gigitux@gmail.com>
2022-03-10 10:00:23 +00:00
"peerDependencies": {
"react": "^17.0.0",
"react-dom": "^17.0.0"
},
"optionalDependencies": {
"ndb": "1.1.5"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"*.scss": [
"npm run lint:css"
],
Add TypeScript support and convert cart data store to TypeScript (https://github.com/woocommerce/woocommerce-blocks/pull/3768) * add typescript support * Add type declarations for Cart and CartResponse interfaces * make sure we’re resolving .ts files as well as .js files on imports * add more types * type the cart data store * Apply suggestions from code review (implement .tsx in configs) Co-authored-by: Jon Surrell <jon.surrell@automattic.com> * remove global fetchMock declaration and directly import where used. * rename type * remove named action types and just infer by returning action creator values as const * use interface instead of type * rename * renames * create CartAction type as union of action creator returned types and implement in reducer * remove unused imports * refresh package-lock after rebase * Add base TS config that projects will inherit from * Add tsconfig for assets/js/data project * Ignore TS error on cart store registration We will address this in cooldown when we have time to investigate further * Add tsc to build step to catch TypeScript errors * add a separate command for tsc and tweak build command to use * restore checkJs and allowJs values in config and remove ts check from build command * Add ts:check-all command * Add TypeScript checking workflows * Change triggers for TypeScript workflow * Use npm ci instead of npm install * Remove ts:check-all from TypeScript workflow * Remove TS Check GitHub workflow * Remove type-defs dir from TS include, and remove ts:check-all script We no longer need the ts:check-all script because ts:check will do this for us, the old ts:check did nothing and did not work. * fix coupon loading issues * include .ts files only from type-defs folder Co-authored-by: Jon Surrell <jon.surrell@automattic.com> Co-authored-by: Thomas Roberts <thomas.roberts@automattic.com>
2021-02-24 01:36:24 +00:00
"*.{js,ts,tsx}": [
"prettier --write",
"npm run lint:js"
],
"*.php": [
"php -d display_errors=1 -l",
"composer run-script phpcs"
],
"*.md": [
"npm run lint:md:docs"
]
},
"changelog": {
"labelPrefix": "type:",
"skipLabel": "skip-changelog",
"defaultPrefix": "dev",
"repo": "woocommerce/woocommerce-gutenberg-products-block"
},
"files": [
"assets/**/*.{js,scss,php}",
"build/**/*.{js,json,css}",
"includes/**/*.php",
"languages/**/*.json",
"license.txt",
"woocommerce-gutenberg-products-block.php"
]
}