Skip to content

Commit

Permalink
V1 (#1285)
Browse files Browse the repository at this point in the history
* reset exifOrientation

Signed-off-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>

* comparation output

Signed-off-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>

* 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 <sarabadu@gmail.com>
Co-authored-by: Juan Pablo Garcia Ripa <sarabadu@gmail.com>
  • Loading branch information
hipstersmoothie and Sarabadu authored Aug 31, 2024
1 parent a4a8d63 commit ecc492d
Show file tree
Hide file tree
Showing 736 changed files with 26,957 additions and 33,448 deletions.
1 change: 0 additions & 1 deletion .browserslistrc

This file was deleted.

4 changes: 0 additions & 4 deletions .eslintignore

This file was deleted.

69 changes: 0 additions & 69 deletions .eslintrc.js

This file was deleted.

4 changes: 1 addition & 3 deletions .github/actions/build-cache/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ runs:
uses: actions/cache@v3
with:
path: |
node_modules
packages/*/dist
packages/*/es
packages/jimp/browser/lib
plugins/*/dist
key: ${{ github.run_id }}
restore-keys: ${{ github.run_id }}
33 changes: 20 additions & 13 deletions .github/actions/install-deps/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,29 @@ description: Setup action
runs:
using: "composite"
steps:
- name: Use nodejs
uses: actions/setup-node@v3
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 16.18
node-version: 18

- name: restore workspace cache
uses: actions/cache@v3
id: node_modules
- uses: pnpm/action-setup@v3
with:
path: |
node_modules
packages/*/node_modules
key: node-modules-v2-${{ runner.os }}-${{ steps.node-version.outputs.version }}-${{ hashFiles('yarn.lock', 'patches/*.patch') }}
version: 8.9.0
run_install: false

- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
node-modules-v2-${{ runner.os }}-${{ steps.node-version.outputs.version }}-
${{ runner.os }}-pnpm-store-
- run: yarn install --frozen-lockfile --network-timeout 9000000
if: steps.node_modules.outputs.cache-hit != 'true'
- name: Install dependencies
shell: bash
run: pnpm install
32 changes: 32 additions & 0 deletions .github/deploy-preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy PR previews

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3

- uses: ./.github/actions/install-deps

- name: Build with Astro
run: |
pnpm astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: packages/docs

- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: packages/docs/dist
53 changes: 53 additions & 0 deletions .github/deploy-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Deploy Website

on:
workflow_dispatch:
push:
branches: [main]

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: ./.github/actions/install-deps

- name: Setup Pages
id: pages
uses: actions/configure-pages@v5

- name: Build with Astro
run: |
pnpm astro build \
--site "${{ steps.pages.outputs.origin }}" \
--base "${{ steps.pages.outputs.base_path }}"
working-directory: packages/docs

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: packages/docs/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
34 changes: 15 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@ name: build

on:
push:
branches: [main]
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
types:
- opened
- reopened
- synchronize

# Enabled permissions on GITHUB_TOKEN
permissions:
Expand All @@ -25,7 +29,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
# - uses: ./.github/actions/install-deps

build:
runs-on: ubuntu-latest
Expand All @@ -34,7 +38,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn build
- run: pnpm build

lint:
runs-on: ubuntu-latest
Expand All @@ -43,16 +47,7 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn lint

test-types:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn tsTest:custom && yarn tsTest:main
- run: pnpm lint

test:
runs-on: ubuntu-latest
Expand All @@ -61,21 +56,22 @@ jobs:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn test
- run: pnpm test

test-browser:
runs-on: ubuntu-latest
needs: build
if: ${{ false }} # disable for now
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/install-deps
- uses: ./.github/actions/build-cache
- run: yarn test:browser --ci
- run: pnpm exec playwright install --with-deps chromium
working-directory: ./packages/config-vitest
- run: pnpm test:browser

release:
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
if: contains(github.event.head_commit.message , 'ci skip') == false && contains(github.event.head_commit.message , 'skip ci') == false
needs: build
steps:
- uses: actions/checkout@v3
Expand All @@ -86,7 +82,7 @@ jobs:
- name: Prepare repository
run: git fetch --unshallow --tags
- name: Create Release
run: yarn auto shipit
run: pnpm auto shipit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.GH_TOKEN }}
Expand Down
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,17 @@ pids
*.pid
*.seed

packages/docs/src/content/docs/api/**

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

# Coverage directory used by tools like istanbul
coverage
.nyc_output
.tshy
.tshy-build
.turbo

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt
Expand Down
31 changes: 0 additions & 31 deletions .npmignore

This file was deleted.

3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"prettier.prettierPath": "./node_modules/prettier/index.cjs",
}
Loading

0 comments on commit ecc492d

Please sign in to comment.