Skip to content

Commit ecc492d

Browse files
V1 (#1285)
* reset exifOrientation Signed-off-by: Juan Pablo Garcia Ripa <[email protected]> * comparation output Signed-off-by: Juan Pablo Garcia Ripa <[email protected]> * prepare for rewrite * kinda working * crop plugin * so close * kind of * add clean (cherry picked from commit bd18a94eb6f8b4d764929055eb2aba5654912d92) * clean up (cherry picked from commit a651044591ecfd20409e5e004aa71c6da0561386) # Conflicts: # packages/core/src/index.ts * nice * works! * add resize * blur plugin * fully complete resize * figure out testing * don't build tests * dont run tests in watch * update snapshot style * test pngs * finish png * add color type enum * move jpeg js * move bmp * fix test watching * add more encoder options * gif * deprecate * TIFF * move gaussian into blur * fux byukd * upgrade turbo * add more things to jimp * move color plugins and merge a few * threshold and phash * fix clone typing * plugins shadow + composite * plugin rotate * move blit tests * remove stale code * move dither * flip plugin * displace plugin * move plugin-circle * simplify scan * plugin fisheye * unused code * add mask plugin * plugin contain * plugin cover * last plugin! * fix tests * pick out things from core * complete jimp api * add some docs * fix usage * make test image package * implement hash functions * move diff test * delete event tests * move composite tests * more tests moved * callback tests * move alpha tests * stale tests * exif test * all code moved! * working on docs * more docs * improve read * simplify font loading since read will do the heavy lifting * docssss * revert changes * update contributing * more docs * fix method docs * tweaks * fix method types * fix constructor options * improve last of static methods * more docs * more docs * dead link * add examples * get it working in a browser * working * add browser tests * use zod for param validation and normalize object APIs * remove build output from repo * preview * fix lint * get bundle working * more docs * add write * minify bundle * update docs * add zod plugins * fix browser build * get most types for methods working * fix lint * force test rerun * fix running browser test * remove only * setup browser --------- Signed-off-by: Juan Pablo Garcia Ripa <[email protected]> Co-authored-by: Juan Pablo Garcia Ripa <[email protected]>
1 parent a4a8d63 commit ecc492d

File tree

736 files changed

+26957
-33448
lines changed

Some content is hidden

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

736 files changed

+26957
-33448
lines changed

.browserslistrc

-1
This file was deleted.

.eslintignore

-4
This file was deleted.

.eslintrc.js

-69
This file was deleted.

.github/actions/build-cache/action.yml

+1-3
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ runs:
88
uses: actions/cache@v3
99
with:
1010
path: |
11-
node_modules
1211
packages/*/dist
13-
packages/*/es
14-
packages/jimp/browser/lib
12+
plugins/*/dist
1513
key: ${{ github.run_id }}
1614
restore-keys: ${{ github.run_id }}

.github/actions/install-deps/action.yml

+20-13
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,29 @@ description: Setup action
44
runs:
55
using: "composite"
66
steps:
7-
- name: Use nodejs
8-
uses: actions/setup-node@v3
7+
- name: Setup Node
8+
uses: actions/setup-node@v4
99
with:
10-
node-version: 16.18
10+
node-version: 18
1111

12-
- name: restore workspace cache
13-
uses: actions/cache@v3
14-
id: node_modules
12+
- uses: pnpm/action-setup@v3
1513
with:
16-
path: |
17-
node_modules
18-
packages/*/node_modules
19-
key: node-modules-v2-${{ runner.os }}-${{ steps.node-version.outputs.version }}-${{ hashFiles('yarn.lock', 'patches/*.patch') }}
14+
version: 8.9.0
15+
run_install: false
16+
17+
- name: Get pnpm store directory
18+
shell: bash
19+
run: |
20+
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
21+
22+
- uses: actions/cache@v4
23+
name: Setup pnpm cache
24+
with:
25+
path: ${{ env.STORE_PATH }}
26+
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
2027
restore-keys: |
21-
node-modules-v2-${{ runner.os }}-${{ steps.node-version.outputs.version }}-
28+
${{ runner.os }}-pnpm-store-
2229
23-
- run: yarn install --frozen-lockfile --network-timeout 9000000
24-
if: steps.node_modules.outputs.cache-hit != 'true'
30+
- name: Install dependencies
2531
shell: bash
32+
run: pnpm install

.github/deploy-preview.yml

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Deploy PR previews
2+
3+
on:
4+
pull_request:
5+
types:
6+
- opened
7+
- reopened
8+
- synchronize
9+
- closed
10+
11+
concurrency: preview-${{ github.ref }}
12+
13+
jobs:
14+
deploy-preview:
15+
runs-on: ubuntu-20.04
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v3
19+
20+
- uses: ./.github/actions/install-deps
21+
22+
- name: Build with Astro
23+
run: |
24+
pnpm astro build \
25+
--site "${{ steps.pages.outputs.origin }}" \
26+
--base "${{ steps.pages.outputs.base_path }}"
27+
working-directory: packages/docs
28+
29+
- name: Deploy preview
30+
uses: rossjrw/pr-preview-action@v1
31+
with:
32+
source-dir: packages/docs/dist

.github/deploy-website.yml

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy Website
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches: [main]
7+
8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: false
16+
17+
jobs:
18+
build:
19+
name: Build
20+
runs-on: ubuntu-latest
21+
steps:
22+
- name: Checkout
23+
uses: actions/checkout@v4
24+
25+
- uses: ./.github/actions/install-deps
26+
27+
- name: Setup Pages
28+
id: pages
29+
uses: actions/configure-pages@v5
30+
31+
- name: Build with Astro
32+
run: |
33+
pnpm astro build \
34+
--site "${{ steps.pages.outputs.origin }}" \
35+
--base "${{ steps.pages.outputs.base_path }}"
36+
working-directory: packages/docs
37+
38+
- name: Upload artifact
39+
uses: actions/upload-pages-artifact@v3
40+
with:
41+
path: packages/docs/dist
42+
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
needs: build
48+
runs-on: ubuntu-latest
49+
name: Deploy
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

.github/workflows/build.yml

+15-19
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,13 @@ name: build
22

33
on:
44
push:
5-
branches: [main]
5+
branches:
6+
- main
67
pull_request:
7-
types: [opened, synchronize, reopened]
8+
types:
9+
- opened
10+
- reopened
11+
- synchronize
812

913
# Enabled permissions on GITHUB_TOKEN
1014
permissions:
@@ -25,7 +29,7 @@ jobs:
2529
runs-on: ubuntu-latest
2630
steps:
2731
- uses: actions/checkout@v3
28-
- uses: ./.github/actions/install-deps
32+
# - uses: ./.github/actions/install-deps
2933

3034
build:
3135
runs-on: ubuntu-latest
@@ -34,7 +38,7 @@ jobs:
3438
- uses: actions/checkout@v3
3539
- uses: ./.github/actions/install-deps
3640
- uses: ./.github/actions/build-cache
37-
- run: yarn build
41+
- run: pnpm build
3842

3943
lint:
4044
runs-on: ubuntu-latest
@@ -43,16 +47,7 @@ jobs:
4347
- uses: actions/checkout@v3
4448
- uses: ./.github/actions/install-deps
4549
- uses: ./.github/actions/build-cache
46-
- run: yarn lint
47-
48-
test-types:
49-
runs-on: ubuntu-latest
50-
needs: build
51-
steps:
52-
- uses: actions/checkout@v3
53-
- uses: ./.github/actions/install-deps
54-
- uses: ./.github/actions/build-cache
55-
- run: yarn tsTest:custom && yarn tsTest:main
50+
- run: pnpm lint
5651

5752
test:
5853
runs-on: ubuntu-latest
@@ -61,21 +56,22 @@ jobs:
6156
- uses: actions/checkout@v3
6257
- uses: ./.github/actions/install-deps
6358
- uses: ./.github/actions/build-cache
64-
- run: yarn test
59+
- run: pnpm test
6560

6661
test-browser:
6762
runs-on: ubuntu-latest
6863
needs: build
69-
if: ${{ false }} # disable for now
7064
steps:
7165
- uses: actions/checkout@v3
7266
- uses: ./.github/actions/install-deps
7367
- uses: ./.github/actions/build-cache
74-
- run: yarn test:browser --ci
68+
- run: pnpm exec playwright install --with-deps chromium
69+
working-directory: ./packages/config-vitest
70+
- run: pnpm test:browser
7571

7672
release:
7773
runs-on: ubuntu-latest
78-
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
74+
if: contains(github.event.head_commit.message , 'ci skip') == false && contains(github.event.head_commit.message , 'skip ci') == false
7975
needs: build
8076
steps:
8177
- uses: actions/checkout@v3
@@ -86,7 +82,7 @@ jobs:
8682
- name: Prepare repository
8783
run: git fetch --unshallow --tags
8884
- name: Create Release
89-
run: yarn auto shipit
85+
run: pnpm auto shipit
9086
env:
9187
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9288
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.GH_TOKEN }}

.gitignore

+5
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,17 @@ pids
88
*.pid
99
*.seed
1010

11+
packages/docs/src/content/docs/api/**
12+
1113
# Directory for instrumented libs generated by jscoverage/JSCover
1214
lib-cov
1315

1416
# Coverage directory used by tools like istanbul
1517
coverage
1618
.nyc_output
19+
.tshy
20+
.tshy-build
21+
.turbo
1722

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

.npmignore

-31
This file was deleted.

.vscode/settings.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
3+
}

0 commit comments

Comments
 (0)