Skip to content

Commit

Permalink
chore: update publish config
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jan 31, 2024
1 parent a737d05 commit ecfb76d
Show file tree
Hide file tree
Showing 11 changed files with 274 additions and 230 deletions.
1 change: 1 addition & 0 deletions .github/workflows/js-test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ on:

permissions:
contents: write
id-token: write
packages: write

concurrency:
Expand Down
2 changes: 0 additions & 2 deletions .npmrc

This file was deleted.

24 changes: 5 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,40 +7,26 @@

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

- [Structure](#structure)
- [Packages](#packages)
- [API Docs](#api-docs)
- [License](#license)
- [Contribute](#contribute)

## Structure

- [`/packages/protons`](./packages/protons) Protobuf to ts transpiler
- [`/packages/protons-benchmark`](./packages/protons-benchmark) Protobuf to ts transpiler
- [`/packages/protons-runtime`](./packages/protons-runtime) Shared code to make your bundle smaller when running protons in your app

Transpiles `.proto` files to `.ts` - uses `Uint8Array` for `byte` fields and `BigInt` for `int64`/`uint64` and `sint64`.

## Packages
# Packages

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

## API Docs
# API Docs

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

## License
# License

Licensed under either of

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

## Contribute
# Contribute

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

Expand Down
103 changes: 96 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,12 @@
"url": "https://github.com/ipfs/protons/issues"
},
"keywords": [
"interface",
"libp2p"
"protobuf",
"protons"
],
"private": true,
"scripts": {
"reset": "aegir run clean && aegir clean ./node_modules ./package-lock.json packages/*/node_modules packages/*/package-lock.json packages/*/dist",
"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",
Expand All @@ -27,16 +27,105 @@
"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": "aegir run release",
"docs": "aegir docs"
"release": "run-s build docs:no-publish npm:release docs",
"npm:release": "aegir release",
"docs": "aegir docs",
"docs:no-publish": "aegir docs --publish false"
},
"dependencies": {
"aegir": "^42.0.1"
"aegir": "^42.0.1",
"npm-run-all": "^4.1.5"
},
"workspaces": [
"packages/*"
]
],
"release": {
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"revert": true,
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"scope": "no-release",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
"section": "Tests"
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
}
}
21 changes: 12 additions & 9 deletions packages/protons-runtime/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,36 @@

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

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

## Install
It should be declared as a dependency of your project:

```console
npm i protons-runtime
```

# Install

```console
$ npm i protons-runtime
```

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

## API Docs
# API Docs

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

## License
# License

Licensed under either of

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

## Contribute
# Contribute

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

Expand Down
92 changes: 5 additions & 87 deletions packages/protons-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
"bugs": {
"url": "https://github.com/ipfs/protons/issues"
},
"publishConfig": {
"access": "public",
"provenance": true
},
"type": "module",
"types": "./dist/src/index.d.ts",
"files": [
Expand All @@ -33,97 +37,11 @@
"sourceType": "module"
}
},
"release": {
"branches": [
"main"
],
"plugins": [
[
"@semantic-release/commit-analyzer",
{
"preset": "conventionalcommits",
"releaseRules": [
{
"breaking": true,
"release": "major"
},
{
"revert": true,
"release": "patch"
},
{
"type": "feat",
"release": "minor"
},
{
"type": "fix",
"release": "patch"
},
{
"type": "docs",
"release": "patch"
},
{
"type": "test",
"release": "patch"
},
{
"type": "deps",
"release": "patch"
},
{
"scope": "no-release",
"release": false
}
]
}
],
[
"@semantic-release/release-notes-generator",
{
"preset": "conventionalcommits",
"presetConfig": {
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"section": "Trivial Changes"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "test",
"section": "Tests"
}
]
}
}
],
"@semantic-release/changelog",
"@semantic-release/npm",
"@semantic-release/github",
"@semantic-release/git"
]
},
"scripts": {
"clean": "aegir clean",
"lint": "aegir lint",
"dep-check": "aegir dep-check",
"build": "aegir build",
"release": "aegir release"
"build": "aegir build"
},
"dependencies": {
"uint8-varint": "^2.0.2",
Expand Down
12 changes: 12 additions & 0 deletions packages/protons-runtime/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/**
* @packageDocumentation
*
* This module contains serialization/deserialization code used when encoding/decoding protobufs.
*
* It should be declared as a dependency of your project:
*
* ```console
* npm i protons-runtime
* ```
*/

import type { Codec } from './codec.js'

export interface FieldDef {
Expand Down
Loading

0 comments on commit ecfb76d

Please sign in to comment.