This repository was archived by the owner on Jun 4, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +24
-15
lines changed Expand file tree Collapse file tree 4 files changed +24
-15
lines changed Original file line number Diff line number Diff line change 2
2
"name" : " example-http-client-name-api" ,
3
3
"version" : " 1.0.0" ,
4
4
"private" : true ,
5
+ "type" : " module" ,
5
6
"description" : " " ,
6
7
"license" : " MIT" ,
7
8
"author" : " Tara Vancil <tbvanc@gmail.com>" ,
8
9
"scripts" : {
9
- "clean" : " rimraf ./dist ./.cache ./.parcel-cache " ,
10
- "build" : " parcel build index.html --no-scope-hoist " ,
11
- "serve" : " parcel serve index.html --open -p 8888" ,
10
+ "clean" : " rimraf ./dist ./.cache ./node_modules/.vite " ,
11
+ "build" : " vite build" ,
12
+ "serve" : " vite dev --port 8888" ,
12
13
"start" : " npm run serve" ,
13
14
"test" : " npm run build && playwright test tests"
14
15
},
15
16
"browserslist" : " last 1 Chrome version" ,
16
17
"dependencies" : {
17
- "ipfs-http-client" : " ^56 .0.0 "
18
+ "ipfs-http-client" : " ^57 .0.1 "
18
19
},
19
20
"devDependencies" : {
20
21
"@babel/core" : " ^7.14.8" ,
21
22
"@playwright/test" : " ^1.12.3" ,
22
23
"go-ipfs" : " ^0.11.0" ,
23
- "parcel" : " ^2.3.2" ,
24
24
"playwright" : " ^1.12.3" ,
25
25
"process" : " ^0.11.10" ,
26
26
"rimraf" : " ^3.0.2" ,
27
27
"test-util-ipfs-example" : " ^1.0.2" ,
28
- "util" : " ^0.12.4"
28
+ "util" : " ^0.12.4" ,
29
+ "vite" : " ^3.0.0-beta.1"
29
30
}
30
31
}
Original file line number Diff line number Diff line change 1
1
/* eslint-disable no-console */
2
- 'use strict'
3
-
4
2
import { create as ipfsHttp } from 'ipfs-http-client'
5
3
6
4
const App = ( ) => {
Original file line number Diff line number Diff line change 1
- 'use strict'
2
-
3
- const { test , expect } = require ( '@playwright/test' ) ;
4
- const { playwright } = require ( 'test-util- ipfs-example' ) ;
1
+ import { test , expect } from '@playwright/test' ;
2
+ import { playwright } from 'test-util-ipfs-example' ;
3
+ import * as ipfsHttpModule from 'ipfs-http-client'
4
+ import * as goIpfsModule from 'go- ipfs'
5
5
6
6
// Setup
7
7
const play = test . extend ( {
8
8
...playwright . servers ( ) ,
9
9
...playwright . daemons (
10
10
{
11
- ipfsHttpModule : require ( 'ipfs-http-client' ) ,
12
- ipfsBin : require ( 'go-ipfs' ) . path ( ) ,
11
+ ipfsHttpModule,
12
+ ipfsBin : goIpfsModule . path ( ) ,
13
13
args : [ '--enable-pubsub-experiment' ]
14
14
} ,
15
15
{ } ,
@@ -60,7 +60,7 @@ play.describe('bundle http client with webpack: ', () => {
60
60
const resolveResult = '#resolve-result'
61
61
62
62
play . beforeEach ( async ( { servers, page, daemons} ) => {
63
- await daemons [ 0 ] . api . swarm . connect ( await daemons [ 1 ] . api . peerId . addresses [ 0 ] )
63
+ await daemons [ 0 ] . api . swarm . connect ( await daemons [ 1 ] . _peerId . addresses [ 0 ] )
64
64
await page . goto ( `http://localhost:${ servers [ 0 ] . port } /` ) ;
65
65
} )
66
66
Original file line number Diff line number Diff line change
1
+ export default {
2
+ build : {
3
+ target : 'esnext' ,
4
+ minify : false
5
+ } ,
6
+ define : {
7
+ 'process.env.NODE_DEBUG' : 'false' ,
8
+ 'global' : 'globalThis'
9
+ }
10
+ }
You can’t perform that action at this time.
0 commit comments