Skip to content
This repository was archived by the owner on Jun 4, 2025. It is now read-only.

Commit e785843

Browse files
authored
fix: update ipfs versions (#365)
Updates all examples to use ESM versions of IPFS, swaps parcel for vite everywhere and removes old browserify example because it only understands CJS.
1 parent a295c4d commit e785843

File tree

5 files changed

+10
-7
lines changed

5 files changed

+10
-7
lines changed

.env

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# required because react-scripts scans *up* the tree from this project and finds
22
# a conflicting version of eslint in the node_modules dir for js-ipfs.
33
SKIP_PREFLIGHT_CHECK=true
4+
5+
# Turning these on can cause OOM errors
6+
GENERATE_SOURCEMAP=false

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@
3737
"@testing-library/react": "^12.1.2",
3838
"@testing-library/user-event": "^13.5.0",
3939
"dot-prop": "^7.1.1",
40-
"ipfs-core": "^0.14.0",
40+
"ipfs-core": "^0.15.2",
4141
"ipfs-css": "^1.3.0",
4242
"react": "^17.0.2",
4343
"react-dom": "^17.0.2",
44-
"react-scripts": "5.0.0",
44+
"react-scripts": "5.0.1",
4545
"tachyons": "^4.12.0",
4646
"web-vitals": "^2.1.2"
4747
},

src/App.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const IpfsId = ({keys, obj}) => {
7777
{keys?.map((key) => (
7878
<div className='mb4' key={key}>
7979
<Title>{key}</Title>
80-
<div className='bg-white pa2 br2 truncate monospace' data-test={key}>{obj[key]}</div>
80+
<div className='bg-white pa2 br2 truncate monospace' data-test={key}>{obj[key].toString()}</div>
8181
</div>
8282
))}
8383
</>

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import 'tachyons'
55
import "ipfs-css";
66
import './index.css'
77

8-
import App from './App';
9-
import reportWebVitals from './reportWebVitals';
8+
import App from './App.js';
9+
import reportWebVitals from './reportWebVitals.js';
1010

1111
ReactDOM.render(
1212
<React.StrictMode>

tests/test.js renamed to tests/test.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
const { test, expect } = require('@playwright/test');
2-
const { playwright } = require('test-util-ipfs-example');
1+
import { test, expect } from '@playwright/test';
2+
import { playwright } from 'test-util-ipfs-example';
33

44
// Setup
55
const play = test.extend({

0 commit comments

Comments
 (0)