Skip to content

Commit 2b55082

Browse files
authored
Merge pull request #488 from code16/9.0
Sharp 9
2 parents a78fbb5 + e2b95f9 commit 2b55082

File tree

2,166 files changed

+91626
-104635
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

2,166 files changed

+91626
-104635
lines changed

.browserslistrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
> 0.25%
2+
not dead

.gitattributes

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
/docs export-ignore
1212
/README.md export-ignore
1313
/ABOUT.md export-ignore
14-
/resources/assets/js export-ignore
15-
/resources/assets/sass export-ignore
14+
/resources/js export-ignore
15+
/resources/sass export-ignore
1616
/packages export-ignore
17+
/src/Dev export-ignore

.github/workflows/e2e.yml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: E2E Tests (playwright)
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
jobs:
10+
test:
11+
timeout-minutes: 60
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- name: Setup PHP
16+
uses: shivammathur/setup-php@v2
17+
with:
18+
php-version: ${{ matrix.php }}
19+
extensions: mbstring, dom, fileinfo, mysql
20+
- uses: actions/setup-node@v4
21+
with:
22+
node-version: lts/*
23+
- name: Install dependencies
24+
run: npm ci
25+
- name: Install Composer dependencies
26+
run: composer install
27+
- name: Build assets
28+
run: npm run build
29+
- name: Install dependencies
30+
run: npm ci
31+
working-directory: tests-e2e
32+
- name: Install Playwright Browsers
33+
run: npx playwright install chromium --with-deps
34+
working-directory: tests-e2e
35+
- name: Install Composer dependencies
36+
run: composer install
37+
working-directory: tests-e2e/site
38+
- name: Create .env
39+
run: cp .env.e2e.ci .env
40+
working-directory: tests-e2e/site
41+
- name: Generate app key
42+
run: php artisan key:generate
43+
working-directory: tests-e2e/site
44+
- name: Setup DB
45+
run: |
46+
touch database/database.sqlite
47+
php artisan snapshot:load e2e-seed
48+
working-directory: tests-e2e/site
49+
- name: Run server
50+
run: php artisan serve --host=127.0.0.1 --port=8080 &
51+
working-directory: tests-e2e/site
52+
- name: Run Playwright tests
53+
run: npx playwright test
54+
working-directory: tests-e2e
55+
env:
56+
CI: true
57+
- uses: actions/upload-artifact@v4
58+
if: ${{ !cancelled() }}
59+
with:
60+
name: report
61+
path: |
62+
tests-e2e/playwright-report/
63+
tests-e2e/site/storage/logs/
64+
retention-days: 30

.github/workflows/main.yml

Lines changed: 0 additions & 128 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Tests
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
- "9.0"
10+
jobs:
11+
12+
# Unit tests back (phpunit)
13+
laravel-tests:
14+
runs-on: ubuntu-latest
15+
strategy:
16+
matrix:
17+
include:
18+
- php: 8.2
19+
env:
20+
LARAVEL: 11.*
21+
TESTBENCH: 9.*
22+
- php: 8.3
23+
env:
24+
LARAVEL: 11.*
25+
TESTBENCH: 9.*
26+
- php: 8.4
27+
env:
28+
LARAVEL: 11.*
29+
TESTBENCH: 9.*
30+
env: ${{ matrix.env }}
31+
steps:
32+
- uses: actions/checkout@v2
33+
- name: Setup PHP
34+
uses: shivammathur/setup-php@v2
35+
with:
36+
php-version: ${{ matrix.php }}
37+
extensions: mbstring, dom, fileinfo, mysql
38+
- name: Setup locales
39+
run: sudo locale-gen fr_FR.UTF-8
40+
- name: Get composer cache directory
41+
id: composer-cache
42+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
43+
- name: Cache composer dependencies
44+
uses: actions/cache@v1
45+
with:
46+
path: ${{ steps.composer-cache.outputs.dir }}
47+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
48+
restore-keys: ${{ runner.os }}-composer-
49+
- name: Install Composer dependencies
50+
run: |
51+
composer require "laravel/framework:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" --no-interaction --no-update
52+
composer update --prefer-stable --prefer-dist --no-interaction
53+
- name: Execute tests via Pest
54+
run: ./vendor/bin/pest --parallel
55+
56+
slack:
57+
needs:
58+
- laravel-tests
59+
# - e2e-tests
60+
if: failure() && github.event_name == 'push'
61+
runs-on: ubuntu-latest
62+
steps:
63+
- uses: 8398a7/action-slack@v2.4.0
64+
with:
65+
status: failure
66+
env:
67+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

.gitignore

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,10 @@ node_modules
33
.idea
44
.DS_Store
55
.phpunit.result.cache
6+
.phpunit.cache
67
.php-cs-fixer.cache
78
/composer.lock
89
/public
910
/saturn
10-
/resources/assets/dist/hot
11-
/.phpunit.cache
11+
/dist/hot
12+
/resources/assets/dist

babel.config.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1+
/**
2+
* @type {import('@babel/core').TransformOptions}
3+
*/
14
module.exports = {
5+
presets: [
6+
[
7+
'@babel/preset-env',
8+
{
9+
"useBuiltIns": "usage",
10+
"corejs": "3.36"
11+
}
12+
],
13+
],
214
env: {
315
'test': {
416
presets: [

components.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"$schema": "https://shadcn-vue.com/schema.json",
3+
"style": "default",
4+
"typescript": true,
5+
"tailwind": {
6+
"config": "tailwind.config.js",
7+
"css": "resources/css/shadcn.css",
8+
"baseColor": "slate",
9+
"cssVariables": true
10+
},
11+
"framework": "laravel",
12+
"aliases": {
13+
"components": "@/components",
14+
"utils": "@/utils/cn"
15+
}
16+
}

composer.json

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,24 +13,33 @@
1313
],
1414
"require": {
1515
"php": "8.2.*|8.3.*|8.4.*",
16-
"code16/laravel-content-renderer": "^1.1.0",
16+
"ext-dom": "*",
17+
"blade-ui-kit/blade-icons": "^1.6",
18+
"code16/laravel-content-renderer": "^1.1",
19+
"inertiajs/inertia-laravel": "^2.0",
1720
"intervention/image": "^3.4",
1821
"intervention/image-laravel": "^1.2",
19-
"laravel/framework": "^10.0|^11.0",
22+
"laravel/framework": "^11.0",
23+
"laravel/prompts": "0.*",
2024
"league/commonmark": "^2.4",
21-
"spatie/image-optimizer": "^1.6"
25+
"masterminds/html5": "^2.8",
26+
"spatie/image-optimizer": "^1.6",
27+
"tightenco/ziggy": "^2.0"
2228
},
2329
"require-dev": {
24-
"brianium/paratest": "^6.3|^7.4",
25-
"dms/phpunit-arraysubset-asserts": "^0.4|^0.5",
30+
"brianium/paratest": "^7.0",
2631
"doctrine/dbal": "^3.5",
2732
"friendsofphp/php-cs-fixer": "^3.8",
2833
"laravel/pint": "1.18.3",
2934
"mockery/mockery": "^1.5.0",
30-
"nunomaduro/collision": "^7.0|^8.0",
35+
"nunomaduro/collision": "^8.0",
3136
"orchestra/testbench": "^8.0|^9.0",
32-
"phpunit/phpunit": "^9.5|^10.5",
33-
"spatie/laravel-ray": "^1.26"
37+
"pestphp/pest": "^3.0",
38+
"pestphp/pest-plugin-laravel": "^3.0",
39+
"phpunit/phpunit": "^11.0",
40+
"spatie/laravel-ray": "^1.26",
41+
"spatie/laravel-typescript-transformer": "^2.3",
42+
"spatie/typescript-transformer": "^2.2"
3443
},
3544
"autoload": {
3645
"files": [
@@ -42,16 +51,18 @@
4251
},
4352
"autoload-dev": {
4453
"psr-4": {
45-
"Code16\\Sharp\\Tests\\": "tests/"
54+
"Code16\\Sharp\\Tests\\": "tests/",
55+
"App\\": "vendor/orchestra/testbench-core/laravel/app"
4656
}
4757
},
4858
"scripts": {
49-
"test": "vendor/bin/testbench package:test --parallel"
59+
"test": "vendor/bin/testbench package:test --parallel",
60+
"typescript:generate": "php demo/artisan ziggy:generate --types-only; php demo/artisan typescript:transform"
5061
},
5162
"extra": {
5263
"laravel": {
5364
"providers": [
54-
"Code16\\Sharp\\SharpServiceProvider"
65+
"Code16\\Sharp\\SharpInternalServiceProvider"
5566
]
5667
}
5768
},

0 commit comments

Comments
 (0)