Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Release next versions #58

Merged
merged 160 commits into from
Apr 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
160 commits
Select commit Hold shift + click to select a range
931d0db
refactor: remove examples
JonasKruckenberg Mar 12, 2021
3e577aa
refactor: move directives into imagetools-core
JonasKruckenberg Mar 12, 2021
d92bd58
refactor: move vite-imagetools to packages folder
JonasKruckenberg Mar 12, 2021
d22df03
refactor: move to yarn v2 & pnp
JonasKruckenberg Mar 12, 2021
17d4438
refactor: use changeset instead of semantic release
JonasKruckenberg Mar 12, 2021
0524462
refactor: remove custom docs
JonasKruckenberg Mar 12, 2021
46f29af
chore: switch to lerna
JonasKruckenberg Mar 15, 2021
dd31eeb
revert: switch back to yarn 1
JonasKruckenberg Mar 15, 2021
867fbf5
chore: switch to lerna release
JonasKruckenberg Mar 15, 2021
4ac0a45
chore: remove coverage workflow for now
JonasKruckenberg Mar 15, 2021
e47ffe9
chore: add workspaces
JonasKruckenberg Mar 15, 2021
c25681d
test: add applyTransforms unit tests
JonasKruckenberg Mar 15, 2021
70faceb
test: fix builtins tests
JonasKruckenberg Mar 15, 2021
2cc2d90
feat: add caching utils
JonasKruckenberg Mar 15, 2021
37c0320
refactor: make builtins an object
JonasKruckenberg Mar 15, 2021
0772934
fix: consolidate functions into main
JonasKruckenberg Mar 15, 2021
e48448d
fix: blur directive argument parsing
JonasKruckenberg Mar 15, 2021
f86bb5a
test: fix tests reflecting function returntype change
JonasKruckenberg Mar 15, 2021
c36d840
feat: add util functions
JonasKruckenberg Mar 15, 2021
cc92423
chore: rename test file
JonasKruckenberg Mar 15, 2021
9c05132
test: reflect generateTransforms signature change
JonasKruckenberg Mar 15, 2021
afd4ef0
test: add unit tests for parseURL
JonasKruckenberg Mar 15, 2021
0252673
chore: include tests types for vscode but exclude in build
JonasKruckenberg Mar 15, 2021
f306fcd
docs: start imagetools-core readme
JonasKruckenberg Mar 15, 2021
dbfdb56
chore: update package.json
JonasKruckenberg Mar 15, 2021
8173876
chore: ignore test file for build
JonasKruckenberg Mar 15, 2021
75f9562
chore: update package.json
JonasKruckenberg Mar 15, 2021
9bb1f34
docs: add vite-imagetools readme
JonasKruckenberg Mar 15, 2021
70cd9cd
feat: add output formats
JonasKruckenberg Mar 15, 2021
61d5a3d
fix: improve extensibility
JonasKruckenberg Mar 15, 2021
9f04c9c
fix: remove force option
JonasKruckenberg Mar 15, 2021
f5135b7
fix: reflect new imagetools-core version
JonasKruckenberg Mar 15, 2021
486b6a7
chore: include tests in vscode typescript
JonasKruckenberg Mar 15, 2021
852bdfc
docs: add basic example
JonasKruckenberg Mar 15, 2021
5c053c5
chore: mark imagetools-core as prerelease
JonasKruckenberg Mar 15, 2021
58c7cc2
Publish
JonasKruckenberg Mar 15, 2021
c0186f1
Revert "Publish"
JonasKruckenberg Mar 15, 2021
82ca9d2
chore: set correct version
JonasKruckenberg Mar 15, 2021
91ed6d2
chore: remove husky
JonasKruckenberg Mar 15, 2021
83612e0
build: fix ci tests
JonasKruckenberg Mar 15, 2021
f11f877
build: fix release
JonasKruckenberg Mar 15, 2021
06ee695
chore: try to fix ci
JonasKruckenberg Mar 15, 2021
33e8798
chore: switch to babel-jest
JonasKruckenberg Mar 15, 2021
265d6f5
chore: add git user
JonasKruckenberg Mar 15, 2021
bdd641a
chore: bumb version
JonasKruckenberg Mar 15, 2021
b70e68e
chore: fix version
JonasKruckenberg Mar 15, 2021
7367d97
Publish
ashlovell Mar 15, 2021
877f9e3
chore: add no-verify-access to lerna publish
JonasKruckenberg Mar 15, 2021
be30559
Merge branch 'next' of https://github.com/JonasKruckenberg/vite-image…
JonasKruckenberg Mar 15, 2021
44b99d6
Publish
ashlovell Mar 15, 2021
0bd273c
chore: set correct username
JonasKruckenberg Mar 15, 2021
83aa4c2
docs: demo readme
JonasKruckenberg Mar 15, 2021
eb38904
Publish
JonasKruckenberg Mar 15, 2021
5a09e00
fix: fix imagetools core
JonasKruckenberg Mar 15, 2021
27db78b
Publish
JonasKruckenberg Mar 15, 2021
31fc0fd
docs test release
JonasKruckenberg Mar 15, 2021
4f11563
Publish
JonasKruckenberg Mar 15, 2021
2f0204b
docs improve readme
JonasKruckenberg Mar 15, 2021
e85c178
build: make all next releases
JonasKruckenberg Mar 15, 2021
617972c
test: remove large blur
JonasKruckenberg Mar 15, 2021
7e96a09
Publish
JonasKruckenberg Mar 15, 2021
1f4e1e3
build: setup npm token for workflow
JonasKruckenberg Mar 15, 2021
b567372
docs: add readme
JonasKruckenberg Mar 15, 2021
a73ca1f
Merge branch 'next' of https://github.com/JonasKruckenberg/vite-image…
JonasKruckenberg Mar 15, 2021
d8d5a76
Publish
JonasKruckenberg Mar 15, 2021
12fb2ed
docs(imagetools-core): add metadata
JonasKruckenberg Mar 15, 2021
2b4946e
docs(vite-imagetools): set correct homepage
JonasKruckenberg Mar 15, 2021
c15fe09
chore: set correct step name
JonasKruckenberg Mar 15, 2021
0aa934f
Merge branch 'next' of https://github.com/JonasKruckenberg/vite-image…
JonasKruckenberg Mar 15, 2021
f46f2c5
refactor: move function into lib folder
JonasKruckenberg Mar 16, 2021
afa0b4b
fix: readd metadata annotations
JonasKruckenberg Mar 16, 2021
69ce4e6
refactor: rename meta-directives
JonasKruckenberg Mar 16, 2021
727ef26
test: fix tests to reflect new version
JonasKruckenberg Mar 16, 2021
cae242e
test: progressive option now gets used
JonasKruckenberg Mar 16, 2021
b6ac8b3
feat: change extendDirectives signature
JonasKruckenberg Mar 16, 2021
e8e11cf
feat: rework plugin to use new core library
JonasKruckenberg Mar 16, 2021
5d78c80
docs(vite-imagetools): add preliminary readme
JonasKruckenberg Mar 16, 2021
57421e0
docs: update example
JonasKruckenberg Mar 16, 2021
b78b802
Publish
JonasKruckenberg Mar 16, 2021
2531bc3
docs: add guide
JonasKruckenberg Mar 18, 2021
49f9e50
docs: cleanup example
JonasKruckenberg Mar 18, 2021
cd2d8db
docs(vite-imagetools): Update readme to remove caching info
JonasKruckenberg Mar 19, 2021
86c1a3a
refactor: remove caching option
JonasKruckenberg Mar 19, 2021
9e0673d
feat(imagetools-core): Add image id generation utility
JonasKruckenberg Mar 19, 2021
7ea0839
fix: image id generation
JonasKruckenberg Mar 19, 2021
559ae3c
Publish
JonasKruckenberg Mar 19, 2021
50d003b
chore: fix lerna release config
JonasKruckenberg Mar 19, 2021
24a3a0f
docs: start general project readme
JonasKruckenberg Mar 19, 2021
4abccc5
fix: support nodejs LTS versions
JonasKruckenberg Mar 30, 2021
fd9b35f
chore: fix CI to test only for nodejs 12.x upwards
JonasKruckenberg Mar 30, 2021
3a8caab
chore: target es2019 since only nodejs 12.x upwards is supported
JonasKruckenberg Mar 30, 2021
432d553
Publish
JonasKruckenberg Mar 30, 2021
4648cf7
refactor: rename directives to transforms
JonasKruckenberg Mar 30, 2021
925dfe4
docs: add imagetools specification
JonasKruckenberg Mar 30, 2021
7f0a0e8
fix: update cache key geneartion to match spec
JonasKruckenberg Mar 30, 2021
2670988
test: make unit tests compatible with nodejs 12.x
JonasKruckenberg Mar 30, 2021
6d5a44c
refactor: rename directives to transforms
JonasKruckenberg Mar 30, 2021
72ce3cf
docs: Update package description
JonasKruckenberg Mar 30, 2021
c03f5a3
docs: add package readmes
JonasKruckenberg Mar 30, 2021
5d0c781
feat: allow metadata removal to be toggled by option
JonasKruckenberg Mar 30, 2021
1a50520
chore: restrict nodejs versions to 12.x+ to mirror vite
JonasKruckenberg Mar 30, 2021
e09434c
fix: cache key generation
JonasKruckenberg Mar 30, 2021
cf6f2a9
docs: cleanup
JonasKruckenberg Mar 30, 2021
b0dca77
docs: add detailed documentation
JonasKruckenberg Mar 30, 2021
db593c8
docs: add linking between guide docs
JonasKruckenberg Mar 30, 2021
41fc950
chore: add contributing document
JonasKruckenberg Mar 30, 2021
bb4b82c
Merge branch 'next' of https://github.com/JonasKruckenberg/vite-image…
JonasKruckenberg Mar 30, 2021
33034c5
Publish
JonasKruckenberg Mar 30, 2021
a3136ea
docs(README): add sponsoring section
JonasKruckenberg Mar 30, 2021
dbffbe0
Merge branch 'next' of https://github.com/JonasKruckenberg/vite-image…
JonasKruckenberg Mar 30, 2021
fedcdaa
Publish
JonasKruckenberg Mar 30, 2021
4fadfa1
chore: remove unneeded dependency
JonasKruckenberg Apr 5, 2021
f7e6edf
docs: add badges
JonasKruckenberg Apr 5, 2021
894fda5
Merge branch 'next' of https://github.com/JonasKruckenberg/imagetools…
JonasKruckenberg Apr 5, 2021
48d169e
Publish
JonasKruckenberg Apr 5, 2021
23b0aef
fix: mark force option as deprecated
JonasKruckenberg Apr 5, 2021
e1c96a4
chore: remove unneeded dependencies
JonasKruckenberg Apr 5, 2021
97b9c2d
refactor: move output formats to imagetools-core
JonasKruckenberg Apr 5, 2021
0bafc3f
test: add unit tests for output formats
JonasKruckenberg Apr 6, 2021
c0bde32
refactor: remove reduce from srcset output format
JonasKruckenberg Apr 6, 2021
648307b
chore: rename github repo to imagetools
JonasKruckenberg Apr 6, 2021
2fd9ca7
feat: add rollup integration
JonasKruckenberg Apr 6, 2021
3c066d2
refactor: rename DirectiveContext to transformFactoryContext
JonasKruckenberg Apr 6, 2021
088e668
Merge branch 'next' of https://github.com/JonasKruckenberg/imagetools…
JonasKruckenberg Apr 6, 2021
7bbeda7
test: configure jest to ignore testing utility files
JonasKruckenberg Apr 6, 2021
2c34603
chore: continue renaming repo from vite-imagetools to imagetools
JonasKruckenberg Apr 6, 2021
4de412b
chore: update vite version
JonasKruckenberg Apr 6, 2021
6a16024
test: fix rollup-plugin-imagetools missing deps
JonasKruckenberg Apr 6, 2021
bdd9b6f
fix: correctly replace image references in chunks
JonasKruckenberg Apr 6, 2021
d948082
style: cleanup file
JonasKruckenberg Apr 6, 2021
17736e6
chore: ignore local debug projects
JonasKruckenberg Apr 6, 2021
6a13cac
chore: build packages before tests to fix interdependent unit tests
JonasKruckenberg Apr 6, 2021
f4aef75
Publish
JonasKruckenberg Apr 6, 2021
e4a9c66
feat: respect vite configuration when generating output code
JonasKruckenberg Apr 9, 2021
2fe37ae
docs: add namedExports notice for vite-imagetools users
JonasKruckenberg Apr 9, 2021
76722aa
docs: fix links to packages
JonasKruckenberg Apr 9, 2021
6be02b3
Publish
JonasKruckenberg Apr 9, 2021
b2f0ca7
fix: switch from default to named export
JonasKruckenberg Apr 9, 2021
4d28364
Improve test support (#57)
JonasKruckenberg Apr 9, 2021
f612e6a
fix(rollup-plugin-imagetools): correctly resolve absolute paths
JonasKruckenberg Apr 9, 2021
f9b3b16
test: replace jest-file-snapshot with jest-image-snapshot
JonasKruckenberg Apr 9, 2021
06ab6c7
chore: enable test coverage
JonasKruckenberg Apr 9, 2021
92fbe14
fix: import types from the right file
JonasKruckenberg Apr 9, 2021
e2b12bc
chore: fix coverage workflow
JonasKruckenberg Apr 9, 2021
fc3f8a2
chore: optimize rollup config
JonasKruckenberg Apr 11, 2021
edc9ec8
chore: fix typescript setup
JonasKruckenberg Apr 11, 2021
7a97f52
chore: fix jest module resolution
JonasKruckenberg Apr 11, 2021
b735ba1
chore: fix test util function typing
JonasKruckenberg Apr 11, 2021
0112eef
chore: use parallel execution whenever possible
JonasKruckenberg Apr 11, 2021
5046935
Publish
JonasKruckenberg Apr 11, 2021
3801ac0
test: add unit test ensuring correct exports
JonasKruckenberg Apr 11, 2021
eceb11b
Merge branch 'next' of https://github.com/JonasKruckenberg/imagetools…
JonasKruckenberg Apr 11, 2021
ebfa8fa
Publish
JonasKruckenberg Apr 11, 2021
a249607
docs(imagetools-core): Add codecov badge
JonasKruckenberg Apr 11, 2021
022a616
docs(rollup-plugin-imagetools): add codecov badge
JonasKruckenberg Apr 11, 2021
3adb94a
docs(vite-imagetools): Add codecov badge
JonasKruckenberg Apr 11, 2021
44665b0
Merge branch 'next' of https://github.com/JonasKruckenberg/imagetools…
JonasKruckenberg Apr 11, 2021
65a4e19
Publish
JonasKruckenberg Apr 11, 2021
308a873
revert: temporarily remove examples
JonasKruckenberg Apr 11, 2021
f0b4f51
Merge branch 'main' into next
JonasKruckenberg Apr 11, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

github: [JonasKruckenberg]
open_collective: # Replace with a single Open Collective username
custom: ["https://paypal.me/jonaskruckie"]
custom: ["https://paypal.me/jonaskruckie"]
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "daily"
interval: "daily"
33 changes: 24 additions & 9 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Generate Coverage
on:
push:
branches:
- main
- master
- next

jobs:
Expand All @@ -12,15 +12,30 @@ jobs:
- uses: actions/checkout@v2
with:
lfs: true
- name: Use Node.js
uses: actions/setup-node@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: 14.x
- run: yarn
- name: Generate coverage report
run: yarn coverage > coverage.json
- name: Upload report
run: node_modules/.bin/codecov --disable=gcov
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
CI: true
run: yarn coverage
- name: Upload imagetools-core Report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: imagetools-core
files: 'packages/core/coverage/coverage-final.json'

- name: Upload vite-imagetools Report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: vite-imagetools
files: 'packages/vite/coverage/coverage-final.json'

- name: Upload rollup-plugin-imagetools Report
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: rollup-plugin-imagetools
files: 'packages/rollup/coverage/coverage-final.json'
39 changes: 35 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,52 @@ name: Release
on:
push:
branches: ["main", "next"]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 15.x]

steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
lfs: true
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install deps
run: yarn
- name: Run unit tests
run: yarn test

release:
runs-on: ubuntu-latest
needs: test

steps:
- uses: actions/checkout@v2
with:
fetch-depth: "0"
lfs: true
- uses: actions/setup-node@v1
- run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
- uses: actions/setup-node@v2
with:
node-version: "14"
- run: yarn
- run: yarn test
- run: yarn build
- name: create npmrc file
run: echo //registry.npmjs.org/:_authToken=${NPM_TOKEN} > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Configure CI Git User
run: |
git config --global user.email [email protected]
git config --global user.name JonasKruckenberg
- name: Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
run: yarn release --no-verify-access
6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
node_modules
dist
.DS_Store
coverage
.DS_STORE
coverage
yarn-error.log
**/debug
14 changes: 0 additions & 14 deletions .releaserc.yml

This file was deleted.

72 changes: 72 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
# Contributing

Hey! Thanks for considering to contribute to this project! We have some tips and tricks to get you started:

## Project Setup

This repository is a monorepo using yarn workspaces and lerna.<br>
The folder structure is a following:

```
┠─ docs:
┃ Documentation that is common to all packages.
┠─ examples:
┃ Example projects showing the real-word usage of imagetools.
┖─ packages
┠─ core:
┃ Holds all transforms and common utility functions needed for builtools integrations.
┖─ vite:
The integration with the vite frontend builtool.
```

## Running Tests

Running `yarn test`from the top level runs all tests for all packages, if your only interested in running tests for a single package cd into that directory and run `yarn test` there.

## Pull Request Guidelines

- All pull requests should be made against the `main` branch. (Not yet applicable)

- Make sure tests pass!

- Commit messages follow the [conventional commits style](). This helps generating changelogs and ensuring proper versioning.

- When adding transforms,

- does your use case absolutely require a new transform to be added or can it be archived some other way?

- make sure the functions don't have any side-effects and don't keep state between invocations.

- add a section to the specification explaining you transform

## Integrations

Imagetools is written to be easily adaptable to different buildtools and environment, here are a few tips to get you started:

- Read the specification

The user facing api has been designed to be interchangeable, so users can easily switch their existing project using an image processing server to use imagetools or vice-versa! That's why [the specificatio](docs/spec.md) clearly states what transformations and behaviour an Implementation must support to be compatible. You should reference this document to make sure your Integration is compatible with all others.

- Imagetools-core exposes commonly used utility funtions

To make your life easier imagetools-core provides utility functions for the common tasks like generating cache keys, loading images etc. Have a look at the [api docs]()!

- Use buildtool specific systems

Users expect their buildtools output to be consistent, so you should always choose the system provided by the builtools rather than building your own. This includes warnings (e.g. rollup and vite have the `this.warn` function) and caching.

- Avoid caching on disk

Images are big in comparison to other assets in a website, so you should be very careful when caching images on disk since the cache will - most likely - quickly baloon in size and no one likes that!
Since transformations are deterministic (meaning they produce the same image given the same config) you should leverage the browsers or builtools cache whenever possible.

- Link to this repository

Whenever you build an something with imagetools-core, make sure to link back to this repository. This will allow your users to read the docs provided by this repo. If your integration is popular or for a popular buildtool you can also ask to have your package moven into this monorepo, so your code stays maintained.

- Reexport the directives when possible

both vite-imagetools and rollup-plugin-imagetools reexport all builtin directives, so users can create their own directives using the builtins as building blocks. You should - whenever possible - also do the same so users can profit from the extensible nature of imagetools.
Loading