woocommerce/plugins/woocommerce-blocks/package.json

252 lines
9.7 KiB
JSON
Raw Normal View History

{
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
2022-01-20 13:39:19 +00:00
"version": "6.9.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/cart-checkout/checkout/inner-blocks/**/index.tsx",
"./assets/js/blocks/cart-checkout/checkout/inner-blocks/register-components.ts",
"./assets/js/blocks/cart-checkout/cart/inner-blocks/**/index.tsx",
"./assets/js/blocks/cart-checkout/cart/inner-blocks/register-components.ts"
],
"repository": {
"type": "git",
"url": "https://github.com:woocommerce/woocommerce-gutenberg-products-block.git"
},
"license": "GPL-3.0+",
"scripts": {
"build": "rimraf build/* && cross-env 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",
"build:map": "cross-env BABEL_ENV=default NODE_ENV=production FORCE_MAP=true webpack",
"build:docs": "./vendor/bin/wp-hooks-generator --input=src --output=bin/hook-docs/data && node ./bin/hook-docs",
"changelog": "node ./bin/changelog",
"changelog:zenhub": "node ./bin/changelog --changelogSrcType='ZENHUB_RELEASE'",
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",
"postdeploy": "npm run storybook:deploy",
"dev": "rimraf build/* && cross-env BABEL_ENV=default webpack",
"explore": "source-map-explorer",
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:php": "composer run-script phpcs ./src",
"lint:php-fix": "composer run-script phpcbf ./src",
"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",
Add @woocommerce/eslint-plugin dependency (https://github.com/woocommerce/woocommerce-blocks/pull/3115) * convert eslint config to use @woocommerce/eslint-plugin - removes unnecessary dependencies - adds e2e-tests/specs to eslint ignore (they are automatically generated) - turns off rules that will be handled in subsequent pulls (to avoid a mammoth changeset for review). - NOTE: prettier config needs left in because of a bug with the existing version of `@wordpress/eslint-plugin` pulled in (fixed in https://github.com/WordPress/gutenberg/pull/25068) so I left the file for now. * prettier fixes. * remove obsolete plugin and fixes for eslint update This branch brings an update to eslint which also changes some syntax with plugins. So this commit: - fixes featuer-flag plugin syntax. - removed obsolete dependency-group plugin (which is now in the `@woocommerce/eslint-plugin` configuration. * add to-do comment * fixes for test runs - this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run. * fixes for test runs - this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run. * include prettier alias as a dependency This has to be done because prettier is installed with storybook and thus the alias setup in `@wordpress/scripts` is over-ridden by the storybook import. * another attempt at e2e-test-fix * add some debugging and temporarily just add one e2e config test for travis * more debugging * try installing full puppeteer and see if fixes * fix package-lock? * setupSettings separately from other fixture loading * add debugging of files * add another console.log (hopefully trigger travis) * split out blockPage creation to it’s own as well * fixed! remove debugging and re-enable travis configs for entire test suite * fix config and rename e2e-tests to e2e - fixes the failing product-search test - tests/e2e-tests was redundant, I changed to `tests/e2e` (this follows a file pattern change made in woocommerce core as well). * add todo for some eslint properties * remove unnecessary early function execution * revert earlier commit and remove duplicate call to createBlockPages
2020-09-07 17:31:10 +00:00
"test:e2e": "npm run wp-env:config && cross-env 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 NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --puppeteer-interactive",
"test:e2e:update": "npm run wp-env:config && cross-env NODE_CONFIG_DIR=tests/e2e/config wp-scripts test-e2e --config tests/e2e/config/jest.config.js --updateSnapshot",
"test:help": "wp-scripts test-unit-js --help",
"test:php": "npm run wp-env:phpunit-config",
"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",
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",
"wp-env:phpunit-config": "./bin/wp-env-phpunit-pre-config.sh"
},
"devDependencies": {
"@automattic/color-studio": "2.5.0",
"@babel/cli": "7.16.8",
"@babel/core": "7.16.12",
"@babel/plugin-proposal-class-properties": "7.16.7",
"@babel/plugin-syntax-jsx": "7.16.7",
"@babel/polyfill": "7.12.1",
"@babel/preset-typescript": "7.16.7",
"@octokit/graphql": "4.8.0",
"@storybook/addon-a11y": "6.4.9",
"@storybook/addon-essentials": "6.4.9",
"@storybook/addon-links": "6.4.9",
"@storybook/addon-storysource": "6.4.9",
"@storybook/addons": "6.4.9",
"@storybook/client-api": "6.4.9",
"@storybook/react": "6.4.13",
"@testing-library/jest-dom": "5.15.1",
"@testing-library/react": "12.1.2",
"@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/gtag.js": "0.0.8",
"@types/jest": "26.0.24",
"@types/jquery": "3.5.13",
"@types/lodash": "4.14.178",
"@types/react": "16.14.21",
"@types/wordpress__block-editor": "6.0.4",
"@types/wordpress__compose": "4.0.1",
"@types/wordpress__data": "4.6.10",
"@types/wordpress__data-controls": "2.2.0",
"@types/wordpress__deprecated": "2.4.3",
"@types/wordpress__keycodes": "2.3.1",
"@typescript-eslint/eslint-plugin": "4.14.1",
"@typescript-eslint/parser": "4.14.1",
"@woocommerce/api": "0.2.0",
"@woocommerce/e2e-utils": "0.1.6",
"@woocommerce/eslint-plugin": "1.2.0",
"@woocommerce/woocommerce-rest-api": "1.0.1",
"@wordpress/api-fetch": "5.2.6",
"@wordpress/babel-preset-default": "6.4.1",
"@wordpress/base-styles": "4.0.4",
"@wordpress/blocks": "11.1.5",
"@wordpress/browserslist-config": "4.1.0",
"@wordpress/components": "19.1.5",
"@wordpress/data-controls": "2.2.7",
"@wordpress/dependency-extraction-webpack-plugin": "3.2.1",
"@wordpress/dom": "3.2.7",
"@wordpress/e2e-test-utils": "5.4.10",
"@wordpress/element": "4.0.4",
"@wordpress/env": "4.1.3",
"@wordpress/html-entities": "3.2.3",
"@wordpress/i18n": "4.2.4",
"@wordpress/is-shallow-equal": "4.2.1",
"@wordpress/scripts": "17.1.0",
"autoprefixer": "10.3.7",
"axios": "0.21.4",
"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": "6.2.1",
"core-js": "3.16.2",
"create-file-webpack": "1.0.2",
Fix wp-cli container permissions issues for e2e docker test environment (https://github.com/woocommerce/woocommerce-blocks/pull/1716) * add docker files * get tests to work * remove irrelevant files * change userAgent to chrome * add woocommerce as a dep * add jest to eslint * remove eslintignore for tests * undo travis chages till another PR * remove local utils and call them directly from woocommerce * update deps * add setup files to run tests * export default wp link * wait for select before selecting * remove travis db * ignore e2e tests in unit testing * add tests * add docker commands * always run composer * Make it possible to import directly from '@woocommerce/e2e-tests/utils' * remove installing woocommerce via composer. * add more docker npm scripts * add custom docker config for wp-cli * add changes to docker-composer.yml Includes reading environment variables from `.env` * revert customizations to .travis.yml * move main docker file for the wordpress container to bin * fix travis config * rename wp install for travis builds back to original name * use a version of docker-compose that travis supports * add minor change to try and force travis test run * fix incorrect command * copy composer lock from master * only run phpcs on /src directory * give time for host to spin up for e2e tests * increase sleep for waiting on container * make sure plugin is built before running tests * sigh fix improper command usage Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com> Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2020-02-11 16:13:20 +00:00
"cross-env": "6.0.3",
"cssnano": "4.1.11",
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": "2.5.0",
"eslint-import-resolver-webpack": "0.13.2",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-woocommerce": "file:bin/eslint-plugin-woocommerce",
"eslint-plugin-you-dont-need-lodash-underscore": "6.12.0",
"expect-puppeteer": "6.0.2",
"follow-redirects": "1.14.7",
"fs-extra": "9.1.0",
"gh-pages": "3.2.3",
"github-label-sync": "2.0.2",
"glob": "7.1.7",
"glob-promise": "3.4.0",
"husky": "2.4.1",
"ignore-loader": "0.1.2",
"jest-circus": "27.2.4",
Add @woocommerce/eslint-plugin dependency (https://github.com/woocommerce/woocommerce-blocks/pull/3115) * convert eslint config to use @woocommerce/eslint-plugin - removes unnecessary dependencies - adds e2e-tests/specs to eslint ignore (they are automatically generated) - turns off rules that will be handled in subsequent pulls (to avoid a mammoth changeset for review). - NOTE: prettier config needs left in because of a bug with the existing version of `@wordpress/eslint-plugin` pulled in (fixed in https://github.com/WordPress/gutenberg/pull/25068) so I left the file for now. * prettier fixes. * remove obsolete plugin and fixes for eslint update This branch brings an update to eslint which also changes some syntax with plugins. So this commit: - fixes featuer-flag plugin syntax. - removed obsolete dependency-group plugin (which is now in the `@woocommerce/eslint-plugin` configuration. * add to-do comment * fixes for test runs - this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run. * fixes for test runs - this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run. * include prettier alias as a dependency This has to be done because prettier is installed with storybook and thus the alias setup in `@wordpress/scripts` is over-ridden by the storybook import. * another attempt at e2e-test-fix * add some debugging and temporarily just add one e2e config test for travis * more debugging * try installing full puppeteer and see if fixes * fix package-lock? * setupSettings separately from other fixture loading * add debugging of files * add another console.log (hopefully trigger travis) * split out blockPage creation to it’s own as well * fixed! remove debugging and re-enable travis configs for entire test suite * fix config and rename e2e-tests to e2e - fixes the failing product-search test - tests/e2e-tests was redundant, I changed to `tests/e2e` (this follows a file pattern change made in woocommerce core as well). * add todo for some eslint properties * remove unnecessary early function execution * revert earlier commit and remove duplicate call to createBlockPages
2020-09-07 17:31:10 +00:00
"jest-environment-jsdom-sixteen": "1.0.3",
"jest-environment-puppeteer": "6.0.3",
"jest-fetch-mock": "3.0.3",
"jest-html-reporters": "2.1.6",
"json2md": "1.12.0",
Fix wp-cli container permissions issues for e2e docker test environment (https://github.com/woocommerce/woocommerce-blocks/pull/1716) * add docker files * get tests to work * remove irrelevant files * change userAgent to chrome * add woocommerce as a dep * add jest to eslint * remove eslintignore for tests * undo travis chages till another PR * remove local utils and call them directly from woocommerce * update deps * add setup files to run tests * export default wp link * wait for select before selecting * remove travis db * ignore e2e tests in unit testing * add tests * add docker commands * always run composer * Make it possible to import directly from '@woocommerce/e2e-tests/utils' * remove installing woocommerce via composer. * add more docker npm scripts * add custom docker config for wp-cli * add changes to docker-composer.yml Includes reading environment variables from `.env` * revert customizations to .travis.yml * move main docker file for the wordpress container to bin * fix travis config * rename wp install for travis builds back to original name * use a version of docker-compose that travis supports * add minor change to try and force travis test run * fix incorrect command * copy composer lock from master * only run phpcs on /src directory * give time for host to spin up for e2e tests * increase sleep for waiting on container * make sure plugin is built before running tests * sigh fix improper command usage Co-authored-by: Seghir Nadir <nadir.seghir@gmail.com> Co-authored-by: Albert Juhé Lluveras <aljullu@gmail.com>
2020-02-11 16:13:20 +00:00
"lint-staged": "9.5.0",
"lodash": "4.17.21",
"markdown-it": "12.3.2",
"merge-config": "2.0.0",
"mini-css-extract-plugin": "1.3.6",
"patch-package": "6.4.7",
"postcss": "8.2.13",
"postcss-loader": "4.2.0",
Add @woocommerce/eslint-plugin dependency (https://github.com/woocommerce/woocommerce-blocks/pull/3115) * convert eslint config to use @woocommerce/eslint-plugin - removes unnecessary dependencies - adds e2e-tests/specs to eslint ignore (they are automatically generated) - turns off rules that will be handled in subsequent pulls (to avoid a mammoth changeset for review). - NOTE: prettier config needs left in because of a bug with the existing version of `@wordpress/eslint-plugin` pulled in (fixed in https://github.com/WordPress/gutenberg/pull/25068) so I left the file for now. * prettier fixes. * remove obsolete plugin and fixes for eslint update This branch brings an update to eslint which also changes some syntax with plugins. So this commit: - fixes featuer-flag plugin syntax. - removed obsolete dependency-group plugin (which is now in the `@woocommerce/eslint-plugin` configuration. * add to-do comment * fixes for test runs - this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run. * fixes for test runs - this also converts our e2e test scripts to use `wp-script test:e2e`, an advantage of this is it will load CHROMIUM on demand for the e2e test run. * include prettier alias as a dependency This has to be done because prettier is installed with storybook and thus the alias setup in `@wordpress/scripts` is over-ridden by the storybook import. * another attempt at e2e-test-fix * add some debugging and temporarily just add one e2e config test for travis * more debugging * try installing full puppeteer and see if fixes * fix package-lock? * setupSettings separately from other fixture loading * add debugging of files * add another console.log (hopefully trigger travis) * split out blockPage creation to it’s own as well * fixed! remove debugging and re-enable travis configs for entire test suite * fix config and rename e2e-tests to e2e - fixes the failing product-search test - tests/e2e-tests was redundant, I changed to `tests/e2e` (this follows a file pattern change made in woocommerce core as well). * add todo for some eslint properties * remove unnecessary early function execution * revert earlier commit and remove duplicate call to createBlockPages
2020-09-07 17:31:10 +00:00
"prettier": "npm:wp-prettier@2.0.5",
"progress-bar-webpack-plugin": "2.1.0",
"promptly": "3.2.0",
"react-docgen": "5.4.0",
"react-test-renderer": "17.0.2",
"request-promise": "4.2.6",
"rimraf": "3.0.2",
"sass-loader": "10.1.0",
"source-map-explorer": "2.5.2",
"storybook-addon-react-docgen": "1.2.42",
"terser-webpack-plugin": "3.0.3",
"typescript": "4.1.3",
"utility-types": "3.10.0",
"webpack": "4.44.2",
"webpack-cli": "3.3.12",
"webpack-rtl-plugin": "2.0.0",
"zenhub-api": "0.2.0"
},
"engines": {
"node": "^16.13.0",
"npm": "^8.0.0"
},
"dependencies": {
"@wordpress/autop": "3.2.3",
"@wordpress/deprecated": "3.2.3",
"@wordpress/icons": "6.1.1",
"@wordpress/notices": "3.2.8",
"@wordpress/plugins": "4.0.7",
"@wordpress/server-side-render": "3.0.17",
"@wordpress/wordcount": "3.2.3",
"classnames": "2.3.1",
"compare-versions": "3.6.0",
"config": "3.3.7",
"dataloader": "2.0.0",
"dinero.js": "1.9.1",
"downshift": "6.1.7",
"html-react-parser": "0.14.3",
"react-number-format": "4.4.3",
"reakit": "1.3.11",
"snakecase-keys": "5.1.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"
},
"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"
]
},
"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"
]
}