Open oliveriosousa opened 3 years ago
Hi team, @autonome @hugomrdias
tags
to IPFS release? Or just target the latest release?For example: Stable, Beta, Next, Preview
Hi team, @autonome @hugomrdias
- I noticed that a lot of commits in the examples are updates to the version of IPFS. It is possible to add
tags
to IPFS release? Or just target the latest release?
I don't see this has a problem, its just keeping the same history as the source.
- What should be the core for all examples ? (MFS API ?)
For new examples that focus only on new frameworks and bundlers it should just be similar to ipfs-101
i.e. ipfs.version()
, ipfs.id()
, ipfs.add(cid)
and ipfs.cat(cid)
Perform bump version automatically
What do you mean by this ? We dont need versions in the examples.
The first task for phase 2 should be just, go through each example and make sure it's as easy as it can be.
All of these should be made as PRs in the js-ipfs repo. Updating the readme and making the examples look better should be done in Phase 4.
The second tasks looks good, if for some reason you can't make js-ipfs work with some new framework or bundler an issue should be created explaining why so the devs can look into it.
@oliveriosousa after talking with @autonome and @achingbrain we feel that the examples should be extracted from the js-ipfs monorepo and recreated in this org
The high level task should be:
npm test
script should run everything needed@achingbrain The PRs already opened in the js-ipfs should be ported over or can we merge them before creating the new examples mono.repo ?
The PRs already opened in the js-ipfs should be ported over or can we merge them before creating the new examples mono.repo ?
I think it would be less disruptive if they go straight into the new examples monorepo.
When publishing a IPFS hash it is being thrown an error running the following code:
Not able to run correctly the example, simply just can't replicate the expected behaviour
Need some help improving the migrated test, it is very inconsistent.
npx playwright test tests --headed
-Run the test always with success :)
UPDATE: was removed 4 days ago
After this commit ( feat: upgrade to the new multiformats (#3556) ) the test started to fail
npm run test:example
-Run the test always with success :)
Swarm listening on /ip4/127.0.0.1/tcp/4002/p2p/QmQwLBDzt1amc8mSxRCznsPuEx9yr8Jafj6wAPByXyLk16 Swarm listening on /ip4/192.168.1.86/tcp/4002/p2p/QmQwLBDzt1amc8mSxRCznsPuEx9yr8Jafj6wAPByXyLk16 Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/p2p/QmQwLBDzt1amc8mSxRCznsPuEx9yr8Jafj6wAPByXyLk16 /Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/blockstore-datastore-adapter/src/index.js:22 throw errcode(new Error('Not a valid cid'), 'ERR_INVALID_CID') ^ Error: Not a valid cid at cidToKey (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/blockstore-datastore-adapter/src/index.js:22:19) at BlockstoreDatastoreAdapter.get (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/blockstore-datastore-adapter/src/index.js:187:27) at Object.get (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-repo/src/pinned-blockstore.js:46:20) at Object.get (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-repo/src/idstore.js:50:20) at loadOrFetchFromNetwork (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-bitswap/src/index.js:246:45) at Bitswap.get (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-bitswap/src/index.js:279:7) at BlockService.get (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-block-service/src/index.js:97:28) at IPLDResolver.get (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipld/src/index.js:155:33) at unixFsResolver (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-unixfs-exporter/src/resolvers/unixfs-v1/index.js:48:27) at resolve (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-unixfs-exporter/src/resolvers/index.js:34:10) { code: 'ERR_INVALID_CID' }
After this commit ( feat: upgrade to the new multiformats (#3556) ) the test started to fail
npm run test:example
-Run the test always with success :)
Testing in-process node Swarm listening on /ip4/127.0.0.1/tcp/4002/p2p/QmdJHXdL4heVQof5sibvmY5QyVU9F7PVj3bVLuMPuBchL1 Swarm listening on /ip4/192.168.1.86/tcp/4002/p2p/QmdJHXdL4heVQof5sibvmY5QyVU9F7PVj3bVLuMPuBchL1 Swarm listening on /ip4/127.0.0.1/tcp/4003/ws/p2p/QmdJHXdL4heVQof5sibvmY5QyVU9F7PVj3bVLuMPuBchL1 Error: Codec "dag-test" not found at Object.getCodeFromName (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/multicodec/src/index.js:90:11) at nameToCodec (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-core/src/components/dag/put.js:18:40) at encodingCodes (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-core/src/components/dag/put.js:98:40) at readEncodingOptions (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-core/src/components/dag/put.js:81:7) at put (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-core/src/components/dag/put.js:37:45) at DagAPI.put (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/ipfs-core-utils/src/with-timeout-option.js:21:46) at main (/Users/oliveriosousa/Projects/PL/js-ipfs-examples/examples/custom-ipld-formats/in-process-node.js:28:30) /Users/oliveriosousa/Projects/PL/js-ipfs-examples/node_modules/execa/lib/error.js:60 error = new Error(message);
When using npm workspaces to install all the necessary dependencies it is not possible to build the projects, but if installed them in the package it works.
Maybe this packages are not properly build to work with monorepos and some dependencies are not being installed...
npm install (in the root project) npm run test:example OR npm run build
-Run the build with success using npm workspaces
Build fails with:
example-browser-create-react-app@1.0.0 test:example npm run build && playwright test tests
example-browser-create-react-app@1.0.0 build react-scripts build
Creating an optimized production build... Failed to compile. Cannot read property 'includes' of undefined
Tracking for Phase 2: Improve ergonomics
Current work:
New examples
Outside examples:
Cherry pick from old example repo
Move examples:
Waiting for discussion
In Progress