Skip to content

Commit

Permalink
fix: add sideEffects false to package.json to enable tree shaking (#402)
Browse files Browse the repository at this point in the history
Also updates project config
  • Loading branch information
achingbrain authored Apr 5, 2024
1 parent cdc7efd commit aea58c4
Show file tree
Hide file tree
Showing 10 changed files with 130 additions and 82 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# js-ipfs-unixfs

[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs-unixfs)
Expand Down
56 changes: 28 additions & 28 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,6 @@
"url": "https://github.com/ipfs/js-ipfs-unixfs/issues"
},
"private": true,
"scripts": {
"reset": "aegir run clean && aegir clean **/node_modules **/package-lock.json",
"test": "aegir run test",
"test:node": "aegir run test:node",
"test:chrome": "aegir run test:chrome",
"test:chrome-webworker": "aegir run test:chrome-webworker",
"test:firefox": "aegir run test:firefox",
"test:firefox-webworker": "aegir run test:firefox-webworker",
"test:electron-main": "aegir run test:electron-main",
"test:electron-renderer": "aegir run test:electron-renderer",
"clean": "aegir run clean",
"generate": "aegir run generate",
"build": "aegir run build",
"lint": "aegir run lint",
"dep-check": "aegir run dep-check",
"release": "run-s build docs:no-publish npm:release docs",
"npm:release": "aegir release",
"docs": "aegir docs",
"docs:no-publish": "aegir docs --publish false"
},
"devDependencies": {
"aegir": "^42.2.2",
"npm-run-all": "^4.1.5"
},
"workspaces": [
"packages/*"
],
"release": {
"branches": [
"main"
Expand Down Expand Up @@ -123,5 +96,32 @@
"@semantic-release/github",
"@semantic-release/git"
]
}
},
"scripts": {
"reset": "aegir run clean && aegir clean **/node_modules **/package-lock.json",
"test": "aegir run test",
"test:node": "aegir run test:node",
"test:chrome": "aegir run test:chrome",
"test:chrome-webworker": "aegir run test:chrome-webworker",
"test:firefox": "aegir run test:firefox",
"test:firefox-webworker": "aegir run test:firefox-webworker",
"test:electron-main": "aegir run test:electron-main",
"test:electron-renderer": "aegir run test:electron-renderer",
"clean": "aegir run clean",
"generate": "aegir run generate",
"build": "aegir run build",
"lint": "aegir run lint",
"dep-check": "aegir run dep-check",
"release": "run-s build docs:no-publish npm:release docs",
"npm:release": "aegir release",
"docs": "aegir docs",
"docs:no-publish": "aegir docs --publish false"
},
"devDependencies": {
"aegir": "^42.2.2",
"npm-run-all": "^4.1.5"
},
"workspaces": [
"packages/*"
]
}
17 changes: 16 additions & 1 deletion packages/ipfs-unixfs-exporter/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ipfs-unixfs-exporter <!-- omit in toc -->
# ipfs-unixfs-exporter

[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
Expand All @@ -9,6 +9,21 @@
# About

<!--
!IMPORTANT!
Everything in this README between "# About" and "# Install" is automatically
generated and will be overwritten the next time the doc generator is run.
To make changes to this section, please update the @packageDocumentation section
of src/index.js or src/index.ts
To experiment with formatting, please run "npm run docs" from the root of this
repo and examine the changes made.
-->

The UnixFS Exporter provides a means to read DAGs from a blockstore given a CID.

## Example
Expand Down
47 changes: 24 additions & 23 deletions packages/ipfs-unixfs-exporter/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,45 +50,46 @@
"dep-check": "aegir dep-check"
},
"dependencies": {
"@ipld/dag-cbor": "^9.0.0",
"@ipld/dag-json": "^10.1.7",
"@ipld/dag-pb": "^4.0.0",
"@multiformats/murmur3": "^2.0.0",
"@ipld/dag-cbor": "^9.2.0",
"@ipld/dag-json": "^10.2.0",
"@ipld/dag-pb": "^4.1.0",
"@multiformats/murmur3": "^2.1.8",
"err-code": "^3.0.1",
"hamt-sharding": "^3.0.0",
"interface-blockstore": "^5.0.0",
"hamt-sharding": "^3.0.6",
"interface-blockstore": "^5.2.10",
"ipfs-unixfs": "^11.0.0",
"it-filter": "^3.0.2",
"it-last": "^3.0.2",
"it-map": "^3.0.3",
"it-parallel": "^3.0.0",
"it-filter": "^3.0.4",
"it-last": "^3.0.4",
"it-map": "^3.0.5",
"it-parallel": "^3.0.6",
"it-pipe": "^3.0.1",
"it-pushable": "^3.1.0",
"multiformats": "^13.0.0",
"it-pushable": "^3.2.3",
"multiformats": "^13.1.0",
"p-queue": "^8.0.1",
"progress-events": "^1.0.0"
},
"devDependencies": {
"@types/readable-stream": "^4.0.1",
"@types/sinon": "^17.0.2",
"aegir": "^42.2.2",
"blockstore-core": "^4.0.1",
"@types/readable-stream": "^4.0.11",
"@types/sinon": "^17.0.3",
"aegir": "^42.2.5",
"blockstore-core": "^4.4.0",
"delay": "^6.0.0",
"ipfs-unixfs-importer": "^15.0.0",
"iso-random-stream": "^2.0.2",
"it-all": "^3.0.2",
"it-buffer-stream": "^3.0.0",
"it-all": "^3.0.4",
"it-buffer-stream": "^3.0.6",
"it-drain": "^3.0.5",
"it-first": "^3.0.2",
"it-to-buffer": "^4.0.2",
"it-first": "^3.0.4",
"it-to-buffer": "^4.0.5",
"merge-options": "^3.0.4",
"readable-stream": "^4.4.0",
"readable-stream": "^4.5.2",
"sinon": "^17.0.1",
"uint8arrays": "^5.0.0",
"uint8arrays": "^5.0.3",
"wherearewe": "^2.0.1"
},
"browser": {
"fs": false,
"readable-stream": false
}
},
"sideEffects": false
}
3 changes: 1 addition & 2 deletions packages/ipfs-unixfs-exporter/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"entryPoints": [
"./src/index.ts"
],
"readme": "none"
]
}
17 changes: 16 additions & 1 deletion packages/ipfs-unixfs-importer/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ipfs-unixfs-importer <!-- omit in toc -->
# ipfs-unixfs-importer

[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
Expand All @@ -9,6 +9,21 @@
# About

<!--
!IMPORTANT!
Everything in this README between "# About" and "# Install" is automatically
generated and will be overwritten the next time the doc generator is run.
To make changes to this section, please update the @packageDocumentation section
of src/index.js or src/index.ts
To experiment with formatting, please run "npm run docs" from the root of this
repo and examine the changes made.
-->

## Example

Let's create a little directory to import:
Expand Down
37 changes: 19 additions & 18 deletions packages/ipfs-unixfs-importer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "15.2.4",
"description": "JavaScript implementation of the UnixFs importer used by IPFS",
"license": "Apache-2.0 OR MIT",
"homepage": "https://github.com/ipfs/js-ipfs-unixfs/tree/master/packages/ipfs-unixfs-importer#readme",
"homepage": "https://github.com/ipfs/js-ipfs-unixfs/tree/main/packages/ipfs-unixfs-importer#readme",
"repository": {
"type": "git",
"url": "git+https://github.com/ipfs/js-ipfs-unixfs.git"
Expand Down Expand Up @@ -74,30 +74,31 @@
"dep-check": "aegir dep-check"
},
"dependencies": {
"@ipld/dag-pb": "^4.0.0",
"@multiformats/murmur3": "^2.0.0",
"@ipld/dag-pb": "^4.1.0",
"@multiformats/murmur3": "^2.1.8",
"err-code": "^3.0.1",
"hamt-sharding": "^3.0.0",
"interface-blockstore": "^5.0.0",
"interface-store": "^5.0.1",
"hamt-sharding": "^3.0.6",
"interface-blockstore": "^5.2.10",
"interface-store": "^5.1.8",
"ipfs-unixfs": "^11.0.0",
"it-all": "^3.0.2",
"it-batch": "^3.0.2",
"it-first": "^3.0.2",
"it-parallel-batch": "^3.0.1",
"multiformats": "^13.0.0",
"it-all": "^3.0.4",
"it-batch": "^3.0.4",
"it-first": "^3.0.4",
"it-parallel-batch": "^3.0.4",
"multiformats": "^13.1.0",
"progress-events": "^1.0.0",
"rabin-wasm": "^0.1.4",
"uint8arraylist": "^2.4.3",
"uint8arrays": "^5.0.0"
"rabin-wasm": "^0.1.5",
"uint8arraylist": "^2.4.8",
"uint8arrays": "^5.0.3"
},
"devDependencies": {
"aegir": "^42.2.2",
"blockstore-core": "^4.0.1",
"it-last": "^3.0.2",
"aegir": "^42.2.5",
"blockstore-core": "^4.4.0",
"it-last": "^3.0.4",
"wherearewe": "^2.0.1"
},
"browser": {
"fs": false
}
},
"sideEffects": false
}
17 changes: 16 additions & 1 deletion packages/ipfs-unixfs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# ipfs-unixfs <!-- omit in toc -->
# ipfs-unixfs

[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
Expand All @@ -9,6 +9,21 @@
# About

<!--
!IMPORTANT!
Everything in this README between "# About" and "# Install" is automatically
generated and will be overwritten the next time the doc generator is run.
To make changes to this section, please update the @packageDocumentation section
of src/index.js or src/index.ts
To experiment with formatting, please run "npm run docs" from the root of this
repo and examine the changes made.
-->

This module contains the protobuf definition of the UnixFS data structure found at the root of all UnixFS DAGs.

The UnixFS spec can be found in the [ipfs/specs repository](http://github.com/ipfs/specs)
Expand Down
13 changes: 7 additions & 6 deletions packages/ipfs-unixfs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,16 @@
},
"dependencies": {
"err-code": "^3.0.1",
"protons-runtime": "^5.0.0",
"uint8arraylist": "^2.4.3"
"protons-runtime": "^5.4.0",
"uint8arraylist": "^2.4.8"
},
"devDependencies": {
"aegir": "^42.2.2",
"protons": "^7.0.2",
"uint8arrays": "^5.0.0"
"aegir": "^42.2.5",
"protons": "^7.5.0",
"uint8arrays": "^5.0.3"
},
"browser": {
"fs": false
}
},
"sideEffects": false
}
3 changes: 1 addition & 2 deletions packages/ipfs-unixfs/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
{
"entryPoints": [
"./src/index.ts"
],
"readme": "none"
]
}

0 comments on commit aea58c4

Please sign in to comment.