woocommerce/plugins/woocommerce-blocks/package.json

240 lines
9.4 KiB
JSON
Raw Normal View History

{
"name": "@woocommerce/block-library",
"title": "WooCommerce Blocks",
"author": "Automattic",
2021-06-25 11:11:43 +00:00
"version": "5.5.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/**",
"./assets/js/settings/blocks/**",
"./assets/js/middleware/**"
],
"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",
"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 'assets/**/*.scss'",
"lint:css-fix": "stylelint 'assets/**/*.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",
"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",
Create GitHub actions for automated tests (https://github.com/woocommerce/woocommerce-blocks/pull/3544) * Create end-to-end-tests.yml for E2E testing action * Change actions to run on push instead of PR * Install libstdc++-4.9-dev on E2E tests action * Add correct apt repository for libstc++ * Reconfigure apt-get commands for installing libstdc++ * Remove accidental inclusion of Travis config from E2E tests action * Install libkrb5-dev as part of e2e test action * Run apt commands as sudo * Install gutenberg plugin and e2e testutils * Add environment variables to E2E tests * Rename action and add further config for composer and wp-env * Rename workflow * Add jobs for WP 5.6, 5.5, and 5.4 * Fix YML indentation * Apply 767 permissions to wp-env directory * Run chmod as sudo * Comment 5.6 and 5.6 with GB out to test 5.4 more easily * Remove WP install job, since it should run on each step * Change order of wp-env start and chmod * Reorder commands for 5.4 job * Try running 5.4 tests in isolation * Reenable tests for all WP versions * Move commands out of bash script into a series of commands * Fix indentation on 5.5 job * Re-enable libkrb5-dev install * Clean wp-env before each run & upgrade wp-env to 3.0.0 * Update lock file for wp-env@3.0.0 * Reorder wp-env start and clean commands * Reorder wp-env permissions commands * Reorder wp-env permissions setup for all jobs * Reorder wp-env permissions setup for 5.5 and 5.4 * Ensure correct order for env setup and flush permalinks twice * Update jest snapshots * Remove rewrite flush command from yml * Remove npm build from every step and try it just at the start * Set correct e2e build script * Add jobs for PHP 8 * Specify PHP 8 minor version * Run PHP 8 jobs first * Remove PHP 8 jobs * Add JS Unit tests job * Remove js-unit-tests.js workflow * Remove composer install from every step, add it to its own step * Cache composer files * Bust npm cache to test nodegit * Rename npm cache * Renove npm cache entirely * Revert "Renove npm cache entirely" This reverts commit d6fac6a6ebd9162e48f64daaa8c971320756579e. * Rename npm cache back to how it was * Fix yml indentation * Remove echo from composer cache step * Revert back to composer example * Add PHP Unit tests to workflow * Add PHP Unit tests to workflow * Rename E2E tests workflow and file * deliberately break e2e and unit tests to test workflow 👺 * fix php test, should see e2e fail * revert broken e2e test * Change steps into jobs, rename workflow * Remove Travis workflow file * Add all necessary setup steps to each job * Rename Setup job and remove dependency * Add individual jobs for each E2E test environment * Add npm install and build to setup job * YML syntax fix * Remove error-causing chmod * Rename blocks.ini setup step Fixes a typographical error. * Get the latest stable version of WooCommerce for PHPUnit testing * Add PHP8.0 and PHP5.6 Unit tests * Run composer update for PHP 5.6 and PHP 8.0 * Revert "Run composer update for PHP 5.6 and PHP 8.0" This reverts commit 4f90522d0b52b7a8b9e896e9c783795be9dc5399. * Revert "Add PHP8.0 and PHP5.6 Unit tests" This reverts commit 66e317dec4af6e3a2ac6f78b6efd050e7fc5aa8e. Co-authored-by: Rua Haszard <rua.haszard@automattic.com>
2021-01-05 09:27:22 +00:00
"phpunit": "docker-compose up -d db && docker-compose up -d --build wordpress-unit-tests && docker exec --workdir /var/www/html/wp-content/plugins/woocommerce-gutenberg-products-block wordpress_test php ./vendor/bin/phpunit",
"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": "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: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"
},
"devDependencies": {
"@automattic/color-studio": "2.5.0",
"@automattic/data-stores": "2.0.1",
"@babel/cli": "7.14.5",
"@babel/core": "7.14.6",
"@babel/plugin-proposal-class-properties": "7.14.5",
"@babel/polyfill": "7.12.1",
"@babel/preset-env": "7.14.7",
"@babel/preset-typescript": "7.14.5",
"@octokit/graphql": "4.6.4",
"@storybook/addon-a11y": "6.1.18",
"@storybook/addon-actions": "6.1.18",
"@storybook/addon-docs": "6.1.18",
"@storybook/addon-knobs": "6.2.9",
"@storybook/addon-links": "6.1.18",
"@storybook/addon-storysource": "6.1.18",
"@storybook/addon-viewport": "6.1.18",
"@storybook/addons": "6.1.18",
"@storybook/react": "6.1.18",
"@testing-library/jest-dom": "5.14.1",
"@testing-library/react": "11.2.7",
"@testing-library/react-hooks": "5.1.3",
"@testing-library/user-event": "12.8.3",
"@types/classnames": "2.3.0",
"@types/dinero.js": "1.8.0",
"@types/gtag.js": "0.0.6",
"@types/jest": "26.0.23",
"@types/lodash": "4.14.170",
"@types/react": "16.14.8",
"@types/wordpress__data": "4.6.9",
"@types/wordpress__data-controls": "1.0.5",
"@types/wordpress__deprecated": "2.4.2",
"@types/wordpress__element": "2.4.1",
"@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.5",
"@woocommerce/eslint-plugin": "1.2.0",
"@woocommerce/woocommerce-rest-api": "1.0.1",
"@wordpress/api-fetch": "3.23.1",
"@wordpress/babel-preset-default": "4.18.1",
"@wordpress/base-styles": "3.2.0",
"@wordpress/blocks": "6.22.0",
"@wordpress/browserslist-config": "2.7.0",
"@wordpress/components": "11.1.1",
"@wordpress/data-controls": "1.20.8",
"@wordpress/dependency-extraction-webpack-plugin": "2.8.0",
"@wordpress/e2e-test-utils": "5.1.2",
"@wordpress/editor": "9.22.0",
"@wordpress/element": "2.17.1",
"@wordpress/env": "4.0.2",
"@wordpress/html-entities": "2.8.0",
"@wordpress/i18n": "3.15.0",
"@wordpress/is-shallow-equal": "3.0.1",
"@wordpress/scripts": "13.0.1",
"autoprefixer": "10.2.6",
"axios": "0.21.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",
"babel-plugin-transform-runtime": "6.23.0",
"chalk": "4.1.1",
"circular-dependency-plugin": "5.2.2",
"commander": "6.2.1",
"core-js": "3.8.3",
"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.3.0",
"eslint-import-resolver-webpack": "0.13.1",
"eslint-plugin-import": "2.22.1",
"eslint-plugin-woocommerce": "file:bin/eslint-plugin-woocommerce",
"eslint-plugin-you-dont-need-lodash-underscore": "6.10.0",
"fs-extra": "9.1.0",
"gh-pages": "3.2.3",
"glob": "7.1.7",
"glob-promise": "3.4.0",
"husky": "2.4.1",
"ignore-loader": "0.1.2",
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-fetch-mock": "3.0.3",
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",
"merge-config": "2.0.0",
"mini-css-extract-plugin": "1.3.6",
"postcss": "8.2.10",
"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",
"puppeteer": "npm:puppeteer-core@5.5.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",
"terser-webpack-plugin": "3.0.3",
"typescript": "4.1.3",
"webpack": "4.44.2",
"webpack-cli": "3.3.12",
"webpack-rtl-plugin": "2.0.0",
"zenhub-api": "0.2.0"
},
"engines": {
"node": "12.22.1",
"npm": "6.14.13"
},
"dependencies": {
"@stripe/react-stripe-js": "1.4.1",
"@stripe/stripe-js": "1.15.1",
"@types/wordpress-components": "npm:@types/wordpress__components@9.8.6",
"@woocommerce/components": "6.2.0",
"@wordpress/autop": "2.9.0",
"@wordpress/deprecated": "2.9.0",
"@wordpress/notices": "2.9.1",
"@wordpress/plugins": "2.23.0",
"@wordpress/server-side-render": "1.19.3",
"@wordpress/wordcount": "2.11.0",
"classnames": "2.3.1",
"compare-versions": "3.6.0",
"config": "3.3.6",
"dataloader": "2.0.0",
"dinero.js": "1.8.1",
"downshift": "6.1.3",
"github-label-sync": "2.0.1",
"html-react-parser": "0.14.3",
"react-number-format": "4.4.3",
"reakit": "1.3.8",
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": "3.4.3",
"wordpress-components": "npm:@wordpress/components@11.1.5",
"wordpress-compose": "npm:@wordpress/compose@3.23.1",
"wordpress-element": "npm:@wordpress/element@2.18.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"
]
}