Skip to content

Commit aea58c4

Browse files
authored
fix: add sideEffects false to package.json to enable tree shaking (#402)
Also updates project config
1 parent cdc7efd commit aea58c4

File tree

10 files changed

+130
-82
lines changed

10 files changed

+130
-82
lines changed

README.md

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# js-ipfs-unixfs
2+
13
[![ipfs.tech](https://img.shields.io/badge/project-IPFS-blue.svg?style=flat-square)](https://ipfs.tech)
24
[![Discuss](https://img.shields.io/discourse/https/discuss.ipfs.tech/posts.svg?style=flat-square)](https://discuss.ipfs.tech)
35
[![codecov](https://img.shields.io/codecov/c/github/ipfs/js-ipfs-unixfs.svg?style=flat-square)](https://codecov.io/gh/ipfs/js-ipfs-unixfs)

package.json

+28-28
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,6 @@
1212
"url": "https://github.com/ipfs/js-ipfs-unixfs/issues"
1313
},
1414
"private": true,
15-
"scripts": {
16-
"reset": "aegir run clean && aegir clean **/node_modules **/package-lock.json",
17-
"test": "aegir run test",
18-
"test:node": "aegir run test:node",
19-
"test:chrome": "aegir run test:chrome",
20-
"test:chrome-webworker": "aegir run test:chrome-webworker",
21-
"test:firefox": "aegir run test:firefox",
22-
"test:firefox-webworker": "aegir run test:firefox-webworker",
23-
"test:electron-main": "aegir run test:electron-main",
24-
"test:electron-renderer": "aegir run test:electron-renderer",
25-
"clean": "aegir run clean",
26-
"generate": "aegir run generate",
27-
"build": "aegir run build",
28-
"lint": "aegir run lint",
29-
"dep-check": "aegir run dep-check",
30-
"release": "run-s build docs:no-publish npm:release docs",
31-
"npm:release": "aegir release",
32-
"docs": "aegir docs",
33-
"docs:no-publish": "aegir docs --publish false"
34-
},
35-
"devDependencies": {
36-
"aegir": "^42.2.2",
37-
"npm-run-all": "^4.1.5"
38-
},
39-
"workspaces": [
40-
"packages/*"
41-
],
4215
"release": {
4316
"branches": [
4417
"main"
@@ -123,5 +96,32 @@
12396
"@semantic-release/github",
12497
"@semantic-release/git"
12598
]
126-
}
99+
},
100+
"scripts": {
101+
"reset": "aegir run clean && aegir clean **/node_modules **/package-lock.json",
102+
"test": "aegir run test",
103+
"test:node": "aegir run test:node",
104+
"test:chrome": "aegir run test:chrome",
105+
"test:chrome-webworker": "aegir run test:chrome-webworker",
106+
"test:firefox": "aegir run test:firefox",
107+
"test:firefox-webworker": "aegir run test:firefox-webworker",
108+
"test:electron-main": "aegir run test:electron-main",
109+
"test:electron-renderer": "aegir run test:electron-renderer",
110+
"clean": "aegir run clean",
111+
"generate": "aegir run generate",
112+
"build": "aegir run build",
113+
"lint": "aegir run lint",
114+
"dep-check": "aegir run dep-check",
115+
"release": "run-s build docs:no-publish npm:release docs",
116+
"npm:release": "aegir release",
117+
"docs": "aegir docs",
118+
"docs:no-publish": "aegir docs --publish false"
119+
},
120+
"devDependencies": {
121+
"aegir": "^42.2.2",
122+
"npm-run-all": "^4.1.5"
123+
},
124+
"workspaces": [
125+
"packages/*"
126+
]
127127
}

packages/ipfs-unixfs-exporter/README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ipfs-unixfs-exporter <!-- omit in toc -->
1+
# ipfs-unixfs-exporter
22

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

12+
<!--
13+
14+
!IMPORTANT!
15+
16+
Everything in this README between "# About" and "# Install" is automatically
17+
generated and will be overwritten the next time the doc generator is run.
18+
19+
To make changes to this section, please update the @packageDocumentation section
20+
of src/index.js or src/index.ts
21+
22+
To experiment with formatting, please run "npm run docs" from the root of this
23+
repo and examine the changes made.
24+
25+
-->
26+
1227
The UnixFS Exporter provides a means to read DAGs from a blockstore given a CID.
1328

1429
## Example

packages/ipfs-unixfs-exporter/package.json

+24-23
Original file line numberDiff line numberDiff line change
@@ -50,45 +50,46 @@
5050
"dep-check": "aegir dep-check"
5151
},
5252
"dependencies": {
53-
"@ipld/dag-cbor": "^9.0.0",
54-
"@ipld/dag-json": "^10.1.7",
55-
"@ipld/dag-pb": "^4.0.0",
56-
"@multiformats/murmur3": "^2.0.0",
53+
"@ipld/dag-cbor": "^9.2.0",
54+
"@ipld/dag-json": "^10.2.0",
55+
"@ipld/dag-pb": "^4.1.0",
56+
"@multiformats/murmur3": "^2.1.8",
5757
"err-code": "^3.0.1",
58-
"hamt-sharding": "^3.0.0",
59-
"interface-blockstore": "^5.0.0",
58+
"hamt-sharding": "^3.0.6",
59+
"interface-blockstore": "^5.2.10",
6060
"ipfs-unixfs": "^11.0.0",
61-
"it-filter": "^3.0.2",
62-
"it-last": "^3.0.2",
63-
"it-map": "^3.0.3",
64-
"it-parallel": "^3.0.0",
61+
"it-filter": "^3.0.4",
62+
"it-last": "^3.0.4",
63+
"it-map": "^3.0.5",
64+
"it-parallel": "^3.0.6",
6565
"it-pipe": "^3.0.1",
66-
"it-pushable": "^3.1.0",
67-
"multiformats": "^13.0.0",
66+
"it-pushable": "^3.2.3",
67+
"multiformats": "^13.1.0",
6868
"p-queue": "^8.0.1",
6969
"progress-events": "^1.0.0"
7070
},
7171
"devDependencies": {
72-
"@types/readable-stream": "^4.0.1",
73-
"@types/sinon": "^17.0.2",
74-
"aegir": "^42.2.2",
75-
"blockstore-core": "^4.0.1",
72+
"@types/readable-stream": "^4.0.11",
73+
"@types/sinon": "^17.0.3",
74+
"aegir": "^42.2.5",
75+
"blockstore-core": "^4.4.0",
7676
"delay": "^6.0.0",
7777
"ipfs-unixfs-importer": "^15.0.0",
7878
"iso-random-stream": "^2.0.2",
79-
"it-all": "^3.0.2",
80-
"it-buffer-stream": "^3.0.0",
79+
"it-all": "^3.0.4",
80+
"it-buffer-stream": "^3.0.6",
8181
"it-drain": "^3.0.5",
82-
"it-first": "^3.0.2",
83-
"it-to-buffer": "^4.0.2",
82+
"it-first": "^3.0.4",
83+
"it-to-buffer": "^4.0.5",
8484
"merge-options": "^3.0.4",
85-
"readable-stream": "^4.4.0",
85+
"readable-stream": "^4.5.2",
8686
"sinon": "^17.0.1",
87-
"uint8arrays": "^5.0.0",
87+
"uint8arrays": "^5.0.3",
8888
"wherearewe": "^2.0.1"
8989
},
9090
"browser": {
9191
"fs": false,
9292
"readable-stream": false
93-
}
93+
},
94+
"sideEffects": false
9495
}
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"entryPoints": [
33
"./src/index.ts"
4-
],
5-
"readme": "none"
4+
]
65
}

packages/ipfs-unixfs-importer/README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ipfs-unixfs-importer <!-- omit in toc -->
1+
# ipfs-unixfs-importer
22

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

12+
<!--
13+
14+
!IMPORTANT!
15+
16+
Everything in this README between "# About" and "# Install" is automatically
17+
generated and will be overwritten the next time the doc generator is run.
18+
19+
To make changes to this section, please update the @packageDocumentation section
20+
of src/index.js or src/index.ts
21+
22+
To experiment with formatting, please run "npm run docs" from the root of this
23+
repo and examine the changes made.
24+
25+
-->
26+
1227
## Example
1328

1429
Let's create a little directory to import:

packages/ipfs-unixfs-importer/package.json

+19-18
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "15.2.4",
44
"description": "JavaScript implementation of the UnixFs importer used by IPFS",
55
"license": "Apache-2.0 OR MIT",
6-
"homepage": "https://github.com/ipfs/js-ipfs-unixfs/tree/master/packages/ipfs-unixfs-importer#readme",
6+
"homepage": "https://github.com/ipfs/js-ipfs-unixfs/tree/main/packages/ipfs-unixfs-importer#readme",
77
"repository": {
88
"type": "git",
99
"url": "git+https://github.com/ipfs/js-ipfs-unixfs.git"
@@ -74,30 +74,31 @@
7474
"dep-check": "aegir dep-check"
7575
},
7676
"dependencies": {
77-
"@ipld/dag-pb": "^4.0.0",
78-
"@multiformats/murmur3": "^2.0.0",
77+
"@ipld/dag-pb": "^4.1.0",
78+
"@multiformats/murmur3": "^2.1.8",
7979
"err-code": "^3.0.1",
80-
"hamt-sharding": "^3.0.0",
81-
"interface-blockstore": "^5.0.0",
82-
"interface-store": "^5.0.1",
80+
"hamt-sharding": "^3.0.6",
81+
"interface-blockstore": "^5.2.10",
82+
"interface-store": "^5.1.8",
8383
"ipfs-unixfs": "^11.0.0",
84-
"it-all": "^3.0.2",
85-
"it-batch": "^3.0.2",
86-
"it-first": "^3.0.2",
87-
"it-parallel-batch": "^3.0.1",
88-
"multiformats": "^13.0.0",
84+
"it-all": "^3.0.4",
85+
"it-batch": "^3.0.4",
86+
"it-first": "^3.0.4",
87+
"it-parallel-batch": "^3.0.4",
88+
"multiformats": "^13.1.0",
8989
"progress-events": "^1.0.0",
90-
"rabin-wasm": "^0.1.4",
91-
"uint8arraylist": "^2.4.3",
92-
"uint8arrays": "^5.0.0"
90+
"rabin-wasm": "^0.1.5",
91+
"uint8arraylist": "^2.4.8",
92+
"uint8arrays": "^5.0.3"
9393
},
9494
"devDependencies": {
95-
"aegir": "^42.2.2",
96-
"blockstore-core": "^4.0.1",
97-
"it-last": "^3.0.2",
95+
"aegir": "^42.2.5",
96+
"blockstore-core": "^4.4.0",
97+
"it-last": "^3.0.4",
9898
"wherearewe": "^2.0.1"
9999
},
100100
"browser": {
101101
"fs": false
102-
}
102+
},
103+
"sideEffects": false
103104
}

packages/ipfs-unixfs/README.md

+16-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ipfs-unixfs <!-- omit in toc -->
1+
# ipfs-unixfs
22

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

12+
<!--
13+
14+
!IMPORTANT!
15+
16+
Everything in this README between "# About" and "# Install" is automatically
17+
generated and will be overwritten the next time the doc generator is run.
18+
19+
To make changes to this section, please update the @packageDocumentation section
20+
of src/index.js or src/index.ts
21+
22+
To experiment with formatting, please run "npm run docs" from the root of this
23+
repo and examine the changes made.
24+
25+
-->
26+
1227
This module contains the protobuf definition of the UnixFS data structure found at the root of all UnixFS DAGs.
1328

1429
The UnixFS spec can be found in the [ipfs/specs repository](http://github.com/ipfs/specs)

packages/ipfs-unixfs/package.json

+7-6
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,16 @@
5555
},
5656
"dependencies": {
5757
"err-code": "^3.0.1",
58-
"protons-runtime": "^5.0.0",
59-
"uint8arraylist": "^2.4.3"
58+
"protons-runtime": "^5.4.0",
59+
"uint8arraylist": "^2.4.8"
6060
},
6161
"devDependencies": {
62-
"aegir": "^42.2.2",
63-
"protons": "^7.0.2",
64-
"uint8arrays": "^5.0.0"
62+
"aegir": "^42.2.5",
63+
"protons": "^7.5.0",
64+
"uint8arrays": "^5.0.3"
6565
},
6666
"browser": {
6767
"fs": false
68-
}
68+
},
69+
"sideEffects": false
6970
}

packages/ipfs-unixfs/typedoc.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
{
22
"entryPoints": [
33
"./src/index.ts"
4-
],
5-
"readme": "none"
4+
]
65
}

0 commit comments

Comments
 (0)