|
22 | 22 | "build": "npm run build:main && npm run build:zip", |
23 | 23 | "build:main": "wp-scripts build", |
24 | 24 | "build:zip": "wp-scripts plugin-zip", |
| 25 | + "check-engines": "wp-scripts check-engines", |
| 26 | + "clean": "rimraf node_modules plugins/*/node_modules plugins/*/build build", |
| 27 | + "format": "wp-scripts format", |
| 28 | + "lint": "npm run lint:js", |
| 29 | + "lint:js": "wp-scripts lint-js ./src", |
| 30 | + "lint:js:fix": "wp-scripts lint-js --fix ./src", |
| 31 | + "prepare": "husky install", |
25 | 32 | "start": "concurrently --kill-others-on-fail -n 'Main,Plugins' -c 'blue,green' \"wp-scripts start\" \"node bin/start-plugins.js\"", |
26 | | - "test:unit": "jest --config tests/unit/jest.config.js", |
27 | | - "test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js", |
28 | | - "test:e2e:ui": "wp-scripts test-playwright --config tests/e2e/playwright.config.js --ui", |
29 | 33 | "pretest:codecept": "npm run build:main || echo '⚠️ Build failed, tests may fail if build assets are missing'", |
30 | 34 | "test:codecept": "npm run --prefix ../.. wp-env -- run tests-cli --env-cwd=wp-content/plugins/wp-graphql-ide/ -- bash -c 'export TEST_DB_HOST=${WORDPRESS_DB_HOST:-tests-mysql} TEST_DB_NAME=${WORDPRESS_DB_NAME:-tests-wordpress} TEST_DB_USER=${WORDPRESS_DB_USER:-root} TEST_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-password} TEST_WP_URL=${TEST_WP_URL:-http://tests-wordpress} TEST_WP_TABLE_PREFIX=${TEST_WP_TABLE_PREFIX:-wp_} TEST_WP_DOMAIN=${TEST_WP_DOMAIN:-localhost} TEST_ADMIN_USERNAME=${TEST_ADMIN_USERNAME:-admin} TEST_ADMIN_PASSWORD=${TEST_ADMIN_PASSWORD:-password} TEST_ADMIN_PATH=${TEST_ADMIN_PATH:-/wp-admin} TEST_ADMIN_EMAIL=${TEST_ADMIN_EMAIL:[email protected]} TEST_WP_ROOT_FOLDER=${TEST_WP_ROOT_FOLDER:-/var/www/html} && vendor/bin/codecept \"$@\"' --", |
31 | | - "pretest:codecept:wpunit": "npm run build:main || echo '⚠️ Build failed, tests may fail if build assets are missing'", |
32 | | - "test:codecept:wpunit": "npm run --prefix ../.. wp-env -- run tests-cli --env-cwd=wp-content/plugins/wp-graphql-ide/ -- bash -c 'export TEST_DB_HOST=${WORDPRESS_DB_HOST:-tests-mysql} TEST_DB_NAME=${WORDPRESS_DB_NAME:-tests-wordpress} TEST_DB_USER=${WORDPRESS_DB_USER:-root} TEST_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-password} TEST_WP_TABLE_PREFIX=${TEST_WP_TABLE_PREFIX:-wp_} TEST_WP_DOMAIN=${TEST_WP_DOMAIN:-localhost} TEST_ADMIN_EMAIL=${TEST_ADMIN_EMAIL:[email protected]} TEST_WP_ROOT_FOLDER=${TEST_WP_ROOT_FOLDER:-/var/www/html} TEST_THEME=${TEST_THEME:-twentytwentyone} && vendor/bin/codecept run wpunit \"$@\"' --", |
33 | 35 | "test:codecept:acceptance": "npm run --prefix ../.. wp-env -- run tests-cli --env-cwd=wp-content/plugins/wp-graphql-ide/ -- bash -c 'export TEST_DB_HOST=${WORDPRESS_DB_HOST:-tests-mysql} TEST_DB_NAME=${WORDPRESS_DB_NAME:-tests-wordpress} TEST_DB_USER=${WORDPRESS_DB_USER:-root} TEST_DB_PASSWORD=${TEST_DB_PASSWORD:-password} TEST_WP_URL=${TEST_WP_URL:-http://tests-wordpress} TEST_WP_TABLE_PREFIX=${TEST_WP_TABLE_PREFIX:-wp_} TEST_WP_DOMAIN=${TEST_WP_DOMAIN:-localhost} TEST_WP_ROOT_FOLDER=${TEST_WP_ROOT_FOLDER:-/var/www/html} TEST_ADMIN_USERNAME=${TEST_ADMIN_USERNAME:-admin} TEST_ADMIN_PASSWORD=${TEST_ADMIN_PASSWORD:-password} TEST_ADMIN_PATH=${TEST_ADMIN_PATH:-/wp-admin} TEST_ADMIN_EMAIL=${TEST_ADMIN_EMAIL:[email protected]} && vendor/bin/codecept run acceptance \"$@\"' --", |
34 | 36 | "test:codecept:functional": "npm run --prefix ../.. wp-env -- run tests-cli --env-cwd=wp-content/plugins/wp-graphql-ide/ -- bash -c 'export TEST_DB_HOST=${WORDPRESS_DB_HOST:-tests-mysql} TEST_DB_NAME=${WORDPRESS_DB_NAME:-tests-wordpress} TEST_DB_USER=${WORDPRESS_DB_USER:-root} TEST_DB_PASSWORD=${TEST_DB_PASSWORD:-password} TEST_WP_URL=${TEST_WP_URL:-http://tests-wordpress} TEST_WP_TABLE_PREFIX=${TEST_WP_TABLE_PREFIX:-wp_} TEST_WP_DOMAIN=${TEST_WP_DOMAIN:-localhost} TEST_WP_ROOT_FOLDER=${TEST_WP_ROOT_FOLDER:-/var/www/html} TEST_ADMIN_USERNAME=${TEST_ADMIN_USERNAME:-admin} TEST_ADMIN_PASSWORD=${TEST_ADMIN_PASSWORD:-password} TEST_ADMIN_PATH=${TEST_ADMIN_PATH:-/wp-admin} TEST_ADMIN_EMAIL=${TEST_ADMIN_EMAIL:[email protected]} && vendor/bin/codecept run functional \"$@\"' --", |
35 | | - "lint:js": "wp-scripts lint-js ./src", |
36 | | - "lint:js:fix": "wp-scripts lint-js --fix ./src", |
37 | | - "lint:js:src": "wp-scripts lint-js ./src", |
38 | | - "format": "wp-scripts format", |
39 | | - "format:src": "wp-scripts format ./src", |
40 | | - "check-engines": "wp-scripts check-engines", |
41 | | - "clean": "rimraf node_modules plugins/*/node_modules plugins/*/build build", |
42 | | - "prepare": "husky install", |
| 37 | + "pretest:codecept:wpunit": "npm run build:main || echo '⚠️ Build failed, tests may fail if build assets are missing'", |
| 38 | + "test:codecept:wpunit": "npm run --prefix ../.. wp-env -- run tests-cli --env-cwd=wp-content/plugins/wp-graphql-ide/ -- bash -c 'export TEST_DB_HOST=${WORDPRESS_DB_HOST:-tests-mysql} TEST_DB_NAME=${WORDPRESS_DB_NAME:-tests-wordpress} TEST_DB_USER=${WORDPRESS_DB_USER:-root} TEST_DB_PASSWORD=${WORDPRESS_DB_PASSWORD:-password} TEST_WP_TABLE_PREFIX=${TEST_WP_TABLE_PREFIX:-wp_} TEST_WP_DOMAIN=${TEST_WP_DOMAIN:-localhost} TEST_ADMIN_EMAIL=${TEST_ADMIN_EMAIL:[email protected]} TEST_WP_ROOT_FOLDER=${TEST_WP_ROOT_FOLDER:-/var/www/html} TEST_THEME=${TEST_THEME:-twentytwentyone} && vendor/bin/codecept run wpunit \"$@\"' --", |
| 39 | + "test:e2e": "wp-scripts test-playwright --config tests/e2e/playwright.config.js", |
| 40 | + "test:e2e:ui": "wp-scripts test-playwright --config tests/e2e/playwright.config.js --ui", |
| 41 | + "test:unit": "jest --config tests/unit/jest.config.js", |
43 | 42 | "wp-env": "wp-env" |
44 | 43 | }, |
45 | | - "devDependencies": { |
46 | | - "@babel/preset-env": "^7.23.9", |
47 | | - "@babel/preset-react": "^7.23.3", |
48 | | - "@playwright/test": "^1.41.2", |
49 | | - "@testing-library/jest-dom": "^6.4.2", |
50 | | - "@testing-library/react": "^14.2.1", |
51 | | - "@types/node": "^20.11.16", |
52 | | - "@wordpress/e2e-test-utils-playwright": "^0.19.0", |
53 | | - "@wordpress/env": "^9.2.0", |
54 | | - "@wordpress/prettier-config": "^4.38.0", |
55 | | - "@wordpress/scripts": "^27.9.0", |
56 | | - "babel-jest": "^29.7.0", |
57 | | - "chalk": "^5.3.0", |
58 | | - "clsx": "^2.0.0", |
59 | | - "concurrently": "^8.2.2", |
60 | | - "docker-compose": "^0.24.6", |
61 | | - "dotenv": "^16.4.4", |
62 | | - "husky": "^9.0.11", |
63 | | - "lint-staged": "^15.2.10", |
64 | | - "rimraf": "^5.0.0", |
65 | | - "sort-package-json": "^2.7.0" |
| 44 | + "lint-staged": { |
| 45 | + "package.json": "sort-package-json", |
| 46 | + "src/**/*.{js,jsx,ts,tsx}": "wp-scripts lint-js" |
66 | 47 | }, |
67 | 48 | "dependencies": { |
68 | 49 | "@graphiql/react": "^0.22.4", |
|
82 | 63 | "react": "^18.2.0", |
83 | 64 | "vaul": "^0.9.0" |
84 | 65 | }, |
85 | | - "lint-staged": { |
86 | | - "package.json": "sort-package-json" |
| 66 | + "devDependencies": { |
| 67 | + "@babel/preset-env": "^7.23.9", |
| 68 | + "@babel/preset-react": "^7.23.3", |
| 69 | + "@playwright/test": "^1.58.0", |
| 70 | + "@testing-library/jest-dom": "^6.4.2", |
| 71 | + "@testing-library/react": "^14.2.1", |
| 72 | + "@types/node": "^22.19.3", |
| 73 | + "@wordpress/e2e-test-utils-playwright": "^0.19.0", |
| 74 | + "@wordpress/env": "^10.37.0", |
| 75 | + "@wordpress/prettier-config": "^4.38.0", |
| 76 | + "@wordpress/scripts": "^27.9.0", |
| 77 | + "babel-jest": "^29.7.0", |
| 78 | + "chalk": "^5.3.0", |
| 79 | + "clsx": "^2.0.0", |
| 80 | + "concurrently": "^8.2.2", |
| 81 | + "docker-compose": "^0.24.6", |
| 82 | + "dotenv": "^16.4.4", |
| 83 | + "husky": "^9.0.11", |
| 84 | + "lint-staged": "^16.2.7", |
| 85 | + "rimraf": "^5.0.0", |
| 86 | + "sort-package-json": "^2.7.0" |
87 | 87 | } |
88 | 88 | } |
0 commit comments