Refactored Task Infrastructure (#41202)

* Fixed NPM packages with invalid names.
* Renamed plugin packages.
* Standardized package NPM scripts.
* Replaced Turborepo with Wireit.
This commit is contained in:
Christopher Allford 2023-12-06 09:32:32 -08:00 committed by GitHub
parent bf87c09969
commit 96a973b9fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
135 changed files with 3836 additions and 2103 deletions

View File

@ -35,7 +35,7 @@ Please take a moment to review the [project readme](https://github.com/woocommer
- Ensure you stick to the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/). - Ensure you stick to the [WordPress Coding Standards](https://make.wordpress.org/core/handbook/best-practices/coding-standards/php/).
- Run our build process described in the document on [how to set up WooCommerce development environment](https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment), it will install our pre-commit hook, code sniffs, dependencies, and more. - Run our build process described in the document on [how to set up WooCommerce development environment](https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment), it will install our pre-commit hook, code sniffs, dependencies, and more.
- Before pushing commits to GitHub, check your code against our code standards. For PHP code in the WooCommerce Core project you can do this by running `pnpm --filter=woocommerce run lint:php:changes:branch`. - Before pushing commits to GitHub, check your code against our code standards. For PHP code in the WooCommerce Core project you can do this by running `pnpm --filter=@woocommerce/plugin-woocommerce lint:php:changes:branch`.
- Whenever possible, please fix pre-existing code standards errors in code that you change. - Whenever possible, please fix pre-existing code standards errors in code that you change.
- Please consider adding appropriate tests related to your change if applicable such as unit, API and E2E tests. You can check the following guides for this purpose: - Please consider adding appropriate tests related to your change if applicable such as unit, API and E2E tests. You can check the following guides for this purpose:
- [Writing unit tests](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/tests/README.md#guide-for-writing-unit-tests). - [Writing unit tests](https://github.com/woocommerce/woocommerce/blob/trunk/plugins/woocommerce/tests/README.md#guide-for-writing-unit-tests).
@ -46,7 +46,7 @@ Please take a moment to review the [project readme](https://github.com/woocommer
- Ensure that your code supports the minimum supported versions of PHP and WordPress; this is shown at the top of the `readme.txt` file. - Ensure that your code supports the minimum supported versions of PHP and WordPress; this is shown at the top of the `readme.txt` file.
- Push the changes to your fork and submit a pull request on the trunk branch of the WooCommerce repository. - Push the changes to your fork and submit a pull request on the trunk branch of the WooCommerce repository.
- Make sure to write good and detailed commit messages (see [this post](https://chris.beams.io/posts/git-commit/) for more on this) and follow all the applicable sections of the pull request template. - Make sure to write good and detailed commit messages (see [this post](https://chris.beams.io/posts/git-commit/) for more on this) and follow all the applicable sections of the pull request template.
- Please create a change file for your changes by running `pnpm --filter=<project> changelog add`. For example, a change file for the WooCommerce Core project would be added by running `pnpm --filter=woocommerce changelog add`. - Please create a change file for your changes by running `pnpm --filter=<project> changelog add`. For example, a change file for the WooCommerce Core project would be added by running `pnpm --filter=@woocommerce/plugin-woocommerce changelog add`.
- Please avoid modifying the changelog directly or updating the .pot files. These will be updated by the WooCommerce team. - Please avoid modifying the changelog directly or updating the .pot files. These will be updated by the WooCommerce team.
If you are contributing code to our (Javascript-driven) Gutenberg blocks, please note that they are developed in their [own repository](https://github.com/woocommerce/woocommerce-gutenberg-products-block) and have their [own issue tracker](https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues). If you are contributing code to our (Javascript-driven) Gutenberg blocks, please note that they are developed in their [own repository](https://github.com/woocommerce/woocommerce-gutenberg-products-block) and have their [own issue tracker](https://github.com/woocommerce/woocommerce-gutenberg-products-block/issues).

View File

@ -1,91 +1,62 @@
name: Setup WooCommerce Monorepo name: 'Setup WooCommerce Monorepo'
description: Handles the installation, building, and caching of the projects within the monorepo. description: 'A composite action bundling together the setup of dependencies and optional installation and building of projects.'
permissions: {}
inputs: inputs:
install:
description: Indicates whether or not the action should install any projects.
default: 'true'
install-filters:
description: The PNPM filter used to decide what projects to install. Supports multiline strings for multiple filters.
default: ''
build:
description: Indicates whether or not the action should build any projects.
default: 'true'
build-filters:
description: The PNPM filter used to decide what projects to build. Supports multiline strings for multiple filters.
default: ''
php-version: php-version:
description: The version of PHP that the action should set up. description: 'The PHP version that should be installed. Use "false" to skip PHP installation.'
default: '7.4' default: '7.4'
install:
description: 'Given a boolean or PNPM filter, runs the install command for monorepo project(s).'
default: false
build:
description: 'Given a boolean or PNPM filter, runs the build command for monorepo project(s).'
default: false
runs: runs:
using: composite using: 'composite'
steps: steps:
- name: Parse Action Input - name: 'Setup PNPM'
id: parse-input uses: 'pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598'
shell: bash with:
version: '8'
- name: 'Setup Node'
uses: 'actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65'
with:
node-version-file: '.nvmrc'
# We only want to use the cache if something is being installed.
cache: ${{ inputs.install != 'false' && 'pnpm' || '' }}
- name: 'Setup PHP'
if: ${{ inputs.php-version != 'false' }}
uses: 'shivammathur/setup-php@a36e1e52ff4a1c9e9c9be31551ee4712a6cb6bd0'
with:
php-version: '${{ inputs.php-version }}'
coverage: 'none'
- name: 'Cache Composer Dependencies'
if: ${{ inputs.php-version != 'false' }}
uses: 'actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84'
with:
path: '~/.cache/composer/files'
key: "${{ runner.os }}-composer-${{ hashFiles( '**/composer.lock' ) }}"
restore-keys: '${{ runner.os }}-composer-'
- name: 'Parse Project Filters'
id: 'project-filters'
shell: 'bash'
run: | run: |
echo "INSTALL_FILTERS=$(node ./.github/actions/setup-woocommerce-monorepo/scripts/parse-input-filter.js '${{ inputs.install-filters }}')" >> $GITHUB_OUTPUT echo "install=$(node ./.github/actions/setup-woocommerce-monorepo/scripts/parse-input-filter.js '${{ inputs.install }}')" >> $GITHUB_OUTPUT
echo "BUILD_FILTERS=$(node ./.github/actions/setup-woocommerce-monorepo/scripts/parse-input-filter.js '${{ inputs.build-filters }}')" >> $GITHUB_OUTPUT echo "build=$(node ./.github/actions/setup-woocommerce-monorepo/scripts/parse-input-filter.js '${{ inputs.build }}')" >> $GITHUB_OUTPUT
- name: 'Install Project Dependencies'
- name: Setup PNPM # Boolean inputs aren't parsed into filters so it'll either be "true" or there will be a filter.
uses: pnpm/action-setup@c3b53f6a16e57305370b4ae5a540c2077a1d50dd if: ${{ inputs.install == 'true' || steps.project-filters.outputs.install != '' }}
with: shell: 'bash'
version: '8.6.7' run: 'pnpm install'
# `pnpm install` filtering is broken: https://github.com/pnpm/pnpm/issues/6300
- name: Setup Node # run: 'pnpm install ${{ steps.project-filters.outputs.install }}'
uses: actions/setup-node@64ed1c7eab4cce3362f8c340dee64e5eaeef8f7c # We want to include an option to build projects using this action so that we can make
with: # sure that the build cache is always used when building projects.
node-version-file: .nvmrc - name: 'Cache Build Output'
cache: pnpm # Boolean inputs aren't parsed into filters so it'll either be "true" or there will be a filter.
registry-url: 'https://registry.npmjs.org' if: ${{ inputs.build == 'true' || steps.project-filters.outputs.build != '' }}
uses: 'google/wireit@f3a3c79c553122e2fe5829eeac7d815326502903'
- name: Setup PHP - name: 'Build'
uses: shivammathur/setup-php@8e2ac35f639d3e794c1da1f28999385ab6fdf0fc # Boolean inputs aren't parsed into filters so it'll either be "true" or there will be a filter.
with: if: ${{ inputs.build == 'true' || steps.project-filters.outputs.build != '' }}
php-version: ${{ inputs.php-version }} shell: 'bash'
coverage: none run: 'pnpm ${{ steps.project-filters.outputs.build }} build'
tools: phpcs, sirbrillig/phpcs-changed:2.11.1
- name: Cache Composer Dependencies
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: ~/.cache/composer/files
key: ${{ runner.os }}-php-${{ inputs.php-version }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-php-${{ inputs.php-version }}-composer-
- name: Install Node and PHP Dependencies
shell: bash
if: ${{ inputs.install == 'true' }}
env:
PUPPETEER_SKIP_DOWNLOAD: 'true'
run: |
pnpm -w install turbo
pnpm install ${{ steps.parse-input.outputs.INSTALL_FILTERS }}
- name: Get branch name
id: get_branch
shell: bash
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
branch_name=$(echo "${{ github.head_ref }}" | tr '/' '-')
echo "CURRENT_BRANCH_NAME=$branch_name" >> $GITHUB_OUTPUT
else
echo "CURRENT_BRANCH_NAME=${{ github.ref_name }}" >> $GITHUB_OUTPUT
fi
- name: Cache Build Output
if: ${{ inputs.build == 'true' }}
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8
with:
path: .turbo
key: ${{ runner.os }}-build-output-${{ steps.get_branch.outputs.CURRENT_BRANCH_NAME }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-build-output-${{ steps.get_branch.outputs.CURRENT_BRANCH_NAME }}
${{ runner.os }}-build-output
- name: Build
if: ${{ inputs.install == 'true' && inputs.build == 'true' }}
shell: bash
run: pnpm -w exec turbo run turbo:build --cache-dir=".turbo" ${{ steps.parse-input.outputs.BUILD_FILTERS }}

View File

@ -4,6 +4,11 @@ if (args.length != 1) {
process.exit( -1 ); process.exit( -1 );
} }
// Boolean inputs should not be processed.
if ( args[0] === 'true' || args[0] === 'false' ) {
process.exit();
}
// Read all of the given filters and return the full filter options string. // Read all of the given filters and return the full filter options string.
const filterLines = args[0].split( "\n" ); const filterLines = args[0].split( "\n" );
let output = ''; let output = '';
@ -15,8 +20,8 @@ for (const line of filterLines) {
if ( output !== '' ) { if ( output !== '' ) {
output += ' '; output += ' ';
} }
output += "--filter='" + line + "'"; output += `--filter='${ line }'`;
} }
console.log( output ); console.log( output );
process.exit(0); process.exit();

View File

@ -18,12 +18,12 @@ runs:
if: ( inputs.test-type == 'e2e' ) || ( inputs.test-type == 'api' ) if: ( inputs.test-type == 'e2e' ) || ( inputs.test-type == 'api' )
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
shell: bash shell: bash
run: pnpm run env:test run: pnpm env:test
- name: Load docker images and start containers for k6 performance tests - name: Load docker images and start containers for k6 performance tests
if: inputs.test-type == 'k6' if: inputs.test-type == 'k6'
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
shell: bash shell: bash
run: | run: |
pnpm env:dev --filter=woocommerce pnpm --filter=@woocommerce/plugin-woocommerce env:dev
pnpm env:performance-init --filter=woocommerce pnpm --filter=@woocommerce/plugin-woocommerce env:performance-init

View File

@ -30,8 +30,6 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Prepare plugin zips - name: Prepare plugin zips
id: prepare id: prepare

View File

@ -20,8 +20,6 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Build zip - name: Build zip
working-directory: plugins/woocommerce working-directory: plugins/woocommerce

View File

@ -24,9 +24,9 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: './.github/actions/setup-woocommerce-monorepo' - uses: './.github/actions/setup-woocommerce-monorepo'
name: 'Setup Monorepo'
with: with:
install: true php-version: false # We don't want to waste time installing PHP since we aren't using it in this job.
name: 'Setup Monorepo'
- uses: actions/github-script@v6 - uses: actions/github-script@v6
id: 'project-matrix' id: 'project-matrix'
name: 'Build Matrix' name: 'Build Matrix'
@ -46,7 +46,6 @@ jobs:
runs-on: 'ubuntu-20.04' runs-on: 'ubuntu-20.04'
needs: 'project-matrix' needs: 'project-matrix'
if: ${{ needs.project-matrix.outputs.matrix != '[]' }} if: ${{ needs.project-matrix.outputs.matrix != '[]' }}
timeout-minutes: 30
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@ -60,8 +59,8 @@ jobs:
id: 'setup-monorepo' id: 'setup-monorepo'
name: 'Setup Monorepo' name: 'Setup Monorepo'
with: with:
# install-filters: '${{ matrix.projectName }}...' install: '${{ matrix.projectName }}...'
build-filters: '${{ matrix.projectName }}' build: '${{ matrix.projectName }}'
- name: 'Lint' - name: 'Lint'
if: ${{ ! cancelled() && matrix.lintCommand && steps.setup-monorepo.conclusion == 'success' }} if: ${{ ! cancelled() && matrix.lintCommand && steps.setup-monorepo.conclusion == 'success' }}
run: 'pnpm --filter="${{ matrix.projectName }}" ${{ matrix.lintCommand }}' run: 'pnpm --filter="${{ matrix.projectName }}" ${{ matrix.lintCommand }}'
@ -84,16 +83,22 @@ jobs:
# results of the other jobs in the workflow. # results of the other jobs in the workflow.
name: 'Evaluate Project Matrix' name: 'Evaluate Project Matrix'
runs-on: 'ubuntu-20.04' runs-on: 'ubuntu-20.04'
needs: 'project-task-matrix' needs: [
'project-matrix',
'project-task-matrix'
]
if: ${{ always() }} if: ${{ always() }}
steps: steps:
- name: 'Check Matrix Success' - name: 'Check Matrix Success'
run: | run: |
result="${{ needs.project-matrix.result }}"
if [[ $result != "success" && $result != "skipped" ]]; then
echo "An error occurred generating the CI matrix."
exit 1
fi
result="${{ needs.project-task-matrix.result }}" result="${{ needs.project-task-matrix.result }}"
if [[ $result == "success" || $result == "skipped" ]]; then if [[ $result != "success" && $result != "skipped" ]]; then
echo "The matrix has completed successfully."
exit 0
else
echo "One or more jobs in the matrix has failed." echo "One or more jobs in the matrix has failed."
exit 1 exit 1
fi fi
echo "The matrix has completed successfully."

View File

@ -24,12 +24,15 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Load docker images and start containers with HPOS enabled. - name: Load docker images and start containers with HPOS enabled.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
env: env:
ENABLE_HPOS: 1 ENABLE_HPOS: 1
run: pnpm env:test:cot --filter=woocommerce run: pnpm --filter=@woocommerce/plugin-woocommerce env:test:cot
- name: Download and install Chromium browser. - name: Download and install Chromium browser.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
@ -80,12 +83,15 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Load docker images and start containers with HPOS enabled. - name: Load docker images and start containers with HPOS enabled.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
env: env:
ENABLE_HPOS: 1 ENABLE_HPOS: 1
run: pnpm env:test:cot --filter=woocommerce run: pnpm --filter=@woocommerce/plugin-woocommerce env:test:cot
- name: Run Playwright API tests. - name: Run Playwright API tests.
id: run_playwright_api_tests id: run_playwright_api_tests

View File

@ -18,8 +18,6 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Build zip - name: Build zip
working-directory: plugins/woocommerce working-directory: plugins/woocommerce

View File

@ -24,8 +24,6 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Build zip - name: Build zip
working-directory: plugins/woocommerce working-directory: plugins/woocommerce

View File

@ -23,10 +23,13 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Load docker images and start containers - name: Load docker images and start containers
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
run: pnpm env:test --filter=woocommerce run: pnpm --filter='@woocommerce/plugin-woocommerce' env:test
- name: Download and install Chromium browser. - name: Download and install Chromium browser.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
@ -78,10 +81,13 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Load docker images and start containers - name: Load docker images and start containers
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
run: pnpm env:test --filter=woocommerce run: pnpm --filter='@woocommerce/plugin-woocommerce' env:test
- name: Run Playwright API tests. - name: Run Playwright API tests.
id: run_playwright_api_tests id: run_playwright_api_tests

View File

@ -24,6 +24,9 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: true
build: './tools/package-release'
- name: Clean working directory - name: Clean working directory
run: git checkout pnpm-lock.yaml # in case for whatever reason the lockfile is out of sync, there won't be interference with npm publish. run: git checkout pnpm-lock.yaml # in case for whatever reason the lockfile is out of sync, there won't be interference with npm publish.

View File

@ -27,12 +27,15 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Load docker images and start containers. - name: Load docker images and start containers.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
env: env:
WP_ENV_PHP_VERSION: 7.4 WP_ENV_PHP_VERSION: 7.4
run: pnpm run env:test run: pnpm env:test
- name: Download and install Chromium browser. - name: Download and install Chromium browser.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
@ -94,12 +97,15 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Load docker images and start containers. - name: Load docker images and start containers.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
env: env:
ENABLE_HPOS: 0 ENABLE_HPOS: 0
run: pnpm env:test --filter=woocommerce run: pnpm --filter=@woocommerce/plugin-woocommerce env:test
- name: Run Playwright API tests. - name: Run Playwright API tests.
id: run_playwright_api_tests id: run_playwright_api_tests
@ -144,14 +150,17 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Load docker images and start containers. - name: Load docker images and start containers.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
env: env:
ENABLE_HPOS: 0 ENABLE_HPOS: 0
run: | run: |
pnpm env:dev --filter=woocommerce pnpm --filter=@woocommerce/plugin-woocommerce env:dev
pnpm env:performance-init --filter=woocommerce pnpm --filter=@woocommerce/plugin-woocommerce env:performance-init
- name: Install k6 - name: Install k6
run: | run: |

View File

@ -31,8 +31,6 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Prepare plugin zips - name: Prepare plugin zips
id: prepare id: prepare

View File

@ -28,8 +28,8 @@ jobs:
working-directory: tools/code-analyzer working-directory: tools/code-analyzer
run: | run: |
HEAD_REF=$(git rev-parse HEAD) HEAD_REF=$(git rev-parse HEAD)
version=$(pnpm run analyzer major-minor "$HEAD_REF" "plugins/woocommerce/woocommerce.php" | tail -n 1) version=$(pnpm analyzer major-minor "$HEAD_REF" "plugins/woocommerce/woocommerce.php" | tail -n 1)
pnpm run analyzer "$HEAD_REF" $version -o "github" pnpm analyzer "$HEAD_REF" $version -o "github"
- name: Check results - name: Check results
uses: actions/github-script@v6 uses: actions/github-script@v6
with: with:

View File

@ -24,8 +24,6 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Check change files are touched for touched projects - name: Check change files are touched for touched projects
env: env:
@ -34,4 +32,4 @@ jobs:
run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD" run: php tools/monorepo/check-changelogger-use.php --debug "$BASE" "$HEAD"
- name: Run changelog validation - name: Run changelog validation
run: pnpm run -r changelog validate run: pnpm -r changelog validate

View File

@ -26,6 +26,9 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Install Jest - name: Install Jest
run: pnpm install -g jest run: pnpm install -g jest

View File

@ -23,6 +23,9 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: true
build: './tools/package-release'
- name: Execute script - name: Execute script
run: ./tools/package-release/bin/dev prepare ${{ github.event.inputs.packages }} run: ./tools/package-release/bin/dev prepare ${{ github.event.inputs.packages }}

View File

@ -74,35 +74,35 @@ jobs:
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run utils code-freeze milestone -o ${{ github.repository_owner }} -m ${{ steps.get-versions.outputs.monthlyMilestone }} run: pnpm utils code-freeze milestone -o ${{ github.repository_owner }} -m ${{ steps.get-versions.outputs.monthlyMilestone }}
- name: Create next monthly release branch - name: Create next monthly release branch
id: branch id: branch
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }} run: pnpm utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }}
- name: Create next accelerated release branch - name: Create next accelerated release branch
id: branch-accel id: branch-accel
if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes' if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} run: pnpm utils code-freeze branch -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }}
- name: Bump versions for Beta.1 monthly release - name: Bump versions for Beta.1 monthly release
id: version-bump id: version-bump
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }} -c ${{ steps.get-versions.outputs.monthlyVersion }}-beta.1 run: pnpm utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.monthlyBranch }} -c ${{ steps.get-versions.outputs.monthlyVersion }}-beta.1
- name: Bump versions for accelerated release - name: Bump versions for accelerated release
id: version-bump-accel id: version-bump-accel
if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes' if: steps.get-versions.outputs.isTodayAcceleratedFreeze == 'yes'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} -c ${{ steps.get-versions.outputs.acceleratedVersion }} -af run: pnpm utils code-freeze version-bump -o ${{ github.repository_owner }} -b ${{ steps.get-versions.outputs.acceleratedBranch }} -c ${{ steps.get-versions.outputs.acceleratedVersion }} -af
- name: Prep accelerated release - name: Prep accelerated release
id: accel-release-prep id: accel-release-prep
@ -116,14 +116,14 @@ jobs:
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run utils code-freeze version-bump ${{ steps.get-versions.outputs.monthlyMilestone }}-dev -o ${{ github.repository_owner }} run: pnpm utils code-freeze version-bump ${{ steps.get-versions.outputs.monthlyMilestone }}-dev -o ${{ github.repository_owner }}
- name: Generate changelog changes - name: Generate changelog changes
id: changelog id: changelog
if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes' if: steps.get-versions.outputs.isTodayMonthlyFreeze == 'yes'
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm run utils code-freeze changelog -c -o ${{ github.repository_owner }} -v ${{ steps.get-versions.outputs.monthlyVersionXY }} run: pnpm utils code-freeze changelog -c -o ${{ github.repository_owner }} -v ${{ steps.get-versions.outputs.monthlyVersionXY }}
notify-slack: notify-slack:
@ -182,8 +182,6 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Build zip - name: Build zip
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
@ -212,8 +210,6 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
build: false
- name: Build zip - name: Build zip
working-directory: plugins/woocommerce working-directory: plugins/woocommerce

View File

@ -19,6 +19,8 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce-beta-tester'
- name: Lint - name: Lint
working-directory: plugins/woocommerce-beta-tester working-directory: plugins/woocommerce-beta-tester

View File

@ -32,6 +32,9 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Setup local test environment - name: Setup local test environment
uses: ./.github/actions/tests/setup-local-test-environment uses: ./.github/actions/tests/setup-local-test-environment
@ -89,6 +92,9 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with:
install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Setup local test environment - name: Setup local test environment
uses: ./.github/actions/tests/setup-local-test-environment uses: ./.github/actions/tests/setup-local-test-environment
@ -141,8 +147,8 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
install-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: false build: '@woocommerce/plugin-woocommerce'
- name: Update performance test site with E2E test - name: Update performance test site with E2E test
id: update-perf-site id: update-perf-site
@ -218,7 +224,8 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
build-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Setup local test environment - name: Setup local test environment
uses: ./.github/actions/tests/setup-local-test-environment uses: ./.github/actions/tests/setup-local-test-environment

View File

@ -28,7 +28,8 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
build-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Setup local test environment - name: Setup local test environment
uses: ./.github/actions/tests/setup-local-test-environment uses: ./.github/actions/tests/setup-local-test-environment
@ -89,7 +90,8 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
build-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Setup local test environment - name: Setup local test environment
uses: ./.github/actions/tests/setup-local-test-environment uses: ./.github/actions/tests/setup-local-test-environment

View File

@ -54,8 +54,7 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
install-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: false
- name: Run E2E tests - name: Run E2E tests
id: run-e2e-composite-action id: run-e2e-composite-action
@ -130,8 +129,7 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
install-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: false
- name: Download and install Chromium browser. - name: Download and install Chromium browser.
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
@ -204,8 +202,7 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
install-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: false
- name: Run E2E tests - name: Run E2E tests
id: run-e2e-composite-action id: run-e2e-composite-action
@ -320,11 +317,12 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
build-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Launch WP Env - name: Launch WP Env
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
run: pnpm run env:test run: pnpm env:test
env: env:
WP_ENV_CORE: WordPress/WordPress#${{ steps.get-wp-latest-1.outputs.version }} WP_ENV_CORE: WordPress/WordPress#${{ steps.get-wp-latest-1.outputs.version }}
@ -462,13 +460,14 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
build-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Launch WP Env - name: Launch WP Env
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
env: env:
WP_ENV_PHP_VERSION: ${{ matrix.php_version }} WP_ENV_PHP_VERSION: ${{ matrix.php_version }}
run: pnpm run env:test run: pnpm env:test
- name: Verify PHP version - name: Verify PHP version
working-directory: .github/workflows/scripts working-directory: .github/workflows/scripts
@ -626,11 +625,12 @@ jobs:
- name: Setup WooCommerce Monorepo - name: Setup WooCommerce Monorepo
uses: ./.github/actions/setup-woocommerce-monorepo uses: ./.github/actions/setup-woocommerce-monorepo
with: with:
build-filters: woocommerce install: '@woocommerce/plugin-woocommerce...'
build: '@woocommerce/plugin-woocommerce'
- name: Launch WP Env - name: Launch WP Env
working-directory: plugins/woocommerce working-directory: plugins/woocommerce
run: pnpm run env:test run: pnpm env:test
- name: Download release zip - name: Download release zip
id: download-zip id: download-zip

View File

@ -33,5 +33,5 @@ jobs:
- name: 'Explain Remedy' - name: 'Explain Remedy'
if: failure() if: failure()
run: | run: |
echo "Dependency version mismatch detected. This can usually be fixed automatically by updating the pinned version in \`.syncpackrc\` and then running: \`pnpm run sync-dependencies\`" echo "Dependency version mismatch detected. This can usually be fixed automatically by updating the pinned version in \`.syncpackrc\` and then running: \`pnpm sync-dependencies\`"
exit 1 exit 1

4
.gitignore vendored
View File

@ -44,6 +44,7 @@ build-style/
build-style.js build-style.js
build-types/ build-types/
dist/ dist/
oclif.manifest.json
# Project files # Project files
node_modules/ node_modules/
@ -94,8 +95,9 @@ allure-results
changes.json changes.json
.env .env
# Turborepo # Build Cache
.turbo .turbo
.wireit
# Support .gitkeep Files # Support .gitkeep Files
!.gitkeep !.gitkeep

256
.pnpmfile.cjs Normal file
View File

@ -0,0 +1,256 @@
/**
* External dependencies.
*/
const fs = require( 'fs' );
const path = require( 'path' );
// A cache for package files so that we don't keep loading them unnecessarily.
const packageFileCache = {};
/**
* Loads a package file or pull it from the cache.
*
* @param {string} packagePath The path to the package directory.
*
* @return {Object} The package file.
*/
function loadPackageFile( packagePath ) {
// Resolve the absolute path for consistency when loading and updating.
packagePath = path.resolve( __dirname, packagePath );
if ( packageFileCache[ packagePath ] ) {
return packageFileCache[ packagePath ];
}
const packageFile = JSON.parse(
fs.readFileSync( path.join( packagePath, 'package.json' ), 'utf8' )
);
packageFileCache[ packagePath ] = packageFile;
return packageFile;
}
/**
* Updates a package file on disk and in the cache.
*
* @param {string} packagePath The path to the package file to update.
* @param {Object} packageFile The new package file contents.
*/
function updatePackageFile( packagePath, packageFile ) {
// Resolve the absolute path for consistency when loading and updating.
packagePath = path.resolve( __dirname, packagePath );
packageFileCache[ packagePath ] = packageFile;
fs.writeFileSync(
path.join( packagePath, 'package.json' ),
// Make sure to keep the newline at the end of the file.
JSON.stringify( packageFile, null, '\t' ) + "\n",
'utf8'
);
}
/**
* Gets the outputs for a given package.
*
* @param {string} packageFile The package file to read file outputs from.
*
* @return {Object.<string, Array.<string>} The include and exclude globs describing the package's files.
*/
function getPackageOutputs( packageFile ) {
// All of the outputs should be relative to the package's path instead of the monorepo root.
// This is how wireit expects the files to be configured.
const basePath = path.join( 'node_modules', packageFile.name );
// We're going to construct the package outputs according to the same rules that NPM follows when packaging.
// Note: In order to work with wireit optimally we need to put the excludes at the very end of the list.
const packageOutputs = {
include: [],
exclude: [],
};
// Packages that explicitly declare their outputs have made this easy for us.
if ( packageFile.files ) {
// We're going to make the glob relative to the package directory instead of the dependency directory.
// To do this though, we need to transform the path a little bit.
for ( const fileGlob of packageFile.files ) {
let relativeGlob = fileGlob;
// Negation globs need to move the exclamation point to the beginning of the output glob.
let negation = relativeGlob.startsWith( '!' ) ? true : false;
if ( negation ) {
relativeGlob = relativeGlob.substring( 1 );
}
// Remove leading slashes.
if ( relativeGlob.startsWith( '/' ) ) {
relativeGlob = relativeGlob.substring( 1 );
}
// Now we can construct a glob relative to the package directory.
if ( negation ) {
packageOutputs.exclude.push( `!${ basePath }/${ relativeGlob }` );
} else {
packageOutputs.include.push( `${ basePath }/${ relativeGlob }` );
}
}
} else {
// This is a VERY heavy-handed approach and will simply include every file in the package directory.
packageOutputs.include.push( `${ basePath }/` );
// We can make this a little bit smarter by ignoring some common directories.
packageOutputs.exclude.push( `!${ basePath }/node_modules` );
packageOutputs.exclude.push( `!${ basePath }/.git` );
packageOutputs.exclude.push( `!${ basePath }/.svn` );
packageOutputs.exclude.push( `!${ basePath }/src` ); // We generally name our source directories "src" and don't need source files.
}
return packageOutputs;
}
/**
* Checks to see if a package is linked and returns the path if it is.
*
* @param {string} packagePath The path to the package we're checking.
* @param {string} lockVersion The package version from the lock file.
*
* @return {string|false} Returns the linked package path or false if the package is not linked.
*/
function isLinkedPackage( packagePath, lockVersion ) {
// We can parse the version that PNPM stores in order to get the relative path to the package.
// file: dependencies use a relative path with dependencies listed in parentheses after it.
// workspace: dependencies just store the relative path from the package itself.
const match = lockVersion.match( /^(?:file:|link:)((?:\.?\/|\.\.\/)[^\^<>:"|?*()]+)/i );
if ( ! match ) {
return false;
}
let relativePath = match[ 1 ];
// Linked paths are relative to the package instead of the monorepo.
if ( lockVersion.startsWith( 'link:' ) ) {
relativePath = path.join( packagePath, relativePath );
}
return relativePath;
}
/**
* Gets the paths to any packages linked in the lock file.
*
* @param {string} packagePath The path to the package to check.
* @param {Object} lockPackage The package information from the lock file.
*
* @return {Array.<Object>} The linked package file keyed by the relative path to the package.
*/
function getLinkedPackages( packagePath, lockPackage ) {
// Include both the dependencies and devDependencies in the list of packages to check.
const possiblePackages = Object.assign(
{},
lockPackage.dependencies || {},
lockPackage.devDependencies || {}
);
// We need to check all of the possible packages and figure out whether or not they're linked.
const linkedPackages = {};
for ( const packageName in possiblePackages ) {
const linkedPackagePath = isLinkedPackage(
packagePath,
possiblePackages[ packageName ],
);
if ( ! linkedPackagePath ) {
continue;
}
// Load the linked package file and mark it as a dependency.
linkedPackages[ linkedPackagePath ] =
loadPackageFile( linkedPackagePath );
}
return Object.values( linkedPackages );
}
/**
* Hooks up all of the dependency outputs as file dependencies for wireit to fingerprint them.
*
* @param {Object.<string, Object>} lockPackages The paths to all of the packages we're processing.
* @param {Object} context The hook context object.
* @param {Function.<string>} context.log Logs a message to the console.
*/
function updateWireitDependencies( lockPackages, context ) {
context.log( '[wireit] Updating Dependency Lists' );
// Rather than using wireit for task orchestration we are going to rely on PNPM in order to provide a more consistent developer experience.
// In order to achieve this, however, we need to make sure that all of the dependencies are included in the fingerprint. If we don't, then
// changes in dependency packages won't invalidate the cache and downstream packages won't be rebuilt unless they themselves change. This
// is problematic because it means that we can't rely on the cache to be up to date and we'll have to rebuild everything every time.
for ( const packagePath in lockPackages ) {
const packageFile = loadPackageFile( packagePath );
// We only care about packages using wireit.
if ( ! packageFile.wireit ) {
continue;
}
context.log( `[wireit][${ packageFile.name }] Updating Configuration` );
// Only the packages that are linked need to be considered. The packages installed from the
// registry are already included in the fingerprint by their very nature. If they are
// changed then the lock file will be updated and the fingerprint will change too.
const linkedPackages = getLinkedPackages(
packagePath,
lockPackages[ packagePath ],
);
// In order to make maintaining the list easy we use a wireit-only script named "dependencies" to keep the list up to date.
// This is an automatically generated script and that we own and so we should make sure it's always as-expected.
packageFile.wireit.dependencyOutputs = {
// This is needed so we can reference files in `node_modules`.
allowUsuallyExcludedPaths: true,
// The files list will include globs for dependency files that we should fingerprint.
files: [ "package.json" ],
};
// We're going to spin through all of the dependencies for the package and add
// their outputs to the list. We can then use these are file dependencies for
// wireit and it will fingerprint them for us.
for ( const linkedPackage of linkedPackages ) {
const packageOutputs = getPackageOutputs( linkedPackage );
// Put includes at the front and excludes at the end. This is important because otherwise
// wireit will blow the call stack due to the way it handles negation globs.
packageFile.wireit.dependencyOutputs.files.unshift( ...packageOutputs.include );
packageFile.wireit.dependencyOutputs.files.push( ...packageOutputs.exclude );
context.log(
`[wireit][${ packageFile.name }] Added '${ linkedPackage.name }' Outputs`
);
}
updatePackageFile( packagePath, packageFile );
}
context.log( '[wireit] Done' );
}
/**
* This hook allows for the mutation of the lockfile before it is serialized.
*
* @param {Object} lockfile The lock file that was produced by PNPM.
* @param {string} lockfile.lockfileVersion The version of the lock file spec.
* @param {Object.<string, Object>} lockfile.importers The packages in the workspace that are included in the lock file, keyed by the relative path to the package.
* @param {Object} context The hook context object.
* @param {Function.<string>} context.log Logs a message to the console.
*
* @return {Object} lockfile The updated lockfile.
*/
function afterAllResolved( lockfile, context ) {
updateWireitDependencies( lockfile.importers, context );
return lockfile;
}
// Note: The hook function names are important. They are used by PNPM when determining what functions to call.
module.exports = {
hooks: {
afterAllResolved,
},
};

View File

@ -116,7 +116,7 @@
"packages": [ "packages": [
"@woocommerce/block-templates", "@woocommerce/block-templates",
"@woocommerce/product-editor", "@woocommerce/product-editor",
"woocommerce/client/admin", "@woocommerce/admin-library",
"@woocommerce/components" "@woocommerce/components"
], ],
"isIgnored": true "isIgnored": true
@ -224,6 +224,15 @@
], ],
"pinVersion": "~29.1.1" "pinVersion": "~29.1.1"
}, },
{
"dependencies": [
"wireit"
],
"packages": [
"**"
],
"pinVersion": "^0.14.1"
},
{ {
"label": "Only manage versions for these dependencies", "label": "Only manage versions for these dependencies",
"dependencies": [ "dependencies": [

View File

@ -6,70 +6,47 @@ This document aims to provide as much context as possible to aid in the developm
Please refer to [the Getting Started section of the `README.md`](README.md#getting-started) for a general-purpose guide on getting started. The rest of this document will assume that you've installed all of the prequisites and setup described there. Please refer to [the Getting Started section of the `README.md`](README.md#getting-started) for a general-purpose guide on getting started. The rest of this document will assume that you've installed all of the prequisites and setup described there.
## Turborepo Commands
Our repository uses [Turborepo](https://turborepo.org) for `build` and `test` commands. This tool ensures that all dependencies of a plugin, package, or tool are prepared before running a command. This is done transparently when running these commands. When using `pnpm run {command}` without any options, it will execute that command against every project in the repository. You can view a list of the commands Turborepo supports in [our turbo.json file](turbo.json).
### Plugin, Package, and Tool Filtering ### Plugin, Package, and Tool Filtering
If you are interested in running a `turbo` command against a single plugin, package, or tool, you can do so with the `--filter` flag. This flag supports the `"name"` option in `package.json` files, paths, and globs. In order to run commands on individual projects you will need to utilize [PNPM's --filter flag](https://pnpm.io/filtering). This flag supports `"name"` option in `package.json`, paths, and globs.
If you would like to read more about the syntax, please check out [the Turborepo filtering documentation](https://turborepo.org/docs/core-concepts/filtering).
### Examples ### Examples
Here are some examples of the ways you can use Turborepo / pnpm commands: Here are some examples of the ways you can use `pnpm` commands:
```bash ```bash
# Lint and build all plugins, packages, and tools. Note the use of `-r` for lint, # Lint and build all plugins, packages, and tools.
# turbo does not run the lint at this time. pnpm lint && pnpm build
pnpm run -r lint && pnpm run build
# Build WooCommerce Core and all of its dependencies # Build WooCommerce Core and all of its dependencies
pnpm run --filter='woocommerce' build pnpm --filter='@woocommerce/plugin-woocommerce' build
# Lint the @woocommerce/components package - note the different argument order, turbo scripts # Lint the @woocommerce/components package
# are not running lints at this point in time. pnpm --filter='@woocommerce/components' lint
pnpm run -r --filter='@woocommerce/components' lint
# Test all of the @woocommerce scoped packages # Test all of the @woocommerce scoped packages
pnpm run --filter='@woocommerce/*' test pnpm --filter='@woocommerce/*' test
# Build all of the JavaScript packages # Build all of the JavaScript packages
pnpm run --filter='./packages/js/*' build pnpm --filter='./packages/js/*' build
# Build everything except WooCommerce Core # Build everything except WooCommerce Core
pnpm run --filter='!woocommerce' build pnpm --filter='!@woocommerce/plugin-woocommerce' build
# Build everything that has changed since the last commit # Build everything that has changed since the last commit
pnpm run --filter='[HEAD^1]' build pnpm --filter='[HEAD^1]' build
``` ```
### Cache busting Turbo
In the event that you need to force turbo not to cache a command you can set the env variable `TURBO_FORCE=true`.
e.g.
```bash
# Force an uncached build of WooCommerce Core and all of its dependencies
TURBO_FORCE=true pnpm run --filter='woocommerce' build
```
## Other Commands
Outside of the commands in [our turbo.json file](turbo.json), each plugin, package, and tool may have unique scripts in their `package.json` files. In these cases, you can execute those commands using `pnpm {script}` and the same `--filter` syntax as Turborepo.
### Examples ### Examples
Here are some examples of the commands you will make use of. Here are some examples of the commands you will make use of.
```bash ```bash
# Add a changelog entry for WooCommerce Core # Add a changelog entry for WooCommerce Core
pnpm --filter=woocommerce run changelog add pnpm --filter='@woocommerce/plugin-woocommerce' changelog add
# Create the woocommerce.zip file # Create the woocommerce.zip file
pnpm --filter=woocommerce run build:zip pnpm --filter='@woocommerce/plugin-woocommerce' build:zip
``` ```
## Plugin Development Environments ## Plugin Development Environments

View File

@ -25,10 +25,10 @@ nvm use
# Install the PHP and Composer dependencies for all of the plugins, packages, and tools # Install the PHP and Composer dependencies for all of the plugins, packages, and tools
pnpm install pnpm install
# Build all of the plugins, packages, and tools in the monorepo # Build all of the plugins, packages, and tools in the monorepo
pnpm run build pnpm build
``` ```
At this point you are now ready to begin developing and testing. All of the build outputs are cached running `pnpm run build` again will only build the plugins, packages, and tools that have changed since the last time you ran the command. At this point you are now ready to begin developing and testing. All of the build outputs are cached running `pnpm build` again will only build the plugins, packages, and tools that have changed since the last time you ran the command.
Check out [our development guide](DEVELOPMENT.md) if you would like a more comprehensive look at working in our repository. Check out [our development guide](DEVELOPMENT.md) if you would like a more comprehensive look at working in our repository.

View File

@ -27,7 +27,7 @@ pnpm exec syncpack -- list-mismatches
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "You must sync the dependencies listed above before you can push this branch." echo "You must sync the dependencies listed above before you can push this branch."
echo "This can usually be accomplished automatically by updating the pinned version in \`.syncpackrc\` and then running \`pnpm run sync-dependencies\`." echo "This can usually be accomplished automatically by updating the pinned version in \`.syncpackrc\` and then running \`pnpm sync-dependencies\`."
exit 1 exit 1
fi fi

View File

@ -7,7 +7,7 @@ post_title: Minification of SCSS and JS
When updating SCSS files in the WooCommerce project, please **commit only your changes to unminified SCSS files**. The minification will be handled as part of the release process. When updating SCSS files in the WooCommerce project, please **commit only your changes to unminified SCSS files**. The minification will be handled as part of the release process.
To get the minified CSS files, run `pnpm -- turbo run build --filter='woocommerce-legacy-assets'` from the repository root directory. To set up the development environment from scratch, see the section on [how to install dependencies and generate assets](https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment#install-dependencies-and-generate-assets) in the guide to set up a WooCommerce development environment. To get the minified CSS files, run `pnpm --filter='@woocommerce/shortcode-assets' build` from the repository root directory. To set up the development environment from scratch, see the section on [how to install dependencies and generate assets](https://github.com/woocommerce/woocommerce/wiki/How-to-set-up-WooCommerce-development-environment#install-dependencies-and-generate-assets) in the guide to set up a WooCommerce development environment.
## Javascript ## Javascript

View File

@ -99,7 +99,7 @@ pnpm install && composer install
### Build WooCommerce ### Build WooCommerce
```sh ```sh
pnpm run build pnpm build
``` ```
Running this script will compile the JavaScript and CSS that WooCommerce needs to operate. If you try to run WooCommerce on your server without generating the compiled assets, you may experience errors and other unwanted side-effects. Running this script will compile the JavaScript and CSS that WooCommerce needs to operate. If you try to run WooCommerce on your server without generating the compiled assets, you may experience errors and other unwanted side-effects.

View File

@ -1,40 +1,43 @@
{ {
"name": "woocommerce-monorepo", "name": "woocommerce-monorepo",
"title": "WooCommerce Monorepo", "private": true,
"description": "Monorepo for the WooCommerce ecosystem", "description": "Monorepo for the WooCommerce ecosystem",
"homepage": "https://woo.com/", "homepage": "https://woo.com/",
"engines": { "bugs": {
"node": "^16.14.1", "url": "https://github.com/woocommerce/woocommerce/issues"
"pnpm": "^8.6.7"
}, },
"private": true,
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"author": "Automattic",
"license": "GPL-3.0-or-later", "license": "GPL-3.0-or-later",
"bugs": { "author": "Automattic",
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"bin": { "bin": {
"utils": "./tools/monorepo-utils/bin/run" "utils": "./tools/monorepo-utils/bin/run"
}, },
"scripts": { "scripts": {
"build": "pnpm exec turbo run turbo:build", "build": "pnpm -r build",
"test": "pnpm exec turbo run turbo:test", "cherry-pick": "node ./tools/cherry-pick/bin/run",
"clean": "pnpm store prune && git clean -fx **/node_modules && pnpm i", "clean": "pnpm store prune && git clean -fx **/node_modules && pnpm i",
"create-extension": "node ./tools/create-extension/index.js",
"git:update-hooks": "if test -d .git; then rm -r .git/hooks && mkdir -p .git/hooks && husky install; else husky install; fi",
"preinstall": "npx only-allow pnpm", "preinstall": "npx only-allow pnpm",
"postinstall": "pnpm git:update-hooks", "postinstall": "pnpm git:update-hooks",
"git:update-hooks": "if test -d .git; then rm -r .git/hooks && mkdir -p .git/hooks && husky install; else husky install; fi", "lint": "pnpm -r lint",
"create-extension": "node ./tools/create-extension/index.js",
"cherry-pick": "node ./tools/cherry-pick/bin/run",
"sync-dependencies": "pnpm exec syncpack -- fix-mismatches", "sync-dependencies": "pnpm exec syncpack -- fix-mismatches",
"test": "pnpm -r test",
"utils": "node ./tools/monorepo-utils/dist/index.js" "utils": "node ./tools/monorepo-utils/dist/index.js"
}, },
"dependencies": {
"@babel/core": "7.12.9",
"@wordpress/babel-plugin-import-jsx-pragma": "^3.2.0",
"@wordpress/babel-preset-default": "^6.17.0",
"lodash": "^4.17.21",
"wp-textdomain": "1.0.1"
},
"devDependencies": { "devDependencies": {
"@babel/preset-env": "^7.20.2", "@babel/preset-env": "^7.23.3",
"@babel/runtime": "^7.21.0", "@babel/runtime": "^7.23.4",
"@types/node": "^16.18.18", "@types/node": "^16.18.18",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@wordpress/data": "wp-6.0", "@wordpress/data": "wp-6.0",
@ -43,8 +46,8 @@
"babel-loader": "^8.3.0", "babel-loader": "^8.3.0",
"chalk": "^4.1.2", "chalk": "^4.1.2",
"copy-webpack-plugin": "^10.2.4", "copy-webpack-plugin": "^10.2.4",
"core-js": "^3.29.1", "core-js": "^3.33.3",
"css-loader": "^6.7.3", "css-loader": "^6.8.1",
"glob": "^7.2.3", "glob": "^7.2.3",
"husky": "^7.0.4", "husky": "^7.0.4",
"jest": "~27.5.1", "jest": "~27.5.1",
@ -56,20 +59,16 @@
"prettier": "npm:wp-prettier@^2.8.5", "prettier": "npm:wp-prettier@^2.8.5",
"regenerator-runtime": "^0.13.11", "regenerator-runtime": "^0.13.11",
"request": "^2.88.2", "request": "^2.88.2",
"sass": "^1.59.3", "sass": "^1.69.5",
"sass-loader": "^10.4.1", "sass-loader": "^10.4.1",
"syncpack": "^10.7.3", "syncpack": "^10.9.3",
"turbo": "^1.10.7",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"url-loader": "^1.1.2", "url-loader": "^1.1.2",
"webpack": "^5.76.2" "webpack": "^5.89.0"
}, },
"dependencies": { "engines": {
"@babel/core": "7.12.9", "node": "^16.14.1",
"@wordpress/babel-plugin-import-jsx-pragma": "^3.2.0", "pnpm": "^8.6.7"
"@wordpress/babel-preset-default": "^6.17.0",
"lodash": "^4.17.21",
"wp-textdomain": "1.0.1"
}, },
"pnpm": { "pnpm": {
"overrides": { "overrides": {
@ -77,5 +76,6 @@
"react": "^17.0.2", "react": "^17.0.2",
"react-resize-aware": "3.1.1" "react-resize-aware": "3.1.1"
} }
} },
"title": "WooCommerce Monorepo"
} }

View File

@ -60,8 +60,7 @@ To create a new package, add a new folder to `/packages`, containing…
- Package description - Package description
- Installation details - Installation details
- Usage example - Usage example
4. A `src` directory for the source of your module, which will be built by default using the `pnpm run turbo:build` command. Note that you'll want an `index.js` file that exports the package contents, see other packages for examples. 4. A `src` directory for the source of your module. Note that you'll want an `index.js` file that exports the package contents, see other packages for examples.
5. A blank Changelog file, `changelog.md`. 5. A blank Changelog file, `changelog.md`.
``` ```

View File

@ -1,22 +1,19 @@
{ {
"name": "@woocommerce/admin-e2e-tests", "name": "@woocommerce/admin-e2e-tests",
"version": "1.0.0", "version": "1.0.0",
"author": "Automattic",
"description": "E2E tests for the new WooCommerce interface.", "description": "E2E tests for the new WooCommerce interface.",
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-e2e-tests/README.md",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce.git"
},
"keywords": [ "keywords": [
"woocommerce", "woocommerce",
"e2e" "e2e"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-e2e-tests/README.md",
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce.git"
},
"license": "GPL-3.0+", "license": "GPL-3.0+",
"author": "Automattic",
"sideEffects": false,
"main": "build/index.js", "main": "build/index.js",
"types": "build/index.d.ts", "types": "build/index.d.ts",
"files": [ "files": [
@ -24,18 +21,29 @@
"!*.ts.map", "!*.ts.map",
"!*.tsbuildinfo" "!*.tsbuildinfo"
], ],
"sideEffects": false, "scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:typescript": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix:lang:js"
]
},
"dependencies": { "dependencies": {
"@jest/globals": "^27.5.1", "@jest/globals": "^27.5.1",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@woocommerce/e2e-utils": "workspace:*", "@woocommerce/e2e-utils": "workspace:*",
"config": "3.3.7" "config": "3.3.7"
}, },
"peerDependencies": {
"@woocommerce/e2e-environment": "^0.2.3 || ^0.3.0",
"@woocommerce/e2e-utils": "^0.2.0",
"puppeteer": "^2.0.0"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@types/config": "0.0.41", "@types/config": "0.0.41",
@ -50,25 +58,54 @@
"jest-mock-extended": "^1.0.18", "jest-mock-extended": "^1.0.18",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
},
"peerDependencies": {
"@woocommerce/e2e-environment": "^0.2.3 || ^0.3.0",
"@woocommerce/e2e-utils": "^0.2.0",
"puppeteer": "^2.0.0"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"scripts": { "wireit": {
"turbo:build": "tsc --project tsconfig.json", "build:project:typescript": {
"prepare": "composer install", "command": "tsc --project tsconfig.json",
"changelog": "composer exec -- changelogger", "files": [
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "tsconfig.json",
"lint": "eslint src", "src/**/*.{js,jsx,ts,tsx}",
"start": "tsc --project tsconfig.json --watch", "typings/**/*.ts"
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", ],
"lint:fix": "eslint src --fix", "output": [
"prepack": "pnpm run clean && pnpm run build" "build"
],
"dependencies": [
"dependencyOutputs"
]
}, },
"lint-staged": { "dependencyOutputs": {
"*.(t|j)s?(x)": [ "allowUsuallyExcludedPaths": true,
"pnpm lint:fix" "files": [
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/e2e-environment/",
"node_modules/@woocommerce/e2e-utils/",
"package.json",
"!node_modules/@woocommerce/e2e-utils/node_modules",
"!node_modules/@woocommerce/e2e-utils/.git",
"!node_modules/@woocommerce/e2e-utils/.svn",
"!node_modules/@woocommerce/e2e-utils/src",
"!node_modules/@woocommerce/e2e-environment/node_modules",
"!node_modules/@woocommerce/e2e-environment/.git",
"!node_modules/@woocommerce/e2e-environment/.svn",
"!node_modules/@woocommerce/e2e-environment/src"
] ]
} }
} }
}

View File

@ -2,43 +2,46 @@
"name": "@woocommerce/admin-layout", "name": "@woocommerce/admin-layout",
"version": "1.0.0", "version": "1.0.0",
"description": "WooCommerce admin layout copmonents and utilities.", "description": "WooCommerce admin layout copmonents and utilities.",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce" "woocommerce"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-layout/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/admin-layout/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js",
"module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index",
"sideEffects": [ "sideEffects": [
"build-style/**", "build-style/**",
"src/**/*.scss" "src/**/*.scss"
], ],
"publishConfig": { "main": "build/index.js",
"access": "public" "module": "build-module/index.js",
}, "react-native": "src/index",
"types": "build-types",
"scripts": { "scripts": {
"turbo:build": "pnpm run build:js && pnpm run build:css", "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"prepare": "composer install", "build:project": "pnpm --if-present /^build:project:.*$/",
"changelog": "composer exec -- changelogger", "build:project:bundle": "wireit",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build:project:cjs": "wireit",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "build:project:esm": "wireit",
"lint": "eslint src", "changelog": "composer install && composer exec -- changelogger",
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "lint": "pnpm --if-present '/^lint:lang:.*$/'",
"build:css": "webpack", "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"", "lint:fix:lang:js": "eslint src --fix",
"prepack": "pnpm run clean && pnpm run build", "lint:lang:js": "eslint src",
"lint:fix": "eslint src --fix" "prepack": "pnpm build",
"watch:build": "pnpm build:project --watch"
},
"dependencies": {
"@woocommerce/components": "workspace:*",
"@wordpress/components": "wp-6.0",
"@wordpress/element": "wp-6.0"
}, },
"devDependencies": { "devDependencies": {
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
@ -59,16 +62,78 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
"wireit": "^0.14.1"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
}, },
"dependencies": { "publishConfig": {
"@woocommerce/components": "workspace:*", "access": "public"
"@wordpress/components": "wp-6.0", },
"@wordpress/element": "wp-6.0" "wireit": {
"build:project:bundle": {
"command": "webpack",
"files": [
"webpack.config.js",
"src/**/*.scss"
],
"output": [
"build-style"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/components/",
"package.json",
"!node_modules/@woocommerce/components/node_modules",
"!node_modules/@woocommerce/components/.git",
"!node_modules/@woocommerce/components/.svn",
"!node_modules/@woocommerce/components/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src"
]
}
} }
} }

View File

@ -1,30 +1,45 @@
{ {
"name": "@woocommerce/ai", "name": "@woocommerce/ai",
"version": "0.1.0-beta.0", "version": "0.1.0-beta.0",
"private": true,
"description": "Utilities for usage in AI features across WooCommerce.", "description": "Utilities for usage in AI features across WooCommerce.",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce" "woocommerce"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/ai/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/ai/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js",
"module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index",
"sideEffects": [ "sideEffects": [
"build-style/**", "build-style/**",
"src/**/*.scss" "src/**/*.scss"
], ],
"private": true, "main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"dependencies": { "dependencies": {
"@wordpress/api-fetch": "wp-6.0", "@wordpress/api-fetch": "wp-6.0",
"@wordpress/compose": "wp-6.0", "@wordpress/compose": "wp-6.0",
@ -69,28 +84,82 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
}, "wireit": "^0.14.1"
"scripts": {
"turbo:build": "pnpm run build:js && pnpm run build:css",
"turbo:test": "jest --config ./jest.config.json --passWithNoTests",
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name --",
"lint": "eslint src",
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@wordpress/data": "wp-6.0", "@wordpress/data": "wp-6.0",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
},
"wireit": {
"build:project:bundle": {
"command": "webpack",
"files": [
"webpack.config.js",
"src/**/*.scss"
],
"output": [
"build-style"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src"
]
}
} }
} }

View File

@ -2,29 +2,33 @@
"name": "@woocommerce/api-core-tests", "name": "@woocommerce/api-core-tests",
"version": "1.0.0", "version": "1.0.0",
"description": "API tests for WooCommerce", "description": "API tests for WooCommerce",
"main": "index.js", "homepage": "https://github.com/woocommerce/woocommerce#readme",
"engines": { "bugs": {
"node": "^16.14.1", "url": "https://github.com/woocommerce/woocommerce/issues"
"pnpm": "^8.6.7"
},
"scripts": {
"e2e": "jest",
"e2e:api": "jest --group=api",
"e2e:hello": "jest --group=hello",
"make:collection": "node utils/api-collection/build-collection.js",
"report": "allure generate --clean && allure serve",
"lint": "eslint data endpoints tests utils --ext=js,ts,tsx",
"lint:fix": "eslint data endpoints tests utils --ext=js,ts,tsx --fix"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/woocommerce/woocommerce.git" "url": "git+https://github.com/woocommerce/woocommerce.git"
}, },
"license": "GPL-3.0+", "license": "GPL-3.0+",
"bugs": { "main": "index.js",
"url": "https://github.com/woocommerce/woocommerce/issues" "bin": {
"wc-api-tests": "bin/wc-api-tests.sh"
},
"scripts": {
"e2e": "jest",
"e2e:api": "jest --group=api",
"e2e:hello": "jest --group=hello",
"lint": "eslint data endpoints tests utils --ext=js,ts,tsx",
"lint:fix": "eslint data endpoints tests utils --ext=js,ts,tsx --fix",
"make:collection": "node utils/api-collection/build-collection.js",
"report": "allure generate --clean && allure serve"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
]
}, },
"homepage": "https://github.com/woocommerce/woocommerce#readme",
"dependencies": { "dependencies": {
"allure-commandline": "^2.17.2", "allure-commandline": "^2.17.2",
"dotenv": "^10.0.0", "dotenv": "^10.0.0",
@ -36,17 +40,14 @@
}, },
"devDependencies": { "devDependencies": {
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0" "eslint": "^8.32.0",
"wireit": "^0.14.1"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
},
"bin": {
"wc-api-tests": "bin/wc-api-tests.sh"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
]
} }
} }

View File

@ -1,22 +1,19 @@
{ {
"name": "@woocommerce/api", "name": "@woocommerce/api",
"version": "0.3.0", "version": "0.3.0",
"author": "Automattic",
"description": "A simple interface for interacting with a WooCommerce installation.", "description": "A simple interface for interacting with a WooCommerce installation.",
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/api/README.md",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce.git"
},
"keywords": [ "keywords": [
"woocommerce", "woocommerce",
"e2e" "e2e"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/api/README.md",
"repository": {
"type": "git",
"url": "https://github.com/woocommerce/woocommerce.git"
},
"license": "GPL-3.0+", "license": "GPL-3.0+",
"author": "Automattic",
"sideEffects": false,
"main": "dist/index.js", "main": "dist/index.js",
"types": "dist/index.d.ts", "types": "dist/index.d.ts",
"files": [ "files": [
@ -28,20 +25,23 @@
"!/dist/**/__snapshops__/", "!/dist/**/__snapshops__/",
"!/dist/**/__test_data__/" "!/dist/**/__test_data__/"
], ],
"sideEffects": false,
"scripts": { "scripts": {
"turbo:build": "pnpm run clean && npm run compile", "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"turbo:test": "jest", "build:project": "pnpm --if-present /^build:project:.*$/",
"test": "pnpm test:js", "build:project:typescript": "wireit",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "changelog": "composer install && composer exec -- changelogger",
"prepare": "composer install", "lint": "pnpm --if-present '/^lint:lang:.*$/'",
"changelog": "composer exec -- changelogger", "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"clean": "rm -rf ./dist ./tsconfig.tsbuildinfo", "lint:fix:lang:js": "eslint src --fix",
"compile": "tsc --project tsconfig.json", "lint:lang:js": "eslint src",
"prepack": "pnpm run build", "prepack": "pnpm build",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "test:js": "wireit",
"lint": "eslint src", "watch:build": "pnpm build:project --watch"
"lint:fix": "eslint src --fix" },
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
}, },
"dependencies": { "dependencies": {
"axios": "^0.24.0", "axios": "^0.24.0",
@ -59,14 +59,45 @@
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"lint-staged": { "wireit": {
"*.(t|j)s?(x)": [ "build:project:typescript": {
"pnpm lint:fix" "command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"dist"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.js --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json"
] ]
} }
} }
}

View File

@ -2,30 +2,42 @@
"name": "@woocommerce/block-templates", "name": "@woocommerce/block-templates",
"version": "1.0.0", "version": "1.0.0",
"description": "Utilities for working with block templates in WooCommerce admin.", "description": "Utilities for working with block templates in WooCommerce admin.",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce" "woocommerce"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/block-templates/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/block-templates/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js",
"module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index",
"sideEffects": [ "sideEffects": [
"build-style/**", "build-style/**",
"src/**/*.scss" "src/**/*.scss"
], ],
"publishConfig": { "main": "build/index.js",
"access": "public" "module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
}, },
"dependencies": { "dependencies": {
"@woocommerce/expression-evaluation": "workspace:*", "@woocommerce/expression-evaluation": "workspace:*",
@ -62,27 +74,89 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
}, "wireit": "^0.14.1"
"scripts": {
"turbo:build": "pnpm run build:js && pnpm run build:css",
"turbo:test": "jest --config ./jest.config.json",
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
},
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:bundle": {
"command": "webpack",
"files": [
"webpack.config.js",
"src/**/*.scss"
],
"output": [
"build-style"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/expression-evaluation/",
"package.json",
"!node_modules/@woocommerce/expression-evaluation/node_modules",
"!node_modules/@woocommerce/expression-evaluation/.git",
"!node_modules/@woocommerce/expression-evaluation/.svn",
"!node_modules/@woocommerce/expression-evaluation/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src"
]
}
} }
} }

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,33 +2,50 @@
"name": "@woocommerce/components", "name": "@woocommerce/components",
"version": "12.2.0", "version": "12.2.0",
"description": "UI components for WooCommerce.", "description": "UI components for WooCommerce.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"components" "components"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/components/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/components/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"sideEffects": [ "sideEffects": [
"build-style/**", "build-style/**",
"src/**/*.scss" "src/**/*.scss"
], ],
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types", "types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint --ext=js,ts,tsx src --fix",
"lint:lang:js": "eslint --ext=js,ts,tsx src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"@automattic/calypso-color-schemes": "^2.1.1", "@automattic/calypso-color-schemes": "^2.1.1",
"@automattic/interpolate-components": "^1.2.0", "@automattic/interpolate-components": "^1.2.0",
@ -86,17 +103,6 @@
"react-dates": "^21.8.0", "react-dates": "^21.8.0",
"react-transition-group": "^4.4.2" "react-transition-group": "^4.4.2"
}, },
"peerDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@wordpress/data": "wp-6.0",
"lodash": "^4.17.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"publishConfig": {
"access": "public"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
@ -145,30 +151,116 @@
"typescript": "^5.1.6", "typescript": "^5.1.6",
"uuid": "^8.3.0", "uuid": "^8.3.0",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
"wireit": "^0.14.1"
}, },
"scripts": { "peerDependencies": {
"turbo:build": "pnpm run build:js && pnpm run build:css", "@types/react": "^17.0.2",
"turbo:test": "jest --config ./jest.config.json", "@types/react-dom": "^17.0.2",
"prepare": "composer install", "@wordpress/data": "wp-6.0",
"changelog": "composer exec -- changelogger", "lodash": "^4.17.0",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "react": "^17.0.2",
"test": "pnpm test:js", "react-dom": "^17.0.2"
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint --ext=js,ts,tsx src",
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"build:css": "webpack",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"lint:fix": "eslint --ext=js,ts,tsx src --fix",
"prepack": "pnpm run clean && pnpm run build",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"",
"test:update-snapshots": "pnpm run test -- --updateSnapshot",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
}, },
"lint-staged": { "engines": {
"*.(t|j)s?(x)": [ "node": "^16.14.1",
"pnpm lint:fix", "pnpm": "^8.6.7"
"pnpm test-staged" },
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:bundle": {
"command": "webpack",
"files": [
"webpack.config.js",
"src/**/*.scss"
],
"output": [
"build-style"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/navigation/",
"node_modules/@woocommerce/date/",
"node_modules/@woocommerce/data/",
"node_modules/@woocommerce/currency/",
"node_modules/@woocommerce/csv-export/",
"package.json",
"!node_modules/@woocommerce/csv-export/node_modules",
"!node_modules/@woocommerce/csv-export/.git",
"!node_modules/@woocommerce/csv-export/.svn",
"!node_modules/@woocommerce/csv-export/src",
"!node_modules/@woocommerce/currency/node_modules",
"!node_modules/@woocommerce/currency/.git",
"!node_modules/@woocommerce/currency/.svn",
"!node_modules/@woocommerce/currency/src",
"!node_modules/@woocommerce/data/node_modules",
"!node_modules/@woocommerce/data/.git",
"!node_modules/@woocommerce/data/.svn",
"!node_modules/@woocommerce/data/src",
"!node_modules/@woocommerce/date/node_modules",
"!node_modules/@woocommerce/date/.git",
"!node_modules/@woocommerce/date/.svn",
"!node_modules/@woocommerce/date/src",
"!node_modules/@woocommerce/navigation/node_modules",
"!node_modules/@woocommerce/navigation/.git",
"!node_modules/@woocommerce/navigation/.svn",
"!node_modules/@woocommerce/navigation/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src"
] ]
} }
} }
}

View File

@ -2,29 +2,31 @@
"name": "@woocommerce/create-product-editor-block", "name": "@woocommerce/create-product-editor-block",
"version": "1.1.0", "version": "1.1.0",
"description": "A template to be used with `@wordpress/create-block` to create a Product Editor block.", "description": "A template to be used with `@wordpress/create-block` to create a Product Editor block.",
"author": "Automattic", "keywords": [
"license": "GPL-3.0-or-later", "wordpress",
"main": "index.js", "woocommerce"
"engines": { ],
"node": "^16.14.1", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/create-product-editor-block-extensionv#readme",
"pnpm": "^8.6.7" "bugs": {
}, "url": "https://github.com/woocommerce/woocommerce/issues"
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/woocommerce/woocommerce.git" "url": "git+https://github.com/woocommerce/woocommerce.git"
}, },
"keywords": [ "license": "GPL-3.0-or-later",
"wordpress", "author": "Automattic",
"woocommerce" "main": "index.js",
], "scripts": {
"bugs": { "changelog": "composer install && composer exec -- changelogger"
"url": "https://github.com/woocommerce/woocommerce/issues" },
"devDependencies": {
"wireit": "^0.14.1"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
}, },
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/create-product-editor-block-extensionv#readme",
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
} }

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,24 +2,26 @@
"name": "@woocommerce/create-woo-extension", "name": "@woocommerce/create-woo-extension",
"version": "1.0.2", "version": "1.0.2",
"description": "A template to be used with `@wordpress/create-block` to create a WooCommerce extension.", "description": "A template to be used with `@wordpress/create-block` to create a WooCommerce extension.",
"main": "index.js", "keywords": [],
"engines": { "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/create-woo-extensionv#readme",
"node": "^16.14.1", "bugs": {
"pnpm": "^8.6.7" "url": "https://github.com/woocommerce/woocommerce/issues"
},
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/woocommerce/woocommerce.git" "url": "git+https://github.com/woocommerce/woocommerce.git"
}, },
"keywords": [],
"author": "",
"license": "GPL-3.0+", "license": "GPL-3.0+",
"bugs": { "author": "",
"url": "https://github.com/woocommerce/woocommerce/issues" "main": "index.js",
"scripts": {
"changelog": "composer install && composer exec -- changelogger"
}, },
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/create-woo-extensionv#readme" "devDependencies": {
"wireit": "^0.14.1"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
}
} }

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,69 +2,120 @@
"name": "@woocommerce/csv-export", "name": "@woocommerce/csv-export",
"version": "1.8.0", "version": "1.8.0",
"description": "WooCommerce utility library to convert data to CSV files.", "description": "WooCommerce utility library to convert data to CSV files.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"csv" "csv"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/csv-export/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/csv-export/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"dependencies": { "types": "build-types",
"@types/node": "^16.18.18",
"browser-filesaver": "^1.1.1",
"moment": "^2.29.1"
},
"publishConfig": {
"access": "public"
},
"scripts": { "scripts": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"turbo:test": "jest --config ./jest.config.json", "build:project": "pnpm --if-present /^build:project:.*$/",
"prepare": "composer install", "build:project:cjs": "wireit",
"changelog": "composer exec -- changelogger", "build:project:esm": "wireit",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "changelog": "composer install && composer exec -- changelogger",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "lint": "pnpm --if-present '/^lint:lang:.*$/'",
"test": "pnpm test:js", "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint:fix:lang:js": "eslint src --fix",
"lint": "eslint src", "lint:lang:js": "eslint src",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "prepack": "pnpm build",
"prepack": "pnpm run clean && pnpm run build", "test:js": "wireit",
"lint:fix": "eslint src --fix", "watch:build": "pnpm build:project --watch"
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@types/jest": "^27.4.1",
"@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
"eslint": "^8.32.0",
"jest": "~27.5.1",
"jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"rimraf": "^3.0.2",
"ts-jest": "~29.1.1",
"typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {
"*.(t|j)s?(x)": [ "*.(t|j)s?(x)": [
"pnpm lint:fix", "pnpm lint:fix",
"pnpm test-staged" "pnpm test-staged"
] ]
},
"dependencies": {
"@types/node": "^16.18.18",
"browser-filesaver": "^1.1.1",
"moment": "^2.29.1"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@types/jest": "^27.4.1",
"@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
"concurrently": "^7.0.0",
"eslint": "^8.32.0",
"jest": "~27.5.1",
"jest-cli": "~27.5.1",
"rimraf": "^3.0.2",
"ts-jest": "~29.1.1",
"typescript": "^5.1.6",
"wireit": "^0.14.1"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
]
}
} }
} }

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,29 +2,45 @@
"name": "@woocommerce/currency", "name": "@woocommerce/currency",
"version": "4.2.0", "version": "4.2.0",
"description": "WooCommerce currency utilities.", "description": "WooCommerce currency utilities.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"currency" "currency"
], ],
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/currency/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/currency/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"@woocommerce/number": "workspace:*", "@woocommerce/number": "workspace:*",
"@wordpress/deprecated": "wp-6.0", "@wordpress/deprecated": "wp-6.0",
@ -33,41 +49,81 @@
"@wordpress/html-entities": "wp-6.0", "@wordpress/html-entities": "wp-6.0",
"@wordpress/i18n": "wp-6.0" "@wordpress/i18n": "wp-6.0"
}, },
"publishConfig": {
"access": "public"
},
"scripts": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"turbo:test": "jest --config ./jest.config.json",
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"concurrently": "^7.0.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"lint-staged": { "engines": {
"*.(t|j)s?(x)": [ "node": "^16.14.1",
"pnpm lint:fix", "pnpm": "^8.6.7"
"pnpm test-staged" },
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/number/",
"package.json",
"!node_modules/@woocommerce/number/node_modules",
"!node_modules/@woocommerce/number/.git",
"!node_modules/@woocommerce/number/.svn",
"!node_modules/@woocommerce/number/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
] ]
} }
} }
}

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,28 +2,45 @@
"name": "@woocommerce/customer-effort-score", "name": "@woocommerce/customer-effort-score",
"version": "2.2.0", "version": "2.2.0",
"description": "WooCommerce utility to measure user effort.", "description": "WooCommerce utility to measure user effort.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce" "woocommerce"
], ],
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/customer-effort-score/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/customer-effort-score/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"@woocommerce/experimental": "workspace:*", "@woocommerce/experimental": "workspace:*",
"@wordpress/components": "wp-6.0", "@wordpress/components": "wp-6.0",
@ -36,9 +53,6 @@
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react-transition-group": "^4.4.2" "react-transition-group": "^4.4.2"
}, },
"publishConfig": {
"access": "public"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@testing-library/react": "12.1.3", "@testing-library/react": "12.1.3",
@ -49,10 +63,10 @@
"@types/wordpress__data": "6.0.0", "@types/wordpress__data": "6.0.0",
"@woocommerce/data": "workspace:*", "@woocommerce/data": "workspace:*",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*", "@woocommerce/internal-style-build": "workspace:*",
"@woocommerce/navigation": "workspace:*", "@woocommerce/navigation": "workspace:*",
"@woocommerce/tracks": "workspace:*", "@woocommerce/tracks": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
"@wordpress/browserslist-config": "wp-6.0", "@wordpress/browserslist-config": "wp-6.0",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
@ -66,33 +80,107 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
"wireit": "^0.14.1"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
}, },
"scripts": { "engines": {
"turbo:build": "pnpm run build:js && pnpm run build:css", "node": "^16.14.1",
"turbo:test": "jest --config ./jest.config.json", "pnpm": "^8.6.7"
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
}, },
"lint-staged": { "publishConfig": {
"*.(t|j)s?(x)": [ "access": "public"
"pnpm lint:fix", },
"pnpm test-staged" "wireit": {
"build:project:bundle": {
"command": "webpack",
"files": [
"webpack.config.js",
"src/**/*.scss"
],
"output": [
"build-style"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/tracks/",
"node_modules/@woocommerce/navigation/",
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/data/",
"node_modules/@woocommerce/experimental/",
"package.json",
"!node_modules/@woocommerce/experimental/node_modules",
"!node_modules/@woocommerce/experimental/.git",
"!node_modules/@woocommerce/experimental/.svn",
"!node_modules/@woocommerce/experimental/src",
"!node_modules/@woocommerce/data/node_modules",
"!node_modules/@woocommerce/data/.git",
"!node_modules/@woocommerce/data/.svn",
"!node_modules/@woocommerce/data/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src",
"!node_modules/@woocommerce/navigation/node_modules",
"!node_modules/@woocommerce/navigation/.git",
"!node_modules/@woocommerce/navigation/.svn",
"!node_modules/@woocommerce/navigation/src",
"!node_modules/@woocommerce/tracks/node_modules",
"!node_modules/@woocommerce/tracks/.git",
"!node_modules/@woocommerce/tracks/.svn",
"!node_modules/@woocommerce/tracks/src"
] ]
} }
} }
}

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,29 +2,45 @@
"name": "@woocommerce/data", "name": "@woocommerce/data",
"version": "4.1.0", "version": "4.1.0",
"description": "WooCommerce Admin data store and utilities", "description": "WooCommerce Admin data store and utilities",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"data" "data"
], ],
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/data/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/data/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"@woocommerce/date": "workspace:*", "@woocommerce/date": "workspace:*",
"@woocommerce/navigation": "workspace:*", "@woocommerce/navigation": "workspace:*",
@ -43,9 +59,6 @@
"qs": "^6.10.3", "qs": "^6.10.3",
"rememo": "^4.0.0" "rememo": "^4.0.0"
}, },
"publishConfig": {
"access": "public"
},
"devDependencies": { "devDependencies": {
"@automattic/data-stores": "^2.0.1", "@automattic/data-stores": "^2.0.1",
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
@ -55,23 +68,24 @@
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.182",
"@types/md5": "^2.3.2", "@types/md5": "^2.3.2",
"@types/node": "^16.18.18",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/node": "^16.18.18",
"@types/wordpress__compose": "4.0.1", "@types/wordpress__compose": "4.0.1",
"@types/wordpress__core-data": "2.4.5", "@types/wordpress__core-data": "2.4.5",
"@types/wordpress__data": "6.0.0", "@types/wordpress__data": "6.0.0",
"@types/wordpress__data-controls": "~2.2.0", "@types/wordpress__data-controls": "~2.2.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"concurrently": "^7.0.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"redux": "^4.1.0", "redux": "^4.1.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"peerDependencies": { "peerDependencies": {
"@wordpress/core-data": "wp-6.0", "@wordpress/core-data": "wp-6.0",
@ -79,25 +93,77 @@
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
}, },
"scripts": { "engines": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "node": "^16.14.1",
"turbo:test": "jest --config ./jest.config.json", "pnpm": "^8.6.7"
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
}, },
"lint-staged": { "publishConfig": {
"*.(t|j)s?(x)": [ "access": "public"
"pnpm lint:fix", },
"pnpm test-staged" "wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/tracks/",
"node_modules/@woocommerce/navigation/",
"node_modules/@woocommerce/date/",
"package.json",
"!node_modules/@woocommerce/date/node_modules",
"!node_modules/@woocommerce/date/.git",
"!node_modules/@woocommerce/date/.svn",
"!node_modules/@woocommerce/date/src",
"!node_modules/@woocommerce/navigation/node_modules",
"!node_modules/@woocommerce/navigation/.git",
"!node_modules/@woocommerce/navigation/.svn",
"!node_modules/@woocommerce/navigation/src",
"!node_modules/@woocommerce/tracks/node_modules",
"!node_modules/@woocommerce/tracks/.git",
"!node_modules/@woocommerce/tracks/.svn",
"!node_modules/@woocommerce/tracks/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
] ]
} }
} }
}

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,29 +2,45 @@
"name": "@woocommerce/date", "name": "@woocommerce/date",
"version": "4.2.0", "version": "4.2.0",
"description": "WooCommerce date utilities.", "description": "WooCommerce date utilities.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"date" "date"
], ],
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/date/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/date/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"@types/d3-time-format": "^2.3.0", "@types/d3-time-format": "^2.3.0",
"@wordpress/date": "wp-6.0", "@wordpress/date": "wp-6.0",
@ -35,46 +51,81 @@
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@types/node": "^16.18.18",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
"@types/lodash": "^4.14.182", "@types/lodash": "^4.14.182",
"@types/node": "^16.18.18",
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"concurrently": "^7.0.0",
"d3-time-format": "^2.3.0", "d3-time-format": "^2.3.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"peerDependencies": { "peerDependencies": {
"lodash": "^4.17.0" "lodash": "^4.17.0"
}, },
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
}, },
"scripts": { "wireit": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build:project:cjs": {
"turbo:test": "jest --config ./jest.config.json", "command": "tsc --project tsconfig-cjs.json",
"prepare": "composer install", "files": [
"changelog": "composer exec -- changelogger", "tsconfig-cjs.json",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "src/**/*.{js,jsx,ts,tsx}",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "typings/**/*.ts"
"test": "pnpm test:js", ],
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "output": [
"lint": "eslint src", "build"
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", ],
"prepack": "pnpm run clean && pnpm run build", "dependencies": [
"lint:fix": "eslint src --fix", "dependencyOutputs"
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests" ]
}, },
"lint-staged": { "build:project:esm": {
"*.(t|j)s?(x)": [ "command": "tsc --project tsconfig.json",
"pnpm lint:fix", "files": [
"pnpm test-staged" "tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
] ]
} }
} }
}

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,31 +2,36 @@
"name": "@woocommerce/dependency-extraction-webpack-plugin", "name": "@woocommerce/dependency-extraction-webpack-plugin",
"version": "2.3.0", "version": "2.3.0",
"description": "WooCommerce Dependency Extraction Webpack Plugin", "description": "WooCommerce Dependency Extraction Webpack Plugin",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce" "woocommerce"
], ],
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/dependency-extraction-webpack-plugin/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/dependency-extraction-webpack-plugin/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "src/index.js", "main": "src/index.js",
"scripts": {
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"eslint --fix"
]
},
"dependencies": { "dependencies": {
"@wordpress/dependency-extraction-webpack-plugin": "^3.3.0" "@wordpress/dependency-extraction-webpack-plugin": "^3.3.0"
}, },
"publishConfig": {
"access": "public"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
@ -37,17 +42,14 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
"wireit": "^0.14.1"
}, },
"scripts": { "engines": {
"prepare": "composer install", "node": "^16.14.1",
"changelog": "composer exec -- changelogger", "pnpm": "^8.6.7"
"lint": "eslint src",
"lint:fix": "eslint src --fix"
}, },
"lint-staged": { "publishConfig": {
"*.(t|j)s?(x)": [ "access": "public"
"eslint --fix"
]
} }
} }

View File

@ -8,10 +8,6 @@
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"license": "GPL-3.0+", "license": "GPL-3.0+",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"files": [ "files": [
@ -22,6 +18,19 @@
"installFiles", "installFiles",
"CHANGELOG.md" "CHANGELOG.md"
], ],
"scripts": {
"build": "./bin/build.sh && pnpm clean && pnpm compile",
"clean": "rm -rf ./build ./build-module",
"compile": "e2e-builds",
"lint": "eslint --ext=js,ts,tsx src",
"lint:fix": "eslint --ext=js,ts,tsx src --fix",
"prepack": "pnpm build"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
},
"dependencies": { "dependencies": {
"@jest/globals": "^27.5.1", "@jest/globals": "^27.5.1",
"@wordpress/deprecated": "wp-6.0", "@wordpress/deprecated": "wp-6.0",
@ -42,27 +51,18 @@
"@wordpress/babel-preset-default": "3.0.2", "@wordpress/babel-preset-default": "3.0.2",
"@wordpress/browserslist-config": "wp-6.0", "@wordpress/browserslist-config": "wp-6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"eslint-plugin-jest": "23.20.0" "eslint-plugin-jest": "23.20.0",
"wireit": "^0.14.1"
}, },
"peerDependencies": { "peerDependencies": {
"@woocommerce/api": "^0.2.0", "@woocommerce/api": "^0.2.0",
"@woocommerce/e2e-utils": "^0.1.6" "@woocommerce/e2e-utils": "^0.1.6"
}, },
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
},
"scripts": {
"turbo:build": "./bin/build.sh && pnpm run clean && pnpm run compile",
"prepack": "pnpm run build",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"clean": "rm -rf ./build ./build-module",
"compile": "e2e-builds",
"lint": "eslint --ext=js,ts,tsx src",
"lint:fix": "eslint --ext=js,ts,tsx src --fix"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
} }
} }

View File

@ -38,7 +38,7 @@ Again, if you don't have shell access to your test site, through WP Admin ensure
3. You have an admin user set up (if their credentials differ from u/ `admin` and p/ `password` be sure to update `/plugins/woocommerce/tests/e2e/config/default.json`) 3. You have an admin user set up (if their credentials differ from u/ `admin` and p/ `password` be sure to update `/plugins/woocommerce/tests/e2e/config/default.json`)
4. You have a customer user set up named 'Jane Smith'. This user should be a `subscriber` and again make sure their username and password are reflected in `/plugins/woocommerce/tests/e2e/config/default.json`. 4. You have a customer user set up named 'Jane Smith'. This user should be a `subscriber` and again make sure their username and password are reflected in `/plugins/woocommerce/tests/e2e/config/default.json`.
You should then be able to run the e2e tests by running `pnpm run e2e --filter=woocommerce`. You should then be able to run the e2e tests by running `pnpm e2e --filter=@woocommerce/plugin-woocommerce`.
### Test Sequencer Setup ### Test Sequencer Setup

View File

@ -2,18 +2,12 @@
"name": "@woocommerce/e2e-environment", "name": "@woocommerce/e2e-environment",
"version": "0.3.0", "version": "0.3.0",
"description": "WooCommerce End to End Testing Environment Configuration.", "description": "WooCommerce End to End Testing Environment Configuration.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"e2e", "e2e",
"puppeteer" "puppeteer"
], ],
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/e2e-environment/README.md",
"bugs": { "bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues" "url": "https://github.com/woocommerce/woocommerce/issues"
@ -22,8 +16,34 @@
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"license": "GPL-3.0-or-later",
"author": "Automattic",
"main": "index.js", "main": "index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"bin": {
"wc-e2e": "bin/wc-e2e.sh"
},
"scripts": {
"build": "pnpm clean && pnpm compile",
"clean": "rm -rf ./build ./build-module",
"compile": "e2e-builds",
"docker:clear-all": "docker rmi --force $(docker images -q)",
"docker:down": "./bin/docker-compose.sh down",
"docker:ssh": "docker exec -it $(node utils/get-app-name.js)_wordpress-www /bin/bash",
"docker:up": "./bin/docker-compose.sh up",
"docker:wait": "bash ./bin/wait-for-build.sh",
"lint": "eslint --ext=js,ts,tsx src",
"lint:fix": "eslint --ext=js,ts,tsx src --fix",
"prepack": "pnpm build",
"test:e2e": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js",
"test:e2e-debug": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev --debug",
"test:e2e-dev": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
},
"dependencies": { "dependencies": {
"@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50", "@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50",
"@jest/test-sequencer": "^27.5.1", "@jest/test-sequencer": "^27.5.1",
@ -59,34 +79,14 @@
"@wordpress/babel-preset-default": "3.0.2", "@wordpress/babel-preset-default": "3.0.2",
"@wordpress/browserslist-config": "wp-6.0", "@wordpress/browserslist-config": "wp-6.0",
"ndb": "^1.1.5", "ndb": "^1.1.5",
"semver": "^7.3.2" "semver": "^7.3.2",
"wireit": "^0.14.1"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
}, },
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
},
"scripts": {
"turbo:build": "pnpm run clean && pnpm run compile",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"clean": "rm -rf ./build ./build-module",
"compile": "e2e-builds",
"prepack": "pnpm run build",
"docker:up": "./bin/docker-compose.sh up",
"docker:wait": "bash ./bin/wait-for-build.sh",
"docker:down": "./bin/docker-compose.sh down",
"docker:clear-all": "docker rmi --force $(docker images -q)",
"docker:ssh": "docker exec -it $(node utils/get-app-name.js)_wordpress-www /bin/bash",
"test:e2e": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js",
"test:e2e-debug": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev --debug",
"test:e2e-dev": "bash ./bin/wait-for-build.sh && ./bin/e2e-test-integration.js --dev",
"lint": "eslint --ext=js,ts,tsx src",
"lint:fix": "eslint --ext=js,ts,tsx src --fix"
},
"bin": {
"wc-e2e": "bin/wc-e2e.sh"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
} }
} }

View File

@ -8,12 +8,21 @@
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"license": "GPL-3.0+", "license": "GPL-3.0+",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"scripts": {
"build": "pnpm clean && pnpm compile",
"clean": "rm -rf ./build ./build-module",
"compile": "e2e-builds",
"lint": "eslint --ext=js,ts,tsx src",
"lint:fix": "eslint --ext=js,ts,tsx src --fix",
"prepack": "pnpm build"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
},
"dependencies": { "dependencies": {
"@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50", "@automattic/puppeteer-utils": "github:Automattic/puppeteer-utils#0f3ec50",
"@wordpress/deprecated": "wp-6.0", "@wordpress/deprecated": "wp-6.0",
@ -38,26 +47,17 @@
"@wordpress/babel-preset-default": "3.0.2", "@wordpress/babel-preset-default": "3.0.2",
"@wordpress/browserslist-config": "wp-6.0", "@wordpress/browserslist-config": "wp-6.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"eslint-plugin-jest": "23.20.0" "eslint-plugin-jest": "23.20.0",
"wireit": "^0.14.1"
}, },
"peerDependencies": { "peerDependencies": {
"@woocommerce/api": "^0.2.0" "@woocommerce/api": "^0.2.0"
}, },
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"publishConfig": { "publishConfig": {
"access": "public" "access": "public"
},
"scripts": {
"turbo:build": "pnpm run clean && pnpm run compile",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"clean": "rm -rf ./build ./build-module",
"compile": "e2e-builds",
"prepack": "pnpm run build",
"lint": "eslint --ext=js,ts,tsx src",
"lint:fix": "eslint --ext=js,ts,tsx src --fix"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
} }
} }

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,12 +2,6 @@
"name": "@woocommerce/eslint-plugin", "name": "@woocommerce/eslint-plugin",
"version": "2.2.0", "version": "2.2.0",
"description": "ESLint plugin for WooCommerce development.", "description": "ESLint plugin for WooCommerce development.",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
@ -15,37 +9,42 @@
"plugin" "plugin"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/eslint-plugin/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/eslint-plugin/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git", "url": "https://github.com/woocommerce/woocommerce.git",
"directory": "packages/eslint-plugin" "directory": "packages/eslint-plugin"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
}, "main": "index.js",
"files": [ "files": [
"configs", "configs",
"rules", "rules",
"index.js" "index.js"
], ],
"main": "index.js", "scripts": {
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint ./rules ./configs --fix",
"lint:lang:js": "eslint ./rules ./configs"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
},
"dependencies": { "dependencies": {
"@typescript-eslint/parser": "^5.54.0",
"@typescript-eslint/eslint-plugin": "^5.54.0", "@typescript-eslint/eslint-plugin": "^5.54.0",
"@typescript-eslint/parser": "^5.54.0",
"@wordpress/eslint-plugin": "14.7.0", "@wordpress/eslint-plugin": "14.7.0",
"eslint-plugin-react-hooks": "^4.6.0", "eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-testing-library": "^5.10.2", "eslint-plugin-testing-library": "^5.10.2",
"prettier": "npm:wp-prettier@^2.8.5" "prettier": "npm:wp-prettier@^2.8.5"
}, },
"publishConfig": {
"access": "public"
},
"scripts": {
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"lint": "eslint ./rules ./configs",
"lint:fix": "eslint ./rules ./configs --fix"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"eslint": "^8.32.0", "eslint": "^8.32.0",
@ -53,11 +52,14 @@
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"lint-staged": { "engines": {
"*.(t|j)s?(x)": [ "node": "^16.14.1",
"pnpm lint:fix" "pnpm": "^8.6.7"
] },
"publishConfig": {
"access": "public"
} }
} }

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,33 +2,50 @@
"name": "@woocommerce/experimental", "name": "@woocommerce/experimental",
"version": "3.2.0", "version": "3.2.0",
"description": "WooCommerce experimental components.", "description": "WooCommerce experimental components.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"experimental" "experimental"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/experimental/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/experimental/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js",
"module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index",
"sideEffects": [ "sideEffects": [
"build-style/**", "build-style/**",
"src/**/*.scss" "src/**/*.scss"
], ],
"main": "build/index.js",
"module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"@woocommerce/components": "workspace:*", "@woocommerce/components": "workspace:*",
"@wordpress/components": "^19.5.0", "@wordpress/components": "^19.5.0",
@ -43,9 +60,6 @@
"react-transition-group": "^4.4.2", "react-transition-group": "^4.4.2",
"react-visibility-sensor": "^5.1.1" "react-visibility-sensor": "^5.1.1"
}, },
"publishConfig": {
"access": "public"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
@ -61,8 +75,8 @@
"@types/testing-library__jest-dom": "^5.14.3", "@types/testing-library__jest-dom": "^5.14.3",
"@types/wordpress__components": "^19.10.3", "@types/wordpress__components": "^19.10.3",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"@woocommerce/internal-style-build": "workspace:*",
"@wordpress/browserslist-config": "wp-6.0", "@wordpress/browserslist-config": "wp-6.0",
"concurrently": "^7.0.0", "concurrently": "^7.0.0",
"css-loader": "^3.6.0", "css-loader": "^3.6.0",
@ -76,33 +90,92 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
"wireit": "^0.14.1"
}, },
"peerDependencies": { "peerDependencies": {
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
}, },
"scripts": { "engines": {
"turbo:build": "pnpm run build:js && pnpm run build:css", "node": "^16.14.1",
"turbo:test": "jest --config ./jest.config.json", "pnpm": "^8.6.7"
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
}, },
"lint-staged": { "publishConfig": {
"*.(t|j)s?(x)": [ "access": "public"
"pnpm lint:fix", },
"pnpm test-staged" "wireit": {
"build:project:bundle": {
"command": "webpack",
"files": [
"webpack.config.js",
"src/**/*.scss"
],
"output": [
"build-style"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/components/",
"package.json",
"!node_modules/@woocommerce/components/node_modules",
"!node_modules/@woocommerce/components/.git",
"!node_modules/@woocommerce/components/.svn",
"!node_modules/@woocommerce/components/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src"
] ]
} }
} }
}

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,12 +2,6 @@
"name": "@woocommerce/explat", "name": "@woocommerce/explat",
"version": "2.3.0", "version": "2.3.0",
"description": "WooCommerce component and utils for A/B testing.", "description": "WooCommerce component and utils for A/B testing.",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
@ -15,19 +9,38 @@
"explat" "explat"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/explat/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/explat/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"publishConfig": { "types": "build-types",
"access": "public" "scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
}, },
"dependencies": { "dependencies": {
"@automattic/explat-client": "^0.0.3", "@automattic/explat-client": "^0.0.3",
@ -46,33 +59,71 @@
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"concurrently": "^7.0.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"scripts": { "engines": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "node": "^16.14.1",
"turbo:test": "jest --config ./jest.config.json", "pnpm": "^8.6.7"
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
}, },
"lint-staged": { "publishConfig": {
"*.(t|j)s?(x)": [ "access": "public"
"pnpm lint:fix", },
"pnpm test-staged" "wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
] ]
} }
} }
}

View File

@ -10,5 +10,5 @@
"./typings", "./typings",
"./node_modules/@types" "./node_modules/@types"
] ]
}, }
} }

View File

@ -2,51 +2,49 @@
"name": "@woocommerce/expression-evaluation", "name": "@woocommerce/expression-evaluation",
"version": "1.0.0", "version": "1.0.0",
"description": "Library for evaluating expressions.", "description": "Library for evaluating expressions.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"expression", "expression",
"evalution" "evalution"
], ],
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/expression-evaluation/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/expression-evaluation/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"@wordpress/i18n": "wp-6.0", "@wordpress/i18n": "wp-6.0",
"peggy": "^3.0.2" "peggy": "^3.0.2"
}, },
"publishConfig": {
"access": "public"
},
"scripts": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"turbo:test": "jest --config ./jest.config.json",
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@types/jest": "^27.4.1", "@types/jest": "^27.4.1",
@ -58,12 +56,59 @@
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"lint-staged": { "engines": {
"*.(t|j)s?(x)": [ "node": "^16.14.1",
"pnpm lint:fix", "pnpm": "^8.6.7"
"pnpm test-staged" },
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
] ]
} }
} }
}

View File

@ -2,24 +2,26 @@
"name": "@woocommerce/extend-cart-checkout-block", "name": "@woocommerce/extend-cart-checkout-block",
"version": "1.2.0", "version": "1.2.0",
"description": "", "description": "",
"main": "index.js", "keywords": [],
"engines": { "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/extend-cart-checkout-block#readme",
"node": "^16.14.1", "bugs": {
"pnpm": "^8.6.7" "url": "https://github.com/woocommerce/woocommerce/issues"
},
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/woocommerce/woocommerce.git" "url": "git+https://github.com/woocommerce/woocommerce.git"
}, },
"keywords": [],
"author": "",
"license": "ISC", "license": "ISC",
"bugs": { "author": "",
"url": "https://github.com/woocommerce/woocommerce/issues" "main": "index.js",
"scripts": {
"changelog": "composer install && composer exec -- changelogger"
}, },
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/extend-cart-checkout-block#readme" "devDependencies": {
"wireit": "^0.14.1"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
}
} }

View File

@ -1,5 +0,0 @@
{
"root": "packages/js/extend-cart-checkout-block",
"sourceRoot": "packages/js/extend-cart-checkout-block",
"projectType": "library"
}

View File

@ -2,30 +2,41 @@
"name": "@woocommerce/integrate-plugin", "name": "@woocommerce/integrate-plugin",
"version": "0.1.0", "version": "0.1.0",
"description": "WooCommerce plugin integration scripts.", "description": "WooCommerce plugin integration scripts.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"plugin" "plugin"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/integrate-plugin/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/integrate-plugin/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
}, "sideEffects": [],
"main": "build/index.js", "main": "build/index.js",
"react-native": "src/index",
"types": "build-types",
"bin": { "bin": {
"woo-integrate-plugin": "./build/index.js" "woo-integrate-plugin": "./build/index.js"
}, },
"types": "build-types", "scripts": {
"react-native": "src/index", "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"sideEffects": [], "build:project": "pnpm --if-present /^build:project:.*$/",
"publishConfig": { "build:project:cjs": "wireit",
"access": "public" "build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
}, },
"dependencies": { "dependencies": {
"@wordpress/create-block": "wp-6.0", "@wordpress/create-block": "wp-6.0",
@ -59,18 +70,61 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
"wireit": "^0.14.1"
}, },
"scripts": { "publishConfig": {
"turbo:build": "pnpm run build:js", "access": "public"
"prepare": "composer install", },
"changelog": "composer exec -- changelogger", "wireit": {
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build:project:cjs": {
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "command": "tsc --project tsconfig-cjs.json",
"lint": "eslint src", "files": [
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "tsconfig-cjs.json",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"", "src/**/*.{js,jsx,ts,tsx}",
"prepack": "pnpm run clean && pnpm run build", "typings/**/*.ts"
"lint:fix": "eslint src --fix" ],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
]
}
} }
} }

View File

@ -1,28 +1,31 @@
{ {
"name": "@woocommerce/internal-e2e-builds", "name": "@woocommerce/internal-e2e-builds",
"version": "0.1.0", "version": "0.1.0",
"description": "Utility build files for e2e packages",
"private": true, "private": true,
"main": "build.js", "description": "Utility build files for e2e packages",
"engines": { "homepage": "https://github.com/woocommerce/woocommerce#readme",
"node": "^16.14.1", "bugs": {
"pnpm": "^8.6.7" "url": "https://github.com/woocommerce/woocommerce/issues"
},
"bin": {
"e2e-builds": "./build.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git+https://github.com/woocommerce/woocommerce.git" "url": "git+https://github.com/woocommerce/woocommerce.git"
}, },
"license": "GPL-3.0+", "license": "GPL-3.0+",
"bugs": { "main": "build.js",
"url": "https://github.com/woocommerce/woocommerce/issues" "bin": {
"e2e-builds": "./build.js"
}, },
"homepage": "https://github.com/woocommerce/woocommerce#readme",
"scripts": { "scripts": {
"lint": "eslint build.js", "lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "eslint build.js --fix" "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint build.js --fix",
"lint:lang:js": "eslint build.js"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
}, },
"devDependencies": { "devDependencies": {
"@babel/core": "7.12.9", "@babel/core": "7.12.9",
@ -31,11 +34,11 @@
"eslint": "^8.32.0", "eslint": "^8.32.0",
"glob": "^7.2.0", "glob": "^7.2.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mkdirp": "^1.0.4" "mkdirp": "^1.0.4",
"wireit": "^0.14.1"
}, },
"lint-staged": { "engines": {
"*.(t|j)s?(x)": [ "node": "^16.14.1",
"pnpm lint:fix" "pnpm": "^8.6.7"
]
} }
} }

View File

@ -1,33 +1,38 @@
{ {
"name": "@woocommerce/internal-js-tests", "name": "@woocommerce/internal-js-tests",
"version": "1.1.0", "version": "1.1.0",
"private": true,
"description": "JavaScript test tooling.", "description": "JavaScript test tooling.",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-js-tests/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-js-tests/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git", "url": "https://github.com/woocommerce/woocommerce.git",
"directory": "packages/internal-js-tests" "directory": "packages/internal-js-tests"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"private": true,
"main": "build/util/index.js", "main": "build/util/index.js",
"module": "build-module/util/index.js", "module": "build-module/util/index.js",
"scripts": { "scripts": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "build:project": "pnpm --if-present /^build:project:.*$/",
"lint": "eslint src", "build:project:cjs": "wireit",
"ts:check": "tsc --noEmit --project ./tsconfig.json", "build:project:esm": "wireit",
"clean": "pnpm exec rimraf *.tsbuildinfo build build-*", "changelog": "composer install && composer exec -- changelogger",
"prepack": "pnpm run clean && pnpm run build", "lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "eslint src --fix" "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
}, },
"dependencies": { "dependencies": {
"@testing-library/jest-dom": "5.16.2", "@testing-library/jest-dom": "5.16.2",
@ -40,18 +45,57 @@
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"babel-jest": "~27.5.1",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"resize-observer-polyfill": "1.5.1", "resize-observer-polyfill": "1.5.1",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"babel-jest": "~27.5.1", "typescript": "^5.1.6",
"typescript": "^5.1.6" "wireit": "^0.14.1"
}, },
"lint-staged": { "engines": {
"*.(t|j)s?(x)": [ "node": "^16.14.1",
"pnpm lint:fix" "pnpm": "^8.6.7"
},
"wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module"
],
"dependencies": [
"dependencyOutputs"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json"
] ]
} }
} }
}

View File

@ -1,19 +0,0 @@
{
"root": "packages/js/internal-js-tests",
"sourceRoot": "packages/js/internal-js-tests/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "build"
}
},
"test": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@ -1,26 +1,34 @@
{ {
"name": "@woocommerce/internal-style-build", "name": "@woocommerce/internal-style-build",
"version": "1.0.0", "version": "1.0.0",
"private": true,
"description": "WooCommerce Components SASS Build", "description": "WooCommerce Components SASS Build",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce" "woocommerce"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-style-build/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/internal-style-build/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "index.js", "main": "index.js",
"scripts": {
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint index.js --fix",
"lint:lang:js": "eslint index.js"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
},
"dependencies": { "dependencies": {
"@automattic/color-studio": "^2.5.0", "@automattic/color-studio": "^2.5.0",
"@wordpress/base-styles": "wp-6.0", "@wordpress/base-styles": "wp-6.0",
@ -32,11 +40,6 @@
"webpack-remove-empty-scripts": "^0.7.3", "webpack-remove-empty-scripts": "^0.7.3",
"webpack-rtl-plugin": "^2.0.0" "webpack-rtl-plugin": "^2.0.0"
}, },
"scripts": {
"lint": "eslint index.js",
"lint:fix": "eslint index.js --fix"
},
"private": true,
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
@ -46,11 +49,11 @@
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0" "webpack": "^5.70.0",
"wireit": "^0.14.1"
}, },
"lint-staged": { "engines": {
"*.(t|j)s?(x)": [ "node": "^16.14.1",
"pnpm lint:fix" "pnpm": "^8.6.7"
]
} }
} }

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,29 +2,45 @@
"name": "@woocommerce/navigation", "name": "@woocommerce/navigation",
"version": "8.1.0", "version": "8.1.0",
"description": "WooCommerce navigation utilities.", "description": "WooCommerce navigation utilities.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"navigation" "navigation"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/navigation/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/navigation/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"@wordpress/api-fetch": "wp-6.0", "@wordpress/api-fetch": "wp-6.0",
"@wordpress/components": "wp-6.0", "@wordpress/components": "wp-6.0",
@ -38,27 +54,6 @@
"qs": "^6.10.3", "qs": "^6.10.3",
"react-router-dom": "~6.3.0" "react-router-dom": "~6.3.0"
}, },
"peerDependencies": {
"lodash": "^4.17.0"
},
"publishConfig": {
"access": "public"
},
"scripts": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"turbo:test": "jest --config ./jest.config.json",
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
@ -66,18 +61,74 @@
"@types/qs": "^6.9.7", "@types/qs": "^6.9.7",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"concurrently": "^7.0.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"lint-staged": { "peerDependencies": {
"*.(t|j)s?(x)": [ "lodash": "^4.17.0"
"pnpm lint:fix", },
"pnpm test-staged" "engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
] ]
} }
} }
}

View File

@ -1,54 +1,51 @@
{ {
"name": "@woocommerce/notices", "name": "@woocommerce/notices",
"version": "4.0.1", "version": "4.0.1",
"private": true,
"description": "State management for notices.", "description": "State management for notices.",
"author": "The WordPress Contributors",
"license": "GPL-2.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"gutenberg", "gutenberg",
"notices" "notices"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/notices/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/notices/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerge.git", "url": "https://github.com/woocommerce/woocommerge.git",
"directory": "packages/js/notices" "directory": "packages/js/notices"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "The WordPress Contributors",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix"
]
},
"dependencies": { "dependencies": {
"@wordpress/a11y": "wp-6.0", "@wordpress/a11y": "wp-6.0",
"@wordpress/data": "wp-6.0", "@wordpress/data": "wp-6.0",
"@wordpress/notices": "wp-6.0" "@wordpress/notices": "wp-6.0"
}, },
"peerDependencies": {
"lodash": "^4.17.0",
"react": "^17.0.2",
"react-dom": "^17.0.2"
},
"publishConfig": {
"access": "public"
},
"private": true,
"scripts": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"lint": "eslint src",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix"
},
"devDependencies": { "devDependencies": {
"@automattic/data-stores": "^2.0.1", "@automattic/data-stores": "^2.0.1",
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
@ -56,18 +53,66 @@
"@types/wordpress__data": "6.0.0", "@types/wordpress__data": "6.0.0",
"@types/wordpress__notices": "3.5.0", "@types/wordpress__notices": "3.5.0",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"concurrently": "^7.0.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"redux": "^4.2.0", "redux": "^4.2.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"lint-staged": { "peerDependencies": {
"*.(t|j)s?(x)": [ "lodash": "^4.17.0",
"pnpm lint:fix" "react": "^17.0.2",
"react-dom": "^17.0.2"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json"
] ]
} }
} }
}

View File

@ -1,25 +0,0 @@
{
"root": "packages/js/notices",
"sourceRoot": "packages/js/notices/src",
"projectType": "library",
"targets": {
"build": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "build"
}
},
"build-watch": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "start"
}
},
"test": {
"executor": "@nrwl/workspace:run-script",
"options": {
"script": "test"
}
}
}
}

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,49 +2,47 @@
"name": "@woocommerce/number", "name": "@woocommerce/number",
"version": "2.4.0", "version": "2.4.0",
"description": "Number formatting utilities for WooCommerce.", "description": "Number formatting utilities for WooCommerce.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce" "woocommerce"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/number/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/number/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
},
"dependencies": { "dependencies": {
"locutus": "^2.0.16" "locutus": "^2.0.16"
}, },
"publishConfig": {
"access": "public"
},
"scripts": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"turbo:test": "jest --config ./jest.config.json",
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
},
"devDependencies": { "devDependencies": {
"@babel/core": "^7.17.5", "@babel/core": "^7.17.5",
"@babel/runtime": "^7.17.2", "@babel/runtime": "^7.17.2",
@ -52,18 +50,71 @@
"@types/lodash": "^4.14.184", "@types/lodash": "^4.14.184",
"@woocommerce/eslint-plugin": "workspace:*", "@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*", "@woocommerce/internal-js-tests": "workspace:*",
"concurrently": "^7.0.0",
"eslint": "^8.32.0", "eslint": "^8.32.0",
"jest": "~27.5.1", "jest": "~27.5.1",
"jest-cli": "~27.5.1", "jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"rimraf": "^3.0.2", "rimraf": "^3.0.2",
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
}, },
"lint-staged": { "engines": {
"*.(t|j)s?(x)": [ "node": "^16.14.1",
"pnpm lint:fix", "pnpm": "^8.6.7"
"pnpm test-staged" },
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src"
] ]
} }
} }
}

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,31 +2,45 @@
"name": "@woocommerce/onboarding", "name": "@woocommerce/onboarding",
"version": "3.4.0", "version": "3.4.0",
"description": "Onboarding utilities.", "description": "Onboarding utilities.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"onboarding" "onboarding"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/onboarding/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/onboarding/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"publishConfig": { "types": "build-types",
"access": "public" "scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
},
"lint-staged": {
"*.(t|j)s?(x)": [
"pnpm lint:fix",
"pnpm test-staged"
]
}, },
"dependencies": { "dependencies": {
"@woocommerce/components": "workspace:*", "@woocommerce/components": "workspace:*",
@ -66,29 +80,103 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
"wireit": "^0.14.1"
}, },
"scripts": { "engines": {
"turbo:build": "pnpm run build:js && pnpm run build:css", "node": "^16.14.1",
"turbo:test": "jest --config ./jest.config.json", "pnpm": "^8.6.7"
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"lint": "eslint src",
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix",
"test-staged": "jest --bail --config ./jest.config.json --findRelatedTests"
}, },
"lint-staged": { "publishConfig": {
"*.(t|j)s?(x)": [ "access": "public"
"pnpm lint:fix", },
"pnpm test-staged" "wireit": {
"build:project:bundle": {
"command": "webpack",
"files": [
"webpack.config.js",
"src/**/*.scss"
],
"output": [
"build-style"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/tracks/",
"node_modules/@woocommerce/explat/",
"node_modules/@woocommerce/experimental/",
"node_modules/@woocommerce/components/",
"package.json",
"!node_modules/@woocommerce/components/node_modules",
"!node_modules/@woocommerce/components/.git",
"!node_modules/@woocommerce/components/.svn",
"!node_modules/@woocommerce/components/src",
"!node_modules/@woocommerce/experimental/node_modules",
"!node_modules/@woocommerce/experimental/.git",
"!node_modules/@woocommerce/experimental/.svn",
"!node_modules/@woocommerce/experimental/src",
"!node_modules/@woocommerce/explat/node_modules",
"!node_modules/@woocommerce/explat/.git",
"!node_modules/@woocommerce/explat/.svn",
"!node_modules/@woocommerce/explat/src",
"!node_modules/@woocommerce/tracks/node_modules",
"!node_modules/@woocommerce/tracks/.git",
"!node_modules/@woocommerce/tracks/.svn",
"!node_modules/@woocommerce/tracks/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src"
] ]
} }
} }
}

View File

@ -2,30 +2,42 @@
"name": "@woocommerce/product-editor", "name": "@woocommerce/product-editor",
"version": "1.1.0", "version": "1.1.0",
"description": "React components for the WooCommerce admin product editor.", "description": "React components for the WooCommerce admin product editor.",
"author": "Automattic",
"license": "GPL-2.0-or-later",
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce" "woocommerce"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/product-editor/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/product-editor/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-2.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js",
"module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index",
"sideEffects": [ "sideEffects": [
"build-style/**", "build-style/**",
"src/**/*.scss" "src/**/*.scss"
], ],
"publishConfig": { "main": "build/index.js",
"access": "public" "module": "build-module/index.js",
"react-native": "src/index",
"types": "build-types",
"scripts": {
"build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"build:project": "pnpm --if-present /^build:project:.*$/",
"build:project:bundle": "wireit",
"build:project:cjs": "wireit",
"build:project:esm": "wireit",
"changelog": "composer install && composer exec -- changelogger",
"lint": "pnpm --if-present '/^lint:lang:.*$/'",
"lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint:fix:lang:js": "eslint src --fix",
"lint:lang:js": "eslint src",
"prepack": "pnpm build",
"test:js": "wireit",
"watch:build": "pnpm build:project --watch"
}, },
"dependencies": { "dependencies": {
"@types/lodash": "^4.14.179", "@types/lodash": "^4.14.179",
@ -51,8 +63,8 @@
"@wordpress/data": "wp-6.0", "@wordpress/data": "wp-6.0",
"@wordpress/date": "wp-6.0", "@wordpress/date": "wp-6.0",
"@wordpress/deprecated": "wp-6.0", "@wordpress/deprecated": "wp-6.0",
"@wordpress/editor": "wp-6.0",
"@wordpress/edit-post": "wp-6.0", "@wordpress/edit-post": "wp-6.0",
"@wordpress/editor": "wp-6.0",
"@wordpress/element": "wp-6.0", "@wordpress/element": "wp-6.0",
"@wordpress/html-entities": "wp-6.0", "@wordpress/html-entities": "wp-6.0",
"@wordpress/i18n": "wp-6.0", "@wordpress/i18n": "wp-6.0",
@ -88,8 +100,8 @@
"@types/wordpress__core-data": "2.4.5", "@types/wordpress__core-data": "2.4.5",
"@types/wordpress__data": "6.0.2", "@types/wordpress__data": "6.0.2",
"@types/wordpress__date": "3.3.2", "@types/wordpress__date": "3.3.2",
"@types/wordpress__editor": "13.0.0",
"@types/wordpress__edit-post": "7.5.4", "@types/wordpress__edit-post": "7.5.4",
"@types/wordpress__editor": "13.0.0",
"@types/wordpress__keycodes": "2.3.1", "@types/wordpress__keycodes": "2.3.1",
"@types/wordpress__media-utils": "3.0.0", "@types/wordpress__media-utils": "3.0.0",
"@types/wordpress__plugins": "3.0.0", "@types/wordpress__plugins": "3.0.0",
@ -114,28 +126,135 @@
"ts-jest": "~29.1.1", "ts-jest": "~29.1.1",
"typescript": "^5.1.6", "typescript": "^5.1.6",
"webpack": "^5.70.0", "webpack": "^5.70.0",
"webpack-cli": "^3.3.12" "webpack-cli": "^3.3.12",
}, "wireit": "^0.14.1"
"scripts": {
"turbo:build": "pnpm run build:js && pnpm run build:css",
"turbo:test": "jest --config ./jest.config.json",
"prepare": "composer install",
"changelog": "composer exec -- changelogger",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"test": "pnpm test:js",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name",
"lint": "eslint src",
"build:js": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json",
"build:css": "webpack",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\" \"webpack --watch\"",
"prepack": "pnpm run clean && pnpm run build",
"lint:fix": "eslint src --fix"
}, },
"peerDependencies": { "peerDependencies": {
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@wordpress/data": "wp-6.0", "@wordpress/data": "wp-6.0",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
},
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:bundle": {
"command": "webpack",
"files": [
"webpack.config.js",
"src/**/*.scss"
],
"output": [
"build-style"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config ./jest.config.json --passWithNoTests",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/tracks/",
"node_modules/@woocommerce/number/",
"node_modules/@woocommerce/navigation/",
"node_modules/@woocommerce/experimental/",
"node_modules/@woocommerce/data/",
"node_modules/@woocommerce/customer-effort-score/",
"node_modules/@woocommerce/currency/",
"node_modules/@woocommerce/components/",
"node_modules/@woocommerce/block-templates/",
"node_modules/@woocommerce/admin-layout/",
"package.json",
"!node_modules/@woocommerce/admin-layout/node_modules",
"!node_modules/@woocommerce/admin-layout/.git",
"!node_modules/@woocommerce/admin-layout/.svn",
"!node_modules/@woocommerce/admin-layout/src",
"!node_modules/@woocommerce/block-templates/node_modules",
"!node_modules/@woocommerce/block-templates/.git",
"!node_modules/@woocommerce/block-templates/.svn",
"!node_modules/@woocommerce/block-templates/src",
"!node_modules/@woocommerce/components/node_modules",
"!node_modules/@woocommerce/components/.git",
"!node_modules/@woocommerce/components/.svn",
"!node_modules/@woocommerce/components/src",
"!node_modules/@woocommerce/currency/node_modules",
"!node_modules/@woocommerce/currency/.git",
"!node_modules/@woocommerce/currency/.svn",
"!node_modules/@woocommerce/currency/src",
"!node_modules/@woocommerce/customer-effort-score/node_modules",
"!node_modules/@woocommerce/customer-effort-score/.git",
"!node_modules/@woocommerce/customer-effort-score/.svn",
"!node_modules/@woocommerce/customer-effort-score/src",
"!node_modules/@woocommerce/data/node_modules",
"!node_modules/@woocommerce/data/.git",
"!node_modules/@woocommerce/data/.svn",
"!node_modules/@woocommerce/data/src",
"!node_modules/@woocommerce/experimental/node_modules",
"!node_modules/@woocommerce/experimental/.git",
"!node_modules/@woocommerce/experimental/.svn",
"!node_modules/@woocommerce/experimental/src",
"!node_modules/@woocommerce/navigation/node_modules",
"!node_modules/@woocommerce/navigation/.git",
"!node_modules/@woocommerce/navigation/.svn",
"!node_modules/@woocommerce/navigation/src",
"!node_modules/@woocommerce/number/node_modules",
"!node_modules/@woocommerce/number/.git",
"!node_modules/@woocommerce/number/.svn",
"!node_modules/@woocommerce/number/src",
"!node_modules/@woocommerce/tracks/node_modules",
"!node_modules/@woocommerce/tracks/.git",
"!node_modules/@woocommerce/tracks/.svn",
"!node_modules/@woocommerce/tracks/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src"
]
}
} }
} }

View File

@ -1,3 +0,0 @@
vendor
node_modules
.turbo

View File

@ -2,61 +2,104 @@
"name": "@woocommerce/tracks", "name": "@woocommerce/tracks",
"version": "1.3.0", "version": "1.3.0",
"description": "WooCommerce user event tracking utilities for Automattic based projects.", "description": "WooCommerce user event tracking utilities for Automattic based projects.",
"author": "Automattic",
"license": "GPL-3.0-or-later",
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"keywords": [ "keywords": [
"wordpress", "wordpress",
"woocommerce", "woocommerce",
"tracks" "tracks"
], ],
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/tracks/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/packages/js/tracks/README.md",
"bugs": {
"url": "https://github.com/woocommerce/woocommerce/issues"
},
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com/woocommerce/woocommerce.git" "url": "https://github.com/woocommerce/woocommerce.git"
}, },
"bugs": { "license": "GPL-3.0-or-later",
"url": "https://github.com/woocommerce/woocommerce/issues" "author": "Automattic",
},
"main": "build/index.js", "main": "build/index.js",
"module": "build-module/index.js", "module": "build-module/index.js",
"types": "build-types",
"react-native": "src/index", "react-native": "src/index",
"dependencies": { "types": "build-types",
"debug": "^4.3.3"
},
"publishConfig": {
"access": "public"
},
"scripts": { "scripts": {
"turbo:build": "tsc --project tsconfig.json && tsc --project tsconfig-cjs.json", "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"prepare": "composer install", "build:project": "pnpm --if-present /^build:project:.*$/",
"changelog": "composer exec -- changelogger", "build:project:cjs": "wireit",
"clean": "pnpm exec rimraf tsconfig.tsbuildinfo build build-*", "build:project:esm": "wireit",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "changelog": "composer install && composer exec -- changelogger",
"lint": "eslint src", "lint": "pnpm --if-present '/^lint:lang:.*$/'",
"start": "concurrently \"tsc --project tsconfig.json --watch\" \"tsc --project tsconfig-cjs.json --watch\"", "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"prepack": "pnpm run clean && pnpm run build", "lint:fix:lang:js": "eslint src --fix",
"lint:fix": "eslint src --fix" "lint:lang:js": "eslint src",
}, "prepack": "pnpm build",
"devDependencies": { "watch:build": "pnpm build:project --watch"
"@babel/core": "^7.17.5",
"@types/debug": "^4.1.7",
"@woocommerce/eslint-plugin": "workspace:*",
"eslint": "^8.32.0",
"jest": "~27.5.1",
"jest-cli": "~27.5.1",
"concurrently": "^7.0.0",
"rimraf": "^3.0.2",
"ts-jest": "~29.1.1",
"typescript": "^5.1.6"
}, },
"lint-staged": { "lint-staged": {
"*.(t|j)s?(x)": [ "*.(t|j)s?(x)": [
"pnpm lint:fix" "pnpm lint:fix"
] ]
},
"dependencies": {
"debug": "^4.3.3"
},
"devDependencies": {
"@babel/core": "^7.17.5",
"@types/debug": "^4.1.7",
"@woocommerce/eslint-plugin": "workspace:*",
"concurrently": "^7.0.0",
"eslint": "^8.32.0",
"jest": "~27.5.1",
"jest-cli": "~27.5.1",
"rimraf": "^3.0.2",
"ts-jest": "~29.1.1",
"typescript": "^5.1.6",
"wireit": "^0.14.1"
},
"engines": {
"node": "^16.14.1",
"pnpm": "^8.6.7"
},
"publishConfig": {
"access": "public"
},
"wireit": {
"build:project:cjs": {
"command": "tsc --project tsconfig-cjs.json",
"files": [
"tsconfig-cjs.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"build:project:esm": {
"command": "tsc --project tsconfig.json",
"files": [
"tsconfig.json",
"src/**/*.{js,jsx,ts,tsx}",
"typings/**/*.ts"
],
"output": [
"build-module",
"build-types"
],
"dependencies": [
"dependencyOutputs"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"package.json"
]
}
} }
} }

View File

@ -28,21 +28,21 @@ To enable Live(Hot) Reload when code is changed, run the following commands:
```text ```text
pnpm install pnpm install
pnpm run start pnpm start
``` ```
To build the /woo-ai/ plugin directory (when loading the plugin via symlink), run: To build the /woo-ai/ plugin directory (when loading the plugin via symlink), run:
```text ```text
pnpm install pnpm install
pnpm run build pnpm build
``` ```
To build the plugin ZIP file, run: To build the plugin ZIP file, run:
```text ```text
pnpm install pnpm install
pnpm run build:zip pnpm build:zip
``` ```
See [wp-scripts](https://github.com/WordPress/gutenberg/tree/master/packages/scripts) for more usage information. See [wp-scripts](https://github.com/WordPress/gutenberg/tree/master/packages/scripts) for more usage information.

View File

@ -12,7 +12,7 @@ mkdir -p "$DEST_PATH"
echo "Installing PHP and JS dependencies..." echo "Installing PHP and JS dependencies..."
pnpm install pnpm install
echo "Running JS Build..." echo "Running JS Build..."
pnpm -w run build --filter=woo-ai || exit "$?" pnpm --filter='@woocommerce/plugin-woo-ai' build || exit "$?"
echo "Syncing files..." echo "Syncing files..."
rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded

View File

@ -1,32 +1,48 @@
{ {
"name": "woo-ai", "name": "@woocommerce/plugin-woo-ai",
"version": "0.5.0",
"private": true,
"description": "Implementing WooCommerce AI Experiments.", "description": "Implementing WooCommerce AI Experiments.",
"license": "GPL-2.0", "homepage": "http://github.com/woocommerce/woo-ai",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/woocommerce/woo-ai.git" "url": "git://github.com/woocommerce/woo-ai.git"
}, },
"title": "Woo AI", "license": "GPL-2.0",
"version": "0.5.0", "scripts": {
"homepage": "http://github.com/woocommerce/woo-ai", "build": "pnpm build:admin && pnpm uglify",
"devDependencies": { "build:admin": "wp-scripts build",
"@svgr/webpack": "^8.1.0", "build:dev": "pnpm lint:js && pnpm build",
"@types/debug": "^4.1.7", "build:zip": "./bin/build-zip.sh",
"@types/jquery": "^3.5.16", "changelog": "composer exec -- changelogger",
"@types/react": "^17.0.2", "check-engines": "wp-scripts check-engines",
"@types/react-dom": "^17.0.2", "check-licenses": "wp-scripts check-licenses",
"@types/wordpress__components": "^19.10.3", "format:js": "wp-scripts format-js",
"@woocommerce/dependency-extraction-webpack-plugin": "workspace:*", "postinstall": "composer install",
"@woocommerce/eslint-plugin": "workspace:*", "lint:css": "wp-scripts lint-style",
"@wordpress/data": "wp-6.0", "lint:css:fix": "wp-scripts lint-style --fix",
"@wordpress/env": "^8.2.0", "lint:js": "wp-scripts lint-js",
"@wordpress/prettier-config": "2.17.0", "lint:js:fix": "wp-scripts lint-js --fix",
"@wordpress/scripts": "^19.2.4", "lint:md:docs": "wp-scripts lint-md-docs",
"eslint": "^8.32.0", "lint:md:js": "wp-scripts lint-md-js",
"prettier": "npm:wp-prettier@^2.6.2", "lint:pkg-json": "wp-scripts lint-pkg-json",
"ts-loader": "^9.4.1", "packages-update": "wp-scripts packages-update",
"typescript": "^5.1.6", "start": "wp-scripts start",
"uglify-js": "^3.5.3" "test:e2e": "wp-scripts test-e2e",
"test:unit": "wp-scripts test-unit-js",
"uglify": "rm -f $npm_package_assets_js_min && for f in $npm_package_assets_js_js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done"
},
"lint-staged": {
"*.php": [
"php -d display_errors=1 -l",
"composer run-script phpcs-pre-commit"
],
"*.(t|j)s?(x)": [
"npm run lint:js:fix"
],
"*.scss": [
"npm run lint:css:fix"
]
}, },
"dependencies": { "dependencies": {
"@automattic/tour-kit": "^1.1.1", "@automattic/tour-kit": "^1.1.1",
@ -49,50 +65,35 @@
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"react-query": "^3.39.3" "react-query": "^3.39.3"
}, },
"devDependencies": {
"@svgr/webpack": "^8.1.0",
"@types/debug": "^4.1.7",
"@types/jquery": "^3.5.16",
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@types/wordpress__components": "^19.10.3",
"@woocommerce/dependency-extraction-webpack-plugin": "workspace:*",
"@woocommerce/eslint-plugin": "workspace:*",
"@wordpress/data": "wp-6.0",
"@wordpress/env": "^8.2.0",
"@wordpress/prettier-config": "2.17.0",
"@wordpress/scripts": "^19.2.4",
"eslint": "^8.32.0",
"prettier": "npm:wp-prettier@^2.6.2",
"ts-loader": "^9.4.1",
"typescript": "^5.1.6",
"uglify-js": "^3.5.3",
"wireit": "^0.14.1"
},
"peerDependencies": { "peerDependencies": {
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2", "@types/react-dom": "^17.0.2",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
}, },
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"turbo:build": "pnpm run build:admin && pnpm run uglify",
"build:admin": "wp-scripts build",
"build:zip": "./bin/build-zip.sh",
"build:dev": "pnpm run lint:js && pnpm run build",
"uglify": "rm -f $npm_package_assets_js_min && for f in $npm_package_assets_js_js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"format:js": "wp-scripts format-js",
"lint:css": "wp-scripts lint-style",
"lint:css:fix": "wp-scripts lint-style --fix",
"lint:js": "wp-scripts lint-js",
"lint:js:fix": "wp-scripts lint-js --fix",
"lint:md:docs": "wp-scripts lint-md-docs",
"lint:md:js": "wp-scripts lint-md-js",
"lint:pkg-json": "wp-scripts lint-pkg-json",
"packages-update": "wp-scripts packages-update",
"start": "wp-scripts start",
"test:e2e": "wp-scripts test-e2e",
"test:unit": "wp-scripts test-unit-js"
},
"engines": { "engines": {
"node": "^16.14.1", "node": "^16.14.1",
"pnpm": "^8.6.7" "pnpm": "^8.6.7"
}, },
"lint-staged": { "title": "Woo AI"
"*.php": [
"php -d display_errors=1 -l",
"composer run-script phpcs-pre-commit"
],
"*.(t|j)s?(x)": [
"npm run lint:js:fix"
],
"*.scss": [
"npm run lint:css:fix"
]
}
} }

View File

@ -7,7 +7,7 @@ Compile a publishable JSON object of WooCommerce's JavaScript filters and slotFi
Generate a new reference found at `bin/hook-reference/data.json` by running the following command. Generate a new reference found at `bin/hook-reference/data.json` by running the following command.
``` ```
pnpm run create-hook-reference pnpm create-hook-reference
``` ```
The data includes references to code in the Github repository by commit hash, so it is essential to commit the resulting data in a pull request to `main` so code references are publicly available. The data includes references to code in the Github repository by commit hash, so it is essential to commit the resulting data in a pull request to `main` so code references are publicly available.

View File

@ -14,7 +14,7 @@ Build the example extension by running the pnpm script and passing the example n
```bash ```bash
WC_EXT=<example> pnpm --filter=woocommerce/client/admin example WC_EXT=<example> pnpm --filter=@woocommerce/admin-library example
``` ```
You should see a new directory in `./woocommerce/plugins/{example} path.` Include the output plugin in your `.wp-env.json` or `.wp-env.override.json` and restart the WordPress instance. WooCommerce will now reflect the changes made by the example extension. You should see a new directory in `./woocommerce/plugins/{example} path.` Include the output plugin in your `.wp-env.json` or `.wp-env.override.json` and restart the WordPress instance. WooCommerce will now reflect the changes made by the example extension.

View File

@ -10,7 +10,7 @@ This feature is hidden behind a feature flag and can be turned on or off by visi
The fastest way to get started is by creating an example plugin from WooCommerce Admin. Enter the following command: The fastest way to get started is by creating an example plugin from WooCommerce Admin. Enter the following command:
`WC_EXT=add-navigation-items pnpm example --filter=woocommerce/client/admin` `WC_EXT=add-navigation-items pnpm example --filter=@woocommerce/admin-library`
This will create a new plugin that covers various features of the navigation and helps to register some initial items and categories within the new navigation menu. After running the command above, you can make edits directly to the files at `docs/examples/extensions/add-navigation-items` and they will be built and copied to your `wp-content/add-navigation-items` folder on save. This will create a new plugin that covers various features of the navigation and helps to register some initial items and categories within the new navigation menu. After running the command above, you can make edits directly to the files at `docs/examples/extensions/add-navigation-items` and they will be built and copied to your `wp-content/add-navigation-items` folder on save.

View File

@ -10,7 +10,7 @@ Gateway suggestions are retrieved from a REST API and can be added via a remote
To quickly get started with an example plugin, run the following: To quickly get started with an example plugin, run the following:
`WC_EXT=payment-gateway-suggestions pnpm example --filter=woocommerce/client/admin` `WC_EXT=payment-gateway-suggestions pnpm example --filter=@woocommerce/admin-library`
This will create a new plugin that when activated will add two new gateway suggestions. The first is a simple gateway demonstrating how configuration fields can be pulled from the gateway class to create a configuration form. The second gateway shows a more customized approach via SlotFill. This will create a new plugin that when activated will add two new gateway suggestions. The first is a simple gateway demonstrating how configuration fields can be pulled from the gateway class to create a configuration form. The second gateway shows a more customized approach via SlotFill.

View File

@ -1,59 +1,46 @@
{ {
"name": "woocommerce/client/admin", "name": "@woocommerce/admin-library",
"version": "3.3.0", "version": "3.3.0",
"license": "GPL-3.0-or-later", "private": true,
"author": "Automattic",
"homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce-admin/README.md", "homepage": "https://github.com/woocommerce/woocommerce/tree/trunk/plugins/woocommerce-admin/README.md",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "https://github.com:woocommerce/woocommerce.git" "url": "https://github.com:woocommerce/woocommerce.git"
}, },
"license": "GPL-3.0-or-later",
"author": "Automattic",
"files": [
"build"
],
"scripts": { "scripts": {
"changelog": "pnpm --filter=woocommerce -r run changelog ", "build": "pnpm --if-present --filter=\"$npm_package_name...\" build:project",
"turbo:build": "pnpm run clean && cross-env NODE_ENV=production WC_ADMIN_PHASE=core webpack", "build:project": "pnpm --if-present /^build:project:.*$/",
"turbo:test": "pnpm run test:client", "build:project:bundle": "wireit",
"analyze": "cross-env NODE_ENV=production ANALYZE=true webpack", "build:project:feature-config": "php ../woocommerce/bin/generate-feature-config.php",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name", "changelog": "composer install && composer exec -- changelogger",
"test": "pnpm test:js", "lint": "pnpm --if-present '/^lint:lang:.*$/'",
"test:js": "pnpm -w exec turbo run turbo:test --filter=$npm_package_name", "lint:fix": "pnpm --if-present '/^lint:fix:lang:.*$/'",
"lint": "pnpm run lint:js && pnpm run lint:css", "lint:fix:lang:css": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'",
"build:feature-config": "php ../woocommerce/bin/generate-feature-config.php", "lint:fix:lang:js": "pnpm lint:js --fix --ext=js,ts,tsx",
"clean": "rimraf ../woocommerce/assets/client/admin/*", "lint:lang:css": "stylelint '**/*.scss'",
"client:watch": "cross-env WC_ADMIN_PHASE=development pnpm run build:feature-config && cross-env WC_ADMIN_PHASE=development webpack --watch", "lint:lang:js": "eslint ./client --ext=js,ts,tsx",
"create-hook-reference": "node ./bin/hook-reference/index.js", "test:js": "wireit",
"create-wc-extension": "pnpm -w run create-extension", "watch:build": "pnpm build:project --watch"
"dev": "cross-env WC_ADMIN_PHASE=development pnpm run build:feature-config && cross-env WC_ADMIN_PHASE=development pnpm -w run build --filter='./packages/js/*' && cross-env WC_ADMIN_PHASE=development webpack", },
"example": "webpack --config docs/examples/extensions/examples.config.js --watch", "lint-staged": {
"preinstall": "npx only-allow pnpm", "*.scss": [
"lint:fix": "pnpm lint:js-fix && pnpm lint:css-fix", "pnpm lint:css-fix"
"lint:css": "stylelint '**/*.scss'", ],
"lint:css-fix": "stylelint '**/*.scss' --fix --ip 'storybook/wordpress'", "client/**/*.(t|j)s?(x)": [
"lint:js": "eslint ./client --ext=js,ts,tsx", "pnpm lint:js-pre-commit",
"lint:js-fix": "pnpm run lint:js --fix --ext=js,ts,tsx", "pnpm test-staged"
"lint:js-packages": "eslint ../../packages/js --ext=js,ts,tsx", ]
"lint:js-pre-commit": "eslint --ext=js,ts,tsx",
"prepack": "pnpm install && pnpm run lint && pnpm run test && cross-env WC_ADMIN_PHASE=core pnpm run build",
"packages:fix:textdomain": "node ./bin/package-update-textdomain.js",
"packages:build": "pnpm run:packages -- build",
"packages:watch": "pnpm run:packages -- start",
"run:packages": "pnpm run --parallel --filter='../../packages/js/**'",
"prestart": "pnpm packages:build && cross-env WC_ADMIN_PHASE=development pnpm run build:feature-config",
"start": "concurrently \"cross-env WC_ADMIN_PHASE=development webpack --watch\" \"cross-env WC_ADMIN_PHASE=development pnpm packages:watch\"",
"start:hot": "pnpm prestart && concurrently \"cross-env HOT=true WC_ADMIN_PHASE=development webpack serve\" \"cross-env WC_ADMIN_PHASE=development pnpm packages:watch\"",
"test-staged": "pnpm run test:client --bail --findRelatedTests",
"test:client": "jest --config client/jest.config.js",
"test:debug": "node --inspect-brk ./node_modules/.bin/jest --config client/jest.config.js --watch --runInBand --no-cache",
"test:help": "wp-scripts test-unit-js --help",
"test:update-snapshots": "pnpm run test:client --updateSnapshot && pnpm run --filter @woocommerce/components test:update-snapshots",
"test:watch": "pnpm run test:client --watch",
"ts:check": "tsc --project tsconfig.json --pretty",
"ts:check:watch": "npm run ts:check -- --watch"
}, },
"dependencies": { "dependencies": {
"@automattic/components": "^2.0.1",
"@automattic/explat-client": "^0.0.3", "@automattic/explat-client": "^0.0.3",
"@automattic/explat-client-react-helpers": "^0.0.4", "@automattic/explat-client-react-helpers": "^0.0.4",
"@automattic/interpolate-components": "^1.2.0", "@automattic/interpolate-components": "^1.2.0",
"@automattic/components": "^2.0.1",
"@react-spring/web": "^9.4.3", "@react-spring/web": "^9.4.3",
"@types/wordpress__blocks": "11.0.7", "@types/wordpress__blocks": "11.0.7",
"@woocommerce/api": "^0.2.0", "@woocommerce/api": "^0.2.0",
@ -237,22 +224,148 @@
"webpack-dev-server": "^4.11.1", "webpack-dev-server": "^4.11.1",
"webpack-fix-style-only-entries": "^0.6.1", "webpack-fix-style-only-entries": "^0.6.1",
"webpack-merge": "^5.8.0", "webpack-merge": "^5.8.0",
"webpack-rtl-plugin": "^2.0.0" "webpack-rtl-plugin": "^2.0.0",
"wireit": "^0.14.1"
}, },
"peerDependencies": { "peerDependencies": {
"@wordpress/data": "wp-6.0" "@wordpress/data": "wp-6.0"
}, },
"lint-staged": {
"*.scss": [
"pnpm lint:css-fix"
],
"client/**/*.(t|j)s?(x)": [
"pnpm lint:js-pre-commit",
"pnpm test-staged"
]
},
"engines": { "engines": {
"node": "^16.14.1", "node": "^16.14.1",
"pnpm": "^8.6.7" "pnpm": "^8.6.7"
},
"wireit": {
"build:project:bundle": {
"command": "webpack",
"env": {
"NODE_ENV": "production",
"WC_ADMIN_PHASE": "core"
},
"files": [
"webpack.config.js",
"tsconfig.json",
"client/**/*.{js,jsx,ts,tsx}",
"client/**/*.scss"
],
"output": [
"build"
],
"dependencies": [
"dependencyOutputs"
]
},
"test:js": {
"command": "jest --config client/jest.config.js",
"dependencies": [
"build:project"
]
},
"dependencyOutputs": {
"allowUsuallyExcludedPaths": true,
"files": [
"node_modules/@woocommerce/tracks/",
"node_modules/@woocommerce/product-editor/",
"node_modules/@woocommerce/onboarding/",
"node_modules/@woocommerce/number/",
"node_modules/@woocommerce/notices/",
"node_modules/@woocommerce/navigation/",
"node_modules/@woocommerce/internal-style-build/",
"node_modules/@woocommerce/internal-js-tests/",
"node_modules/@woocommerce/explat/",
"node_modules/@woocommerce/experimental/",
"node_modules/@woocommerce/eslint-plugin/configs",
"node_modules/@woocommerce/eslint-plugin/rules",
"node_modules/@woocommerce/eslint-plugin/index.js",
"node_modules/@woocommerce/dependency-extraction-webpack-plugin/",
"node_modules/@woocommerce/date/",
"node_modules/@woocommerce/data/",
"node_modules/@woocommerce/customer-effort-score/",
"node_modules/@woocommerce/currency/",
"node_modules/@woocommerce/csv-export/",
"node_modules/@woocommerce/components/",
"node_modules/@woocommerce/ai/",
"node_modules/@woocommerce/admin-layout/",
"node_modules/@woocommerce/admin-e2e-tests/build/",
"package.json",
"!node_modules/@woocommerce/admin-e2e-tests/*.ts.map",
"!node_modules/@woocommerce/admin-e2e-tests/*.tsbuildinfo",
"!node_modules/@woocommerce/admin-layout/node_modules",
"!node_modules/@woocommerce/admin-layout/.git",
"!node_modules/@woocommerce/admin-layout/.svn",
"!node_modules/@woocommerce/admin-layout/src",
"!node_modules/@woocommerce/ai/node_modules",
"!node_modules/@woocommerce/ai/.git",
"!node_modules/@woocommerce/ai/.svn",
"!node_modules/@woocommerce/ai/src",
"!node_modules/@woocommerce/components/node_modules",
"!node_modules/@woocommerce/components/.git",
"!node_modules/@woocommerce/components/.svn",
"!node_modules/@woocommerce/components/src",
"!node_modules/@woocommerce/csv-export/node_modules",
"!node_modules/@woocommerce/csv-export/.git",
"!node_modules/@woocommerce/csv-export/.svn",
"!node_modules/@woocommerce/csv-export/src",
"!node_modules/@woocommerce/currency/node_modules",
"!node_modules/@woocommerce/currency/.git",
"!node_modules/@woocommerce/currency/.svn",
"!node_modules/@woocommerce/currency/src",
"!node_modules/@woocommerce/customer-effort-score/node_modules",
"!node_modules/@woocommerce/customer-effort-score/.git",
"!node_modules/@woocommerce/customer-effort-score/.svn",
"!node_modules/@woocommerce/customer-effort-score/src",
"!node_modules/@woocommerce/data/node_modules",
"!node_modules/@woocommerce/data/.git",
"!node_modules/@woocommerce/data/.svn",
"!node_modules/@woocommerce/data/src",
"!node_modules/@woocommerce/date/node_modules",
"!node_modules/@woocommerce/date/.git",
"!node_modules/@woocommerce/date/.svn",
"!node_modules/@woocommerce/date/src",
"!node_modules/@woocommerce/dependency-extraction-webpack-plugin/node_modules",
"!node_modules/@woocommerce/dependency-extraction-webpack-plugin/.git",
"!node_modules/@woocommerce/dependency-extraction-webpack-plugin/.svn",
"!node_modules/@woocommerce/dependency-extraction-webpack-plugin/src",
"!node_modules/@woocommerce/experimental/node_modules",
"!node_modules/@woocommerce/experimental/.git",
"!node_modules/@woocommerce/experimental/.svn",
"!node_modules/@woocommerce/experimental/src",
"!node_modules/@woocommerce/explat/node_modules",
"!node_modules/@woocommerce/explat/.git",
"!node_modules/@woocommerce/explat/.svn",
"!node_modules/@woocommerce/explat/src",
"!node_modules/@woocommerce/internal-js-tests/node_modules",
"!node_modules/@woocommerce/internal-js-tests/.git",
"!node_modules/@woocommerce/internal-js-tests/.svn",
"!node_modules/@woocommerce/internal-js-tests/src",
"!node_modules/@woocommerce/internal-style-build/node_modules",
"!node_modules/@woocommerce/internal-style-build/.git",
"!node_modules/@woocommerce/internal-style-build/.svn",
"!node_modules/@woocommerce/internal-style-build/src",
"!node_modules/@woocommerce/navigation/node_modules",
"!node_modules/@woocommerce/navigation/.git",
"!node_modules/@woocommerce/navigation/.svn",
"!node_modules/@woocommerce/navigation/src",
"!node_modules/@woocommerce/notices/node_modules",
"!node_modules/@woocommerce/notices/.git",
"!node_modules/@woocommerce/notices/.svn",
"!node_modules/@woocommerce/notices/src",
"!node_modules/@woocommerce/number/node_modules",
"!node_modules/@woocommerce/number/.git",
"!node_modules/@woocommerce/number/.svn",
"!node_modules/@woocommerce/number/src",
"!node_modules/@woocommerce/onboarding/node_modules",
"!node_modules/@woocommerce/onboarding/.git",
"!node_modules/@woocommerce/onboarding/.svn",
"!node_modules/@woocommerce/onboarding/src",
"!node_modules/@woocommerce/product-editor/node_modules",
"!node_modules/@woocommerce/product-editor/.git",
"!node_modules/@woocommerce/product-editor/.svn",
"!node_modules/@woocommerce/product-editor/src",
"!node_modules/@woocommerce/tracks/node_modules",
"!node_modules/@woocommerce/tracks/.git",
"!node_modules/@woocommerce/tracks/.svn",
"!node_modules/@woocommerce/tracks/src"
]
}
} }
} }

View File

@ -102,7 +102,7 @@ const webpackConfig = {
: `[name]/index${ outputSuffix }.js`; : `[name]/index${ outputSuffix }.js`;
}, },
chunkFilename: `chunks/[name]${ outputSuffix }.js`, chunkFilename: `chunks/[name]${ outputSuffix }.js`,
path: path.join( __dirname, '/../woocommerce/assets/client/admin' ), path: path.join( __dirname, '/build' ),
library: { library: {
// Expose the exports of entry points so we can consume the libraries in window.wc.[modulename] with WooCommerceDependencyExtractionWebpackPlugin. // Expose the exports of entry points so we can consume the libraries in window.wc.[modulename] with WooCommerceDependencyExtractionWebpackPlugin.
name: [ 'wc', '[modulename]' ], name: [ 'wc', '[modulename]' ],

View File

@ -11,8 +11,8 @@ You can either install the latest version from [wp.org](https://wordpress.org/pl
To get started, run the following commands: To get started, run the following commands:
```text ```text
pnpm install pnpm --filter=@woocommerce/plugin-woocommerce-beta-tester install
pnpm run start pnpm --filter=@woocommerce/plugin-woocommerce-beta-tester start
``` ```
See [wp-scripts](https://github.com/WordPress/gutenberg/tree/master/packages/scripts) for more usage information. See [wp-scripts](https://github.com/WordPress/gutenberg/tree/master/packages/scripts) for more usage information.

View File

@ -12,7 +12,7 @@ mkdir -p "$DEST_PATH"
echo "Installing PHP and JS dependencies..." echo "Installing PHP and JS dependencies..."
pnpm install pnpm install
echo "Running JS Build..." echo "Running JS Build..."
pnpm -w run build --filter=woocommerce-beta-tester || exit "$?" pnpm --filter='@woocommerce/plugin-woocommerce-beta-tester' build || exit "$?"
echo "Syncing files..." echo "Syncing files..."
rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded rsync -rc --exclude-from="$PROJECT_PATH/.distignore" "$PROJECT_PATH/" "$DEST_PATH/" --delete --delete-excluded

View File

@ -1,29 +1,59 @@
{ {
"name": "woocommerce-beta-tester", "name": "@woocommerce/plugin-woocommerce-beta-tester",
"version": "2.3.0",
"private": true,
"description": "Setting up the local beta tester scripts.", "description": "Setting up the local beta tester scripts.",
"license": "GPL-2.0", "homepage": "http://github.com/woocommerce/woocommerce-beta-tester",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/woocommerce/woocommerce-beta-tester.git" "url": "git://github.com/woocommerce/woocommerce-beta-tester.git"
}, },
"title": "WooCommerce Beta Tester", "license": "GPL-2.0",
"version": "2.3.0", "assets": {
"homepage": "http://github.com/woocommerce/woocommerce-beta-tester", "js": {
"devDependencies": { "min": "assets/js/*.min.js",
"@types/react": "^17.0.2", "js": "assets/js/*.js"
"@types/react-dom": "^17.0.2", }
"@types/wordpress__components": "^19.10.3", },
"@types/wordpress__plugins": "3.0.0", "scripts": {
"@woocommerce/dependency-extraction-webpack-plugin": "workspace:*", "build": "pnpm build:admin && pnpm uglify",
"@woocommerce/eslint-plugin": "workspace:*", "build:admin": "wp-scripts build",
"@wordpress/env": "^8.2.0", "build:dev": "pnpm lint:js && pnpm build",
"@wordpress/prettier-config": "2.17.0", "build:zip": "./bin/build-zip.sh",
"@wordpress/scripts": "^19.2.4", "changelog": "composer exec -- changelogger",
"eslint": "^8.32.0", "check-engines": "wp-scripts check-engines",
"prettier": "npm:wp-prettier@^2.8.5", "check-licenses": "wp-scripts check-licenses",
"ts-loader": "^9.4.1", "format:js": "wp-scripts format-js",
"typescript": "^5.1.6", "postinstall": "composer install",
"uglify-js": "^3.5.3" "lint:css": "wp-scripts lint-style",
"lint:css:fix": "wp-scripts lint-style --fix",
"lint:js": "wp-scripts lint-js",
"lint:js:fix": "wp-scripts lint-js --fix",
"lint:md:docs": "wp-scripts lint-md-docs",
"lint:md:js": "wp-scripts lint-md-js",
"lint:php": "composer run-script phpcs",
"lint:php:fix": "composer run-script phpcbf",
"lint:pkg-json": "wp-scripts lint-pkg-json",
"packages-update": "wp-scripts packages-update",
"start": "wp-scripts start",
"test:e2e": "wp-scripts test-e2e",
"test:unit": "wp-scripts test-unit-js",
"uglify": "rm -f $npm_package_assets_js_min && for f in $npm_package_assets_js_js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done"
},
"lint-staged": {
"*.php": [
"php -d display_errors=1 -l",
"composer run-script phpcs-pre-commit"
],
"*.(t|j)s?(x)": [
"npm run lint:js:fix"
],
"*.scss": [
"npm run lint:css:fix"
]
},
"config": {
"build_step": "pnpm build:zip"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.10.4", "@emotion/react": "^11.10.4",
@ -45,61 +75,32 @@
"@wordpress/plugins": "wp-6.0", "@wordpress/plugins": "wp-6.0",
"prop-types": "^15.8.1" "prop-types": "^15.8.1"
}, },
"devDependencies": {
"@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2",
"@types/wordpress__components": "^19.10.3",
"@types/wordpress__plugins": "3.0.0",
"@woocommerce/dependency-extraction-webpack-plugin": "workspace:*",
"@woocommerce/eslint-plugin": "workspace:*",
"@wordpress/env": "^8.2.0",
"@wordpress/prettier-config": "2.17.0",
"@wordpress/scripts": "^19.2.4",
"eslint": "^8.32.0",
"prettier": "npm:wp-prettier@^2.8.5",
"ts-loader": "^9.4.1",
"typescript": "^5.1.6",
"uglify-js": "^3.5.3",
"wireit": "^0.14.1"
},
"peerDependencies": { "peerDependencies": {
"@types/react": "^17.0.2", "@types/react": "^17.0.2",
"@types/react-dom": "^17.0.2", "@types/react-dom": "^17.0.2",
"react": "^17.0.2", "react": "^17.0.2",
"react-dom": "^17.0.2" "react-dom": "^17.0.2"
}, },
"assets": {
"js": {
"min": "assets/js/*.min.js",
"js": "assets/js/*.js"
}
},
"config": {
"build_step": "pnpm run build:zip"
},
"scripts": {
"postinstall": "composer install",
"changelog": "composer exec -- changelogger",
"build": "pnpm -w exec turbo run turbo:build --filter=$npm_package_name",
"turbo:build": "pnpm run build:admin && pnpm run uglify",
"build:admin": "wp-scripts build",
"build:zip": "./bin/build-zip.sh",
"build:dev": "pnpm run lint:js && pnpm run build",
"uglify": "rm -f $npm_package_assets_js_min && for f in $npm_package_assets_js_js; do file=${f%.js}; node_modules/.bin/uglifyjs $f -c -m > $file.min.js; done",
"check-engines": "wp-scripts check-engines",
"check-licenses": "wp-scripts check-licenses",
"format:js": "wp-scripts format-js",
"lint:css": "wp-scripts lint-style",
"lint:css:fix": "wp-scripts lint-style --fix",
"lint:php": "composer run-script phpcs",
"lint:php:fix": "composer run-script phpcbf",
"lint:js": "wp-scripts lint-js",
"lint:js:fix": "wp-scripts lint-js --fix",
"lint:md:docs": "wp-scripts lint-md-docs",
"lint:md:js": "wp-scripts lint-md-js",
"lint:pkg-json": "wp-scripts lint-pkg-json",
"packages-update": "wp-scripts packages-update",
"start": "wp-scripts start",
"test:e2e": "wp-scripts test-e2e",
"test:unit": "wp-scripts test-unit-js"
},
"engines": { "engines": {
"node": "^16.14.1", "node": "^16.14.1",
"pnpm": "^8.6.7" "pnpm": "^8.6.7"
}, },
"lint-staged": { "title": "WooCommerce Beta Tester"
"*.php": [
"php -d display_errors=1 -l",
"composer run-script phpcs-pre-commit"
],
"*.(t|j)s?(x)": [
"npm run lint:js:fix"
],
"*.scss": [
"npm run lint:css:fix"
]
}
} }

View File

@ -1,21 +1,22 @@
{ {
"name": "woocommerce-docs", "name": "@woocommerce/plugin-woocommerce-docs",
"version": "1.0.0", "version": "1.0.0",
"private": true,
"description": "WooCommerce Docs Plugin", "description": "WooCommerce Docs Plugin",
"keywords": [],
"license": "GPL-3.0+",
"author": "",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"build": "wp-scripts build", "build": "wp-scripts build",
"start": "wp-scripts start",
"postinstall": "composer install", "postinstall": "composer install",
"start": "wp-scripts start",
"test": "pnpm test:php", "test": "pnpm test:php",
"test:env-setup": "pnpm test:env:start",
"test:env:start": "wp-env start && wp-env run cli --env-cwd=wp-content/plugins/woocommerce-docs composer install", "test:env:start": "wp-env start && wp-env run cli --env-cwd=wp-content/plugins/woocommerce-docs composer install",
"test:php": "wp-env run tests-cli vendor/bin/phpunit --env-cwd=wp-content/plugins/woocommerce-docs", "test:php": "wp-env run tests-cli vendor/bin/phpunit --env-cwd=wp-content/plugins/woocommerce-docs",
"test:env-setup": "pnpm test:env:start",
"test:unit": "pnpm test:env:start && pnpm test:php" "test:unit": "pnpm test:env:start && pnpm test:php"
}, },
"keywords": [],
"author": "",
"license": "GPL-3.0+",
"dependencies": { "dependencies": {
"@wordpress/api-fetch": "wp-6.0", "@wordpress/api-fetch": "wp-6.0",
"@wordpress/components": "wp-6.0", "@wordpress/components": "wp-6.0",
@ -38,6 +39,7 @@
"prettier": "npm:wp-prettier@^2.6.2", "prettier": "npm:wp-prettier@^2.6.2",
"ts-loader": "^9.4.1", "ts-loader": "^9.4.1",
"ts-node": "^10.9.1", "ts-node": "^10.9.1",
"typescript": "^5.1.6" "typescript": "^5.1.6",
"wireit": "^0.14.1"
} }
} }

Some files were not shown because too many files have changed in this diff Show More