Comments (5)
@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:
- Create ipfs-examples/js-ipfs-examples repo
- Copy all the examples in js-ipfs to the above repo
- The new repo should be a mono-repo using node 16, npm 7 workspaces
- Each example should have tests using https://playwright.dev/docs/test-intro and the
npm test
script should run everything needed - The standalone repos should be updated to pull from this new mono-repo instead of js-ipfs repo
- js-ipfs repo should be able to run tests for each example using the external testing setup that is already used for partners repos
@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 ?
from js-ipfs-examples.
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?
For example:
Stable, Beta, Next, Preview
- What should be the core for all examples ? (MFS API ?)
- Suggestions for more examples 😃
from js-ipfs-examples.
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.
- Check if it actually works properly
- Check if dependencies need to be updated
- Check if the code can be made simpler
- Check if the tooling (npm script, bundler configs, etc) can be made simpler
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.
from js-ipfs-examples.
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.
from js-ipfs-examples.
Current issues:
1. IPNS
Issue description
When publishing a IPFS hash it is being thrown an error running the following code:
Steps to reproduce the issue
- Install and run the example:
- npm install
- npm start
- Create and init an IPFS node (I used IPFS desktop)
- Add new address to handle WS connections
- In the browser (see image below)
- Connect with the API
- Connect via Websocket
- IPFS Hash
What's the expected result?
- Being able to publish an IPFS Hash to IPNS
What's the actual result?
- See image below
Additional details / screenshot
2. Service Worker
Issue description
Not able to run correctly the example, simply just can't replicate the expected behaviour
Steps to reproduce the issue
- Install and run the example:
- npm install
- npm start
- Perform all the steps described in the Readme file
What's the expected result?
- Being able to see IPFS content locally using the URL
What's the actual result?
- It is being displayed always the homepage
Additional details / screenshot
- N/A
3. Exchange files
Issue description
Need some help improving the migrated test, it is very inconsistent.
Steps to reproduce the issue
npx playwright test tests --headed
What's the expected result?
-Run the test always with success :)
What's the actual result?
- Fails a lot of times
Additional details / screenshot
- N/A
4. Explore Ethereum Blockchain
UPDATE: was removed 4 days ago
5. Custom IPFS Repo
Issue description
After this commit ( feat: upgrade to the new multiformats (#3556) ) the test started to fail
Steps to reproduce the issue
npm run test:example
What's the expected result?
-Run the test always with success :)
What's the actual result?
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'
}
6. Custom IPLD format
Issue description
After this commit ( feat: upgrade to the new multiformats (#3556) ) the test started to fail
Steps to reproduce the issue
npm run test:example
What's the expected result?
-Run the test always with success :)
What's the actual result?
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);
7. Create-React-App and Vue
Issue description
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...
Steps to reproduce the issue
npm install (in the root project)
npm run test:example OR npm run build
What's the expected result?
-Run the build with success using npm workspaces
What's the actual result?
Build fails with:
[email protected] test:example
npm run build && playwright test tests
[email protected] build
react-scripts build
Creating an optimized production build...
Failed to compile.
Cannot read property 'includes' of undefined
from js-ipfs-examples.
Related Issues (20)
- js-ipfs + vite + svelte
- Request: Commit lock files
- Update circuit relay configuration to use v2 protocol
- Unable to decode multibase string "addrs", base32 decoder only supports inputs prefixed with b
- next js example does not work HOT 5
- Add ./examples/browser-service-worker-gateways-with-car HOT 1
- "process is not defined" error in "browser-create-react-app" example
- ipfs-repo-migrations package does not have all migration to migrate from version 11 to 12
- Need working simple Node.js ipfs.cat example
- The Angular Compiler requires TypeScript >=4.4.2 and <4.7.0 but 4.7.4 was found instead. HOT 3
- main.cjs to main.js in package.js HOT 2
- Reference Documentation for Implementation of running IPFS Node in Electron
- Browser vite example fails to run HOT 2
- problem in the package "npm ipfs-http-client" HOT 2
- run-in-electron example is broken
- bug: `yarn install` succeeds, but throws errors on M1 Mac HOT 2
- video example documentation unclear
- Error: Database is not open
- browser-readablestream example not working HOT 1
- An error occurred while executing Yarn install
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-ipfs-examples.