Skip to content

Commit

Permalink
Merge branch 'main' into fix-className-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnAlbin authored Feb 22, 2024
2 parents b15f033 + 1ca8321 commit 4cf212a
Show file tree
Hide file tree
Showing 277 changed files with 16,966 additions and 17,977 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ indent_size = 2
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true

[{*.diff,*.patch}]
trim_trailing_whitespace = false
3 changes: 2 additions & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ dist
public
node_modules
*.esm.js
drupal
/drupal
/drupal-*
5 changes: 5 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@
"node": true,
"jest": true
},
"globals": {
"Drupal": true,
"drupalSettings": true,
"jQuery": true
},
"rules": {
"react/prop-types": 0,
"prettier/prettier": ["error"],
Expand Down
5 changes: 3 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
This pull request is for: (mark with an "x")

- [ ] `examples/*`
- [ ] `modules/next`
- [ ] `packages/next-drupal`
Expand All @@ -11,8 +12,8 @@ _Please add a link to the GitHub issue
where this problem is discussed._

- [ ] I need help adding tests. (mark with an "x")
_Code changes need test coverage. If you don't know
how to make tests, check this box to ask for help._
_Code changes need test coverage. If you don't know
how to make tests, check this box to ask for help._

## Describe your changes

Expand Down
2 changes: 1 addition & 1 deletion .github/version-pr/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ outputs:
version:
description: "npm package version"
runs:
using: "node16"
using: node20
main: "index.js"
4 changes: 3 additions & 1 deletion .github/workflows/next-drupal-query.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: next-drupal-query
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, edited]

Expand All @@ -12,4 +14,4 @@ jobs:
- name: Install modules
run: yarn
- name: Run tests
run: yarn test packages/next-drupal-query
run: yarn workspace next-drupal-query test
5 changes: 4 additions & 1 deletion .github/workflows/next-drupal.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
name: next-drupal
on:
push:
branches:
- main
pull_request_target:
types: [opened, reopened, synchronize]

Expand All @@ -14,7 +17,7 @@ jobs:
- name: Install modules
run: yarn
- name: Run tests
run: yarn test packages/next-drupal
run: yarn workspace next-drupal test
env:
DRUPAL_BASE_URL: ${{ secrets.DRUPAL_BASE_URL }}
DRUPAL_USERNAME: ${{ secrets.DRUPAL_USERNAME }}
Expand Down
27 changes: 15 additions & 12 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
name: next
on:
push:
branches:
- main
pull_request:
branches:
- main
Expand All @@ -11,14 +13,20 @@ jobs:
strategy:
matrix:
# Supported PHP versions: https://www.drupal.org/docs/getting-started/system-requirements/php-requirements
php: ["8.0", "8.1", "8.2"]
php:
- "8.1"
- "8.2"
- "8.3"
# Supported Drupal versions: https://www.drupal.org/project/drupal
drupal: ["9.5", "10.0"]
drupal:
- "10.0.x"
- "10.1.x"
- "10.2.x"
exclude:
- drupal: "9.5"
php: "8.2"
- drupal: "10.0"
php: "8.0"
- drupal: "10.0.x"
php: "8.3"
- drupal: "10.1.x"
php: "8.3"
name: Drupal ${{ matrix.drupal }} - PHP ${{ matrix.php }}
services:
mysql:
Expand Down Expand Up @@ -51,7 +59,7 @@ jobs:
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Setup Drupal
run: |
COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }}.x ~/drupal --no-interaction --no-install
COMPOSER_MEMORY_LIMIT=-1 composer create-project drupal/recommended-project:${{ matrix.drupal }} ~/drupal --no-interaction --no-install
cd ~/drupal
composer config extra.enable-patching true
composer config extra.compile-mode all
Expand All @@ -63,11 +71,6 @@ jobs:
composer config allow-plugins true -n
COMPOSER_MEMORY_LIMIT=-1 composer require drupal/core-dev --no-install
composer install
- name: Add phpspec/prophecy-phpunit
run: |
cd ~/drupal
COMPOSER_MEMORY_LIMIT=-1 composer require --dev phpspec/prophecy-phpunit:^2 -W
if: ${{ startsWith(matrix.drupal, '9') }}
- name: Run phpcs
run: |
~/drupal/vendor/bin/phpcs -p -s --colors --standard=modules/next/phpcs.xml modules/next
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
node-version: 20
- name: Install dependencies
run: yarn install
- name: Determine version
Expand Down
121 changes: 34 additions & 87 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,97 +1,44 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
# dependencies
node_modules/
jspm_packages/

# Typescript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# dotenv environment variables file
.env

# gatsby files
.cache/

# Mac files
.DS_Store

# Yarn
yarn-error.log
package-lock.json
.pnp/
.pnp.js
# Yarn Integrity file
.yarn-integrity
.yarn
.yarn/install-state.gz

.netlify/
# build/test artifacts
/.eslintcache
/packages/*/.turbo
/packages/*/coverage
/packages/*/dist

# Editors
.vscode/*
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
# output of 'npm pack'
/packages/*/*.tgz

# phpstorm editor
.idea/
# misc
.DS_Store
*.pem

# NPM lock files
package-lock.json
# IDE files
/.idea
/.vscode
!/.vscode/tasks.json
!/.vscode/launch.json
!/.vscode/extensions.json

# debug
lerna-debug.log*
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Cypress
examples/**/cypress/screenshots
examples/**/cypress/videos
# environment variables file
.env
.envrc

# Other
*__clone*
dist
examples/certificates/*
drupal/web/sites/default/settings.local.php
.next
drupal/web/phpunit.xml
keys
# more misc
/*__clone__
/drupal/web/phpunit.xml
/drupal/web/sites/default/settings.local.php
/drupal-*
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

npx pretty-quick --staged
npx lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*": "prettier --write --ignore-unknown"
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v16
v18
34 changes: 23 additions & 11 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,26 @@
cache
.cache
# Ignore everything.
/*

# Don't ignore some files in the root directory.
!/*.js
!/*.ts
!/*.md
!/*.json

# Don't ignore these nested directories.
!/examples
!/modules
!/packages
!/scripts
!/starters
!/test
!/www

# In any nested folder, ignore these paths:
.next
CHANGELOG.md
composer.json
dist
package.json
package-lock.json
public
CHANGELOG.md
.yarn
packages/codemod/transforms/__testfixtures__/**/*
packages/codemod/transforms/__tests__/**/*
packages/codemod/**/*.js
packages/codemod/**/*.d.ts
dist
.next
./drupal
15 changes: 11 additions & 4 deletions .prettierrc.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
{
"endOfLine": "lf",
"semi": false,
"singleQuote": false,
"tabWidth": 2,
"trailingComma": "es5"
"trailingComma": "es5",
"overrides": [
{
"files": "modules/**/*",
"options": {
"semi": true,
"singleQuote": true,
"trailingComma": "all"
}
}
]
}
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ For example:

The `<scope>` can be empty (e.g. if the change is a global or difficult to assign to a single component), in which case the parentheses are omitted and the first line just becomes: `<type>: <subject>`

The `<!>` is optional. It must be used for a BREAKING CHANGE. For example, `fix(widgets)!: Fix incompatibility with widget v2` indicates the bugfix required a breaking change.
The `<!>` is optional. It should be used for a BREAKING CHANGE. For example, `fix(widgets)!: Fix incompatibility with widget v2` indicates the bugfix required a breaking change. Note that the "BREAKING CHANGE:" FOOTER is REQUIRED (see below).

### Commit message `<body>`

Expand Down
Loading

0 comments on commit 4cf212a

Please sign in to comment.