Skip to content

Commit

Permalink
Merge branch 'main' into docs/readme
Browse files Browse the repository at this point in the history
  • Loading branch information
tooooo1 authored Sep 25, 2023
2 parents 9e44ed6 + 534044f commit ea9beb2
Show file tree
Hide file tree
Showing 26 changed files with 538 additions and 325 deletions.
5 changes: 5 additions & 0 deletions .changeset/beige-eyes-brake.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@fepack/image": patch
---

refactor: Build System - Switch from esbuild to tsup
10 changes: 9 additions & 1 deletion .changeset/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,13 @@
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": ["@fepack/demo-image"]
"ignore": [
"@fepack/eslint-config",
"@fepack/eslint-config-js",
"@fepack/eslint-config-ts",
"@fepack/tsconfig",
"@fepack/demo-image",
"@fepack/demo-react-image-next",
"@fepack/image-documentation"
]
}
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.5.1
version: 8.6.10
- uses: actions/setup-node@v3
with:
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/code-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.5.1
version: 8.6.10
- uses: actions/setup-node@v3
with:
cache: "pnpm"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/graph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.5.1
version: 8.6.10
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: 8.5.1
version: 8.6.10
- uses: actions/setup-node@v3
with:
cache: 'pnpm'
Expand Down
7 changes: 0 additions & 7 deletions configs/eslint-config-js/CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion configs/eslint-config-js/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fepack/eslint-config-js",
"version": "0.0.1",
"version": "0.0.0",
"private": true,
"main": "javascript.js",
"files": [
Expand Down
7 changes: 0 additions & 7 deletions configs/eslint-config-ts/CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion configs/eslint-config-ts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fepack/eslint-config-ts",
"version": "0.0.1",
"version": "0.0.0",
"private": true,
"main": "typescript.js",
"files": [
Expand Down
10 changes: 0 additions & 10 deletions configs/eslint-config/CHANGELOG.md

This file was deleted.

2 changes: 1 addition & 1 deletion configs/eslint-config/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@fepack/eslint-config",
"version": "0.0.1",
"version": "0.0.0",
"private": true,
"files": [
"react-js.js",
Expand Down
13 changes: 12 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,27 @@
"lint:pub": "turbo run lint:pub",
"prepack": "turbo run prepack",
"test": "turbo run test",
"test:watch": "turbo run test:watch",
"type:check": "turbo run type:check --parallel"
},
"devDependencies": {
"@changesets/cli": "^2.26.2",
"@fepack/eslint-config": "workspace:*",
"@fepack/eslint-config-js": "workspace:*",
"@fepack/eslint-config-ts": "workspace:*",
"@fepack/tsconfig": "workspace:*",
"@vitest/browser": "^0.34.4",
"@vitest/coverage-istanbul": "^0.34.4",
"@vitest/ui": "^0.34.4",
"eslint": "^7.32.0",
"jsdom": "^22.1.0",
"packlint": "^0.2.4",
"prettier": "^2.5.1",
"publint": "^0.2.2",
"rimraf": "^5.0.1",
"tsup": "^7.1.0",
"turbo": "latest",
"typescript": "5.1.6"
"typescript": "5.1.6",
"vitest": "^0.34.3"
}
}
25 changes: 0 additions & 25 deletions packages/image/esbuild.config.js

This file was deleted.

35 changes: 14 additions & 21 deletions packages/image/package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
{
"name": "@fepack/image",
"version": "0.2.1",
"description": "Image preloader for fepack",
"description": "easy image control",
"keywords": [
"fepack",
"image",
"preloader"
"image"
],
"repository": {
"type": "git",
"url": "https://github.com/fepack/image.git",
"directory": "packages/image"
},
"license": "MIT",
"author": "tooooo1",
"author": {
"name": "Chung-il Jung",
"email": "[email protected]"
},
"sideEffects": false,
"type": "module",
"exports": {
Expand All @@ -29,35 +31,26 @@
},
"./package.json": "./package.json"
},
"main": "dist/index.js",
"main": "dist/index.cjs",
"types": "dist/index.d.ts",
"files": [
"dist",
"src"
],
"scripts": {
"build": "pnpm clean && pnpm build:tsc && pnpm build:js && pnpm copy:cts",
"build:js": "node ./esbuild.config.js",
"build:tsc": "tsc --emitDeclarationOnly",
"clean": "rm -rf dist",
"copy:cts": "cp dist/index.d.ts dist/index.d.cts",
"build": "tsup",
"build:watch": "tsup --watch",
"clean": "rimraf ./dist && rimraf ./coverage",
"lint": "eslint \"**/*.ts*\"",
"lint:pub": "publint --strict",
"prepack": "pnpm build",
"test": "vitest run --coverage",
"test:watch": "vitest"
"test:watch": "vitest --ui --coverage.enabled=true",
"type:check": "tsc --noEmit"
},
"devDependencies": {
"@fepack/eslint-config-js": "workspace:*",
"@fepack/eslint-config-ts": "workspace:*",
"@fepack/tsconfig": "workspace:*",
"@types/node": "^20.6.2",
"@vitest/browser": "^0.34.4",
"@vitest/coverage-istanbul": "^0.34.4",
"esbuild": "^0.18.11",
"jsdom": "^22.1.0",
"playwright": "^1.38.0",
"vitest": "^0.34.3"
"@types/node": "^18.16.2",
"playwright": "^1.38.0"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/image/src/checkWebPSupport.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { load } from ".";
import { load } from "./load";

/**
* Checks for various WebP features support in the browser.
Expand Down
3 changes: 1 addition & 2 deletions packages/image/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"extends": "@fepack/tsconfig/base.json",
"exclude": ["node_modules"],
"compilerOptions": {
"lib": ["ES2020", "DOM", "DOM.Iterable"],
"declarationDir": "dist"
"lib": ["ES2020", "DOM", "DOM.Iterable"]
},
"include": ["src/index.ts"]
}
9 changes: 9 additions & 0 deletions packages/image/tsup.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from "tsup";

export default defineConfig({
format: ["cjs", "esm"],
entry: ["src/*.{ts,tsx}", "!**/*.{spec,test}.*"],
sourcemap: true,
dts: true,
splitting: false,
});
18 changes: 14 additions & 4 deletions packages/react-image/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"name": "@fepack/react-image",
"version": "0.2.1",
"description": "easy image control for React",
"keywords": [
"fepack",
"react-image"
],
"repository": {
"type": "git",
"url": "https://github.com/fepack/image.git",
"directory": "packages/react-image"
},
"license": "MIT",
"author": {
"name": "Jonghyeon Ko",
Expand Down Expand Up @@ -40,14 +50,14 @@
"@fepack/image": "workspace:0.2.1"
},
"devDependencies": {
"@fepack/eslint-config": "workspace:^",
"@fepack/tsconfig": "workspace:*",
"@testing-library/jest-dom": "^5.16.5",
"@testing-library/react": "^13.4.0",
"@types/node": "^18.16.2",
"@types/react": "^18.2.0",
"@types/react-dom": "^18.2.1",
"@types/testing-library__jest-dom": "^5.14.5",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tsup": "^7.1.0"
"react-dom": "^18.2.0"
},
"peerDependencies": {
"react": "^16.8 || ^17 || ^18"
Expand Down
9 changes: 9 additions & 0 deletions packages/react-image/test.setup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import matchers from "@testing-library/jest-dom/matchers";
import { cleanup } from "@testing-library/react";
import { afterEach, expect } from "vitest";

expect.extend(matchers);

afterEach(() => {
cleanup();
});
2 changes: 1 addition & 1 deletion packages/react-image/tsup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineConfig } from "tsup";
export default defineConfig({
banner: { js: '"use client"' },
format: ["cjs", "esm"],
entry: ["{src,src/experimental}/*.{ts,tsx}", "!**/*.{spec,test,test-d}.*"],
entry: ["src/*.{ts,tsx}", "!**/*.{spec,test}.*"],
sourcemap: true,
dts: true,
splitting: false,
Expand Down
11 changes: 11 additions & 0 deletions packages/react-image/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { defineConfig } from "vitest/config";

export default defineConfig({
test: {
name: "@fepack/react-image",
dir: "./src",
environment: "jsdom",
globals: true,
coverage: { provider: "istanbul" },
},
});
Loading

0 comments on commit ea9beb2

Please sign in to comment.