Skip to content

Commit 6e90b03

Browse files
authored
Merge pull request #691 from thebuilder/feat/remove-dist-copy
feat: remove script to publish dist dir
2 parents 7feb5b6 + 214cf98 commit 6e90b03

File tree

5 files changed

+17
-93
lines changed

5 files changed

+17
-93
lines changed

.github/workflows/pkg-pr.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
cache: "pnpm"
1515
- name: Install dependencies
1616
run: pnpm install
17-
17+
- name: Build
18+
run: pnpm build
1819
- name: Publish preview package
1920
run: pnpx pkg-pr-new publish --no-template

package.json

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"version": "8.26.1",
44
"description": "Monitor if a component is inside the viewport, using IntersectionObserver API",
55
"type": "commonjs",
6-
"source": "./src/index.tsx",
7-
"main": "./dist/index.js",
8-
"module": "./dist/esm/index.js",
9-
"types": "./dist/index.d.ts",
6+
"source": "src/index.tsx",
7+
"main": "dist/index.js",
8+
"module": "dist/esm/index.js",
9+
"types": "dist/index.d.ts",
1010
"exports": {
1111
"./test-utils": {
1212
"types": "./dist/test-utils.d.mts",
@@ -19,30 +19,26 @@
1919
"default": "./dist/index.mjs"
2020
}
2121
},
22+
"files": ["dist"],
2223
"author": "Daniel Schmidt",
2324
"license": "MIT",
2425
"sideEffects": false,
2526
"repository": {
2627
"type": "git",
2728
"url": "https://github.com/thebuilder/react-intersection-observer.git"
2829
},
29-
"engines": {
30-
"pnpm": ">=9"
31-
},
3230
"packageManager": "pnpm@9.5.0+sha256.dbdf5961c32909fb030595a9daa1dae720162e658609a8f92f2fa99835510ca5",
3331
"scripts": {
3432
"prebuild": "rm -rf dist lib",
3533
"build": "run-s build:*",
3634
"build:bundle": "tsup src/index.tsx",
3735
"build:legacy": "tsup src/index.tsx --format esm --legacy-output --no-clean --no-dts",
3836
"build:utils": "tsup src/test-utils.ts --no-clean --no-sourcemap",
39-
"build:copy": "node scripts/build-copy.cjs",
4037
"postbuild": "size-limit",
4138
"dev": "run-p dev:*",
4239
"dev:package": "tsup src/index.tsx --watch",
4340
"dev:storybook": "pnpm --filter storybook dev",
4441
"lint": "biome check .",
45-
"release": "np --contents dist",
4642
"version": "pnpm build",
4743
"storybook:build": "pnpm build:bundle && pnpm --filter storybook build",
4844
"test": "vitest"

pnpm-lock.yaml

Lines changed: 9 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/build-copy.cjs

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

src/test-utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ afterEach(() => {
5858
* Create a custom IntersectionObserver mock, allowing us to intercept the `observe` and `unobserve` calls.
5959
* We keep track of the elements being observed, so when `mockAllIsIntersecting` is triggered it will
6060
* know which elements to trigger the event on.
61-
* @param mockFn The mock function to use. Defaults to `jest.fn`.
61+
* @param mockFn The mock function to use. Defaults to `vi.fn`.
6262
*/
6363
export function setupIntersectionMocking(mockFn: typeof jest.fn) {
6464
global.IntersectionObserver = mockFn((cb, options = {}) => {

0 commit comments

Comments
 (0)