Skip to content

Commit

Permalink
Monorepo: Reorganize all projects (#18257)
Browse files Browse the repository at this point in the history
Co-authored-by: Brandon Kraft <[email protected]>
Co-authored-by: Brad Jorsch <[email protected]>
Co-authored-by: Yaroslav Kukharuk <[email protected]>
  • Loading branch information
3 people authored Jan 14, 2021
1 parent 0501796 commit e13487d
Show file tree
Hide file tree
Showing 3,213 changed files with 26,091 additions and 21,094 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
46 changes: 29 additions & 17 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,33 @@
*.min.js
/3rd-party/debug-bar/debug-bar.js
/_inc/blocks
/_inc/build
/_inc/client/**/test/*.js
/_inc/jetpack-modules.models.js
/_inc/postmessage.js
/docker/wordpress-develop/
/docker/wordpress/
/modules/custom-css/custom-css/js/core-customizer-css-preview.js
/modules/custom-css/custom-css/js/core-customizer-css.core-4.9.js
/modules/custom-css/custom-css/js/core-customizer-css.js
/packages/lazy-images/src/js/IntersectionObserver-polyfill.js
/packages/*/vendor
/packages/*/wordpress

/modules/widgets/search/js/search-widget-admin.js
### Root
tools/docker/wordpress-develop/
tools/docker/wordpress/

/vendor/

*.min.js

# Ignored by default, but we should check it
!.github/

### Jetpack
projects/plugins/jetpack/3rd-party/debug-bar/debug-bar.js
projects/plugins/jetpack/_inc/blocks
projects/plugins/jetpack/_inc/build
projects/plugins/jetpack/_inc/client/**/test/*.js
projects/plugins/jetpack/_inc/jetpack-modules.models.js
projects/plugins/jetpack/_inc/postmessage.js

projects/plugins/jetpack/modules/custom-css/custom-css/js/core-customizer-css-preview.js
projects/plugins/jetpack/modules/custom-css/custom-css/js/core-customizer-css.core-4.9.js
projects/plugins/jetpack/modules/custom-css/custom-css/js/core-customizer-css.js
projects/plugins/jetpack/modules/widgets/search/js/search-widget-admin.js

projects/plugins/jetpack/vendor/

# Temporary ignore until Jest is set up
projects/plugins/jetpack/extensions/**/test/

### Packages
projects/packages/lazy-images/src/js/IntersectionObserver-polyfill.js
projects/packages/*/vendor
projects/packages/*/wordpress
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ module.exports = {
mocha: true,
node: true,
jquery: true,
jest: true
},
parserOptions: {
ecmaVersion: 2019,
Expand Down
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
############################################

# Individual Modules:
/modules/search/ @Automattic/jetpack-search
/projects/plugins/jetpack/modules/search/ @Automattic/jetpack-search

# Other bits of the Codebase
/_inc/lib/debugger/ @kraftbj
/_inc/lib/jetpack-wpes-query-builder/ @gibrown
/projects/plugins/jetpack/_inc/lib/debugger/ @kraftbj
/projects/plugins/jetpack/_inc/lib/jetpack-wpes-query-builder/ @gibrown

# Functionality that is important to our partners
/class.jetpack-cli.php @automattic/jetpack-infinity
/bin/partner-provision.sh @automattic/jetpack-infinity
/bin/partner-cancel.sh @automattic/jetpack-infinity
/projects/plugins/jetpack/class.jetpack-cli.php @automattic/jetpack-infinity
/tools/partner-provision.sh @automattic/jetpack-infinity
/tools/partner-cancel.sh @automattic/jetpack-infinity
25 changes: 10 additions & 15 deletions .github/actions/php-pipeline/setup-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,18 @@ if [[ -n "$GITHUB_PATH" ]]; then
echo "$COMPOSER_BIN_DIR" >> $GITHUB_PATH
fi

# Don't symlink, it breaks when copied later.
export COMPOSER_MIRROR_PATH_REPOS=true

# Configure PHP and PHPUnit environment
cd projects/plugins/jetpack
composer install
if [[ ${PHP_VERSION:0:2} == "8." ]]; then
composer install --ignore-platform-reqs
composer global require "phpunit/phpunit=7.5.*" --ignore-platform-reqs
elif [[ ${PHP_VERSION:0:3} == "7.0" ]]; then
composer remove sirbrillig/phpcs-changed automattic/jetpack-codesniffer --dev
composer install
composer global require "phpunit/phpunit=6.5.*" --no-suggest
elif [[ ${PHP_VERSION:0:2} == "7." ]]; then
composer install
composer global require "phpunit/phpunit=7.5.*" --no-suggest
elif [[ ${PHP_VERSION:0:2} == "5." ]]; then
composer remove sirbrillig/phpcs-changed automattic/jetpack-codesniffer --dev
composer install
composer global require "phpunit/phpunit=5.7.*" --no-suggest
else
composer global require "phpunit/phpunit=5.7.* || 6.5.* || 7.5.*"
fi
cd -

# Setup MySQL
cat <<EOF > ~/.my.cnf
Expand All @@ -46,7 +42,7 @@ master)
git clone --depth=1 --branch master git://develop.git.wordpress.org/ /tmp/wordpress-master
;;
latest)
git clone --depth=1 --branch $(php ./tests/get-wp-version.php) git://develop.git.wordpress.org/ /tmp/wordpress-latest
git clone --depth=1 --branch $(php ./tools/get-wp-version.php) git://develop.git.wordpress.org/ /tmp/wordpress-latest
;;
previous)
git clone --depth=1 --branch 5.5 git://develop.git.wordpress.org/ /tmp/wordpress-previous
Expand All @@ -59,8 +55,7 @@ if [ $clone_exit_code -ne 0 ]; then
exit 1
fi

cd ..
cp -r jetpack "/tmp/wordpress-$WP_BRANCH/src/wp-content/plugins/jetpack"
cp -r projects/plugins/jetpack "/tmp/wordpress-$WP_BRANCH/src/wp-content/plugins/jetpack"
# Plugin dir for tests in WP >= 5.6-beta1
ln -s "/tmp/wordpress-$WP_BRANCH/src/wp-content/plugins/jetpack" "/tmp/wordpress-$WP_BRANCH/tests/phpunit/data/plugins/jetpack"
cd /tmp/wordpress-$WP_BRANCH
Expand Down
85 changes: 0 additions & 85 deletions .github/actions/update-package/update-package.sh

This file was deleted.

2 changes: 1 addition & 1 deletion .github/files/check-excludelist-diff.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const spawnSync = require( 'child_process' ).spawnSync;

const res = spawnSync(
'git',
[ 'diff', 'bin/eslint-excludelist.json', 'bin/phpcs-excludelist.json' ],
[ 'diff', 'tools/eslint-excludelist.json', 'tools/phpcs-excludelist.json' ],
{
stdio: [ null, 'pipe', 'inherit' ],
maxBuffer: Infinity,
Expand Down
2 changes: 1 addition & 1 deletion .github/files/check-monorepo-package-versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -eo pipefail

PACKAGES=$(jq -nc 'reduce inputs as $in ([]; . + [ $in.name ])' ./packages/*/composer.json)
PACKAGES=$(jq -nc 'reduce inputs as $in ([]; . + [ $in.name ])' ./projects/packages/*/composer.json)

EXIT=0
for FILE in $(git ls-files 'composer.json' '**/composer.json'); do
Expand Down
25 changes: 25 additions & 0 deletions .github/files/mirror-.github/workflows/readonly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Enforce read-only repo status

on:
issues:
types: opened
pull_request_target:
types: opened

jobs:
lockdown:
runs-on: ubuntu-latest
steps:
- uses: dessant/repo-lockdown@v2
with:
github-token: ${{ github.token }}
issue-comment: |
Thank you for your interest!
Issues should be filed at https://github.com/Automattic/jetpack/issues. Be sure to mention the product that the issue is regarding.
skip-closed-issue-comment: true
pr-comment: |
Thank you for your interest!
Pull requests should be made against the monorepo at https://github.com/Automattic/jetpack.
skip-closed-pr-comment: true
Loading

0 comments on commit e13487d

Please sign in to comment.