Skip to content

Commit 732bd89

Browse files
fix!: publish as ESM-only, upstream N8AO (#313)
1 parent 723cc02 commit 732bd89

Some content is hidden

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

42 files changed

+156
-2198
lines changed

package.json

Lines changed: 11 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -11,47 +11,33 @@
1111
"3d"
1212
],
1313
"license": "MIT",
14-
"type": "module",
15-
"main": "./dist/index.cjs",
16-
"module": "./dist/index.js",
17-
"exports": {
18-
"types": "./dist/index.d.ts",
19-
"require": "./dist/index.cjs",
20-
"import": "./dist/index.js"
21-
},
22-
"types": "./dist/index.d.ts",
23-
"sideEffects": false,
2414
"files": [
25-
"dist"
15+
"dist/*",
16+
"src/*"
2617
],
18+
"type": "module",
19+
"main": "./dist/index.js",
20+
"exports": "./dist/index.js",
21+
"sideEffects": false,
2722
"repository": {
2823
"type": "git",
2924
"url": "git+https://github.com/pmndrs/react-postprocessing.git"
3025
},
31-
"lint-staged": {
32-
"*.{js,jsx,ts,tsx}": [
33-
"eslint --fix"
34-
]
35-
},
3626
"scripts": {
37-
"prebuild": "rimraf dist",
38-
"build": "vite build && tsc --emitDeclarationOnly",
39-
"prepare": "yarn build",
27+
"build": "vite build",
4028
"eslint": "eslint . --fix --ext=js,ts,jsx,tsx",
4129
"eslint:ci": "eslint . --ext=js,ts,jsx,tsx",
4230
"test": "vitest run",
43-
"typecheck": "tsc --noEmit false --strict --jsx react",
31+
"typecheck": "tsc",
4432
"release": "semantic-release"
4533
},
4634
"dependencies": {
47-
"buffer": "^6.0.3",
4835
"maath": "^0.6.0",
49-
"n8ao": "^1.6.6",
50-
"postprocessing": "^6.32.1",
36+
"n8ao": "^1.9.4",
37+
"postprocessing": "^6.36.6",
5138
"three-stdlib": "^2.35.7"
5239
},
5340
"devDependencies": {
54-
"@react-three/drei": "^9.68.2",
5541
"@react-three/fiber": "9.0.0-rc.4",
5642
"@types/node": "^22.10.7",
5743
"@types/react": "^19.0.2",
@@ -66,12 +52,9 @@
6652
"eslint-plugin-prettier": "^4.2.1",
6753
"eslint-plugin-react": "^7.32.2",
6854
"eslint-plugin-react-hooks": "^4.6.0",
69-
"husky": "^8.0.3",
70-
"lint-staged": "^13.2.2",
7155
"prettier": "^2.8.8",
7256
"react": "^19.0.0",
7357
"react-dom": "^19.0.0",
74-
"rimraf": "^5.0.0",
7558
"semantic-release": "^21.0.2",
7659
"three": "^0.156.0",
7760
"typescript": "^5.0.4",
@@ -80,7 +63,7 @@
8063
},
8164
"peerDependencies": {
8265
"@react-three/fiber": "9.0.0-rc.4",
83-
"react": ">=19.0",
66+
"react": "^19.0",
8467
"three": ">= 0.156.0"
8568
}
8669
}

src/EffectComposer.test.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ declare global {
1111
}
1212
global.IS_REACT_ACT_ENVIRONMENT = true
1313

14-
// Mock scheduler to test React features
15-
vi.mock('scheduler', () => require('scheduler/unstable_mock'))
16-
1714
// Create virtual R3F root for testing
1815
extend(THREE as any)
1916
const root = createRoot({

src/compat.js

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

src/effects/Autofocus.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ import { useThree, useFrame, createPortal, type Vector3 } from '@react-three/fib
1414
import { CopyPass, DepthPickingPass, DepthOfFieldEffect } from 'postprocessing'
1515
import { easing } from 'maath'
1616

17-
import { DepthOfField } from './DepthOfField'
18-
import { EffectComposerContext } from '../EffectComposer'
17+
import { DepthOfField } from './DepthOfField.tsx'
18+
import { EffectComposerContext } from '../EffectComposer.tsx'
1919

2020
export type AutofocusProps = React.ComponentProps<typeof DepthOfField> & {
2121
target?: Vector3

src/effects/Bloom.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { BloomEffect, BlendFunction } from 'postprocessing'
2-
import { wrapEffect } from '../util'
2+
import { wrapEffect } from '../util.tsx'
33

44
export const Bloom = /* @__PURE__ */ wrapEffect(BloomEffect, {
55
blendFunction: BlendFunction.ADD,

src/effects/BrightnessContrast.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { BrightnessContrastEffect } from 'postprocessing'
2-
import { wrapEffect } from '../util'
2+
import { wrapEffect } from '../util.tsx'
33

44
export const BrightnessContrast = /* @__PURE__ */ wrapEffect(BrightnessContrastEffect)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { ChromaticAberrationEffect } from 'postprocessing'
2-
import { type EffectProps, wrapEffect } from '../util'
2+
import { type EffectProps, wrapEffect } from '../util.tsx'
33

44
export type ChromaticAberrationProps = EffectProps<typeof ChromaticAberrationEffect>
55
export const ChromaticAberration = /* @__PURE__ */ wrapEffect(ChromaticAberrationEffect)

src/effects/ColorDepth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { ColorDepthEffect } from 'postprocessing'
2-
import { wrapEffect } from '../util'
2+
import { wrapEffect } from '../util.tsx'
33

44
export const ColorDepth = /* @__PURE__ */ wrapEffect(ColorDepthEffect)

src/effects/Depth.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
import { DepthEffect } from 'postprocessing'
2-
import { wrapEffect } from '../util'
2+
import { wrapEffect } from '../util.tsx'
33

44
export const Depth = /* @__PURE__ */ wrapEffect(DepthEffect)

src/effects/DepthOfField.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { DepthOfFieldEffect, MaskFunction } from 'postprocessing'
22
import { Ref, forwardRef, useMemo, useEffect, useContext } from 'react'
33
import { ReactThreeFiber } from '@react-three/fiber'
44
import { type DepthPackingStrategies, type Texture, Vector3 } from 'three'
5-
import { EffectComposerContext } from '../EffectComposer'
5+
import { EffectComposerContext } from '../EffectComposer.tsx'
66

77
type DOFProps = ConstructorParameters<typeof DepthOfFieldEffect>[1] &
88
Partial<{

0 commit comments

Comments
 (0)