Skip to content

Commit 942e050

Browse files
committed
chore: update publish config
1 parent a737d05 commit 942e050

File tree

11 files changed

+275
-231
lines changed

11 files changed

+275
-231
lines changed

.github/workflows/js-test-and-release.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ on:
99

1010
permissions:
1111
contents: write
12-
packages: write
12+
id-token: write
13+
pull-requests: write
1314

1415
concurrency:
1516
group: ${{ github.workflow }}-${{ github.event_name }}-${{ github.event_name == 'push' && github.sha || github.ref }}

.npmrc

-2
This file was deleted.

README.md

+5-19
Original file line numberDiff line numberDiff line change
@@ -7,40 +7,26 @@
77

88
> Protobuf to ts transpiler
99
10-
## Table of contents <!-- omit in toc -->
10+
`protons` is a high performance implementation of [Protocol Buffers v3](https://protobuf.dev/programming-guides/proto3/).
1111

12-
- [Structure](#structure)
13-
- [Packages](#packages)
14-
- [API Docs](#api-docs)
15-
- [License](#license)
16-
- [Contribute](#contribute)
17-
18-
## Structure
19-
20-
- [`/packages/protons`](./packages/protons) Protobuf to ts transpiler
21-
- [`/packages/protons-benchmark`](./packages/protons-benchmark) Protobuf to ts transpiler
22-
- [`/packages/protons-runtime`](./packages/protons-runtime) Shared code to make your bundle smaller when running protons in your app
23-
24-
Transpiles `.proto` files to `.ts` - uses `Uint8Array` for `byte` fields and `BigInt` for `int64`/`uint64` and `sint64`.
25-
26-
## Packages
12+
# Packages
2713

2814
- [`/packages/protons`](./packages/protons) The transpiler
2915
- [`/packages/protons-benchmark`](./packages/protons-benchmark) A benchmark suite
3016
- [`/packages/protons-runtime`](./packages/protons-runtime) Shared components that turn values to bytes and back again
3117

32-
## API Docs
18+
# API Docs
3319

3420
- <https://ipfs.github.io/protons>
3521

36-
## License
22+
# License
3723

3824
Licensed under either of
3925

4026
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
4127
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
4228

43-
## Contribute
29+
# Contribute
4430

4531
Contributions welcome! Please check out [the issues](https://github.com/ipfs/protons/issues).
4632

package.json

+96-7
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212
"url": "https://github.com/ipfs/protons/issues"
1313
},
1414
"keywords": [
15-
"interface",
16-
"libp2p"
15+
"protobuf",
16+
"protons"
1717
],
1818
"private": true,
1919
"scripts": {
20-
"reset": "aegir run clean && aegir clean ./node_modules ./package-lock.json packages/*/node_modules packages/*/package-lock.json packages/*/dist",
20+
"reset": "aegir run clean && aegir clean **/node_modules **/package-lock.json",
2121
"test": "aegir run test",
2222
"test:node": "aegir run test:node",
2323
"test:chrome": "aegir run test:chrome",
@@ -27,16 +27,105 @@
2727
"test:electron-main": "aegir run test:electron-main",
2828
"test:electron-renderer": "aegir run test:electron-renderer",
2929
"clean": "aegir run clean",
30+
"generate": "aegir run generate",
3031
"build": "aegir run build",
3132
"lint": "aegir run lint",
3233
"dep-check": "aegir run dep-check",
33-
"release": "aegir run release",
34-
"docs": "aegir docs"
34+
"release": "run-s build docs:no-publish npm:release docs",
35+
"npm:release": "aegir release",
36+
"docs": "aegir docs",
37+
"docs:no-publish": "aegir docs --publish false"
3538
},
3639
"dependencies": {
37-
"aegir": "^42.0.1"
40+
"aegir": "^42.0.1",
41+
"npm-run-all": "^4.1.5"
3842
},
3943
"workspaces": [
4044
"packages/*"
41-
]
45+
],
46+
"release": {
47+
"branches": [
48+
"main"
49+
],
50+
"plugins": [
51+
[
52+
"@semantic-release/commit-analyzer",
53+
{
54+
"preset": "conventionalcommits",
55+
"releaseRules": [
56+
{
57+
"breaking": true,
58+
"release": "major"
59+
},
60+
{
61+
"revert": true,
62+
"release": "patch"
63+
},
64+
{
65+
"type": "feat",
66+
"release": "minor"
67+
},
68+
{
69+
"type": "fix",
70+
"release": "patch"
71+
},
72+
{
73+
"type": "docs",
74+
"release": "patch"
75+
},
76+
{
77+
"type": "test",
78+
"release": "patch"
79+
},
80+
{
81+
"type": "deps",
82+
"release": "patch"
83+
},
84+
{
85+
"scope": "no-release",
86+
"release": false
87+
}
88+
]
89+
}
90+
],
91+
[
92+
"@semantic-release/release-notes-generator",
93+
{
94+
"preset": "conventionalcommits",
95+
"presetConfig": {
96+
"types": [
97+
{
98+
"type": "feat",
99+
"section": "Features"
100+
},
101+
{
102+
"type": "fix",
103+
"section": "Bug Fixes"
104+
},
105+
{
106+
"type": "chore",
107+
"section": "Trivial Changes"
108+
},
109+
{
110+
"type": "docs",
111+
"section": "Documentation"
112+
},
113+
{
114+
"type": "deps",
115+
"section": "Dependencies"
116+
},
117+
{
118+
"type": "test",
119+
"section": "Tests"
120+
}
121+
]
122+
}
123+
}
124+
],
125+
"@semantic-release/changelog",
126+
"@semantic-release/npm",
127+
"@semantic-release/github",
128+
"@semantic-release/git"
129+
]
130+
}
42131
}

packages/protons-runtime/README.md

+12-9
Original file line numberDiff line numberDiff line change
@@ -7,33 +7,36 @@
77

88
> Shared code to make your bundle smaller when running protons in your app
99
10-
## Table of contents <!-- omit in toc -->
10+
# About
1111

12-
- [Install](#install)
13-
- [API Docs](#api-docs)
14-
- [License](#license)
15-
- [Contribute](#contribute)
12+
This module contains serialization/deserialization code used when encoding/decoding protobufs.
1613

17-
## Install
14+
It should be declared as a dependency of your project:
15+
16+
```console
17+
npm i protons-runtime
18+
```
19+
20+
# Install
1821

1922
```console
2023
$ npm i protons-runtime
2124
```
2225

2326
Contains shared code to reduce code duplication between modules transpiled by protons.
2427

25-
## API Docs
28+
# API Docs
2629

2730
- <https://ipfs.github.io/protons/modules/protons_runtime.html>
2831

29-
## License
32+
# License
3033

3134
Licensed under either of
3235

3336
- Apache 2.0, ([LICENSE-APACHE](LICENSE-APACHE) / <http://www.apache.org/licenses/LICENSE-2.0>)
3437
- MIT ([LICENSE-MIT](LICENSE-MIT) / <http://opensource.org/licenses/MIT>)
3538

36-
## Contribute
39+
# Contribute
3740

3841
Contributions welcome! Please check out [the issues](https://github.com/ipfs/protons/issues).
3942

packages/protons-runtime/package.json

+5-87
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@
1111
"bugs": {
1212
"url": "https://github.com/ipfs/protons/issues"
1313
},
14+
"publishConfig": {
15+
"access": "public",
16+
"provenance": true
17+
},
1418
"type": "module",
1519
"types": "./dist/src/index.d.ts",
1620
"files": [
@@ -33,97 +37,11 @@
3337
"sourceType": "module"
3438
}
3539
},
36-
"release": {
37-
"branches": [
38-
"main"
39-
],
40-
"plugins": [
41-
[
42-
"@semantic-release/commit-analyzer",
43-
{
44-
"preset": "conventionalcommits",
45-
"releaseRules": [
46-
{
47-
"breaking": true,
48-
"release": "major"
49-
},
50-
{
51-
"revert": true,
52-
"release": "patch"
53-
},
54-
{
55-
"type": "feat",
56-
"release": "minor"
57-
},
58-
{
59-
"type": "fix",
60-
"release": "patch"
61-
},
62-
{
63-
"type": "docs",
64-
"release": "patch"
65-
},
66-
{
67-
"type": "test",
68-
"release": "patch"
69-
},
70-
{
71-
"type": "deps",
72-
"release": "patch"
73-
},
74-
{
75-
"scope": "no-release",
76-
"release": false
77-
}
78-
]
79-
}
80-
],
81-
[
82-
"@semantic-release/release-notes-generator",
83-
{
84-
"preset": "conventionalcommits",
85-
"presetConfig": {
86-
"types": [
87-
{
88-
"type": "feat",
89-
"section": "Features"
90-
},
91-
{
92-
"type": "fix",
93-
"section": "Bug Fixes"
94-
},
95-
{
96-
"type": "chore",
97-
"section": "Trivial Changes"
98-
},
99-
{
100-
"type": "docs",
101-
"section": "Documentation"
102-
},
103-
{
104-
"type": "deps",
105-
"section": "Dependencies"
106-
},
107-
{
108-
"type": "test",
109-
"section": "Tests"
110-
}
111-
]
112-
}
113-
}
114-
],
115-
"@semantic-release/changelog",
116-
"@semantic-release/npm",
117-
"@semantic-release/github",
118-
"@semantic-release/git"
119-
]
120-
},
12140
"scripts": {
12241
"clean": "aegir clean",
12342
"lint": "aegir lint",
12443
"dep-check": "aegir dep-check",
125-
"build": "aegir build",
126-
"release": "aegir release"
44+
"build": "aegir build"
12745
},
12846
"dependencies": {
12947
"uint8-varint": "^2.0.2",

packages/protons-runtime/src/index.ts

+12
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
/**
2+
* @packageDocumentation
3+
*
4+
* This module contains serialization/deserialization code used when encoding/decoding protobufs.
5+
*
6+
* It should be declared as a dependency of your project:
7+
*
8+
* ```console
9+
* npm i protons-runtime
10+
* ```
11+
*/
12+
113
import type { Codec } from './codec.js'
214

315
export interface FieldDef {

0 commit comments

Comments
 (0)