Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: update npm license and repo #110

Merged
merged 3 commits into from
May 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
147 changes: 85 additions & 62 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,14 @@ jobs:
node-version: 16
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
# - name: list tags
# run: git tag
- name: setup git config
run: |
git config user.name "GitHub Actions Bot"
git config user.email "<>"
- name: Install dependencies
run: npm ci
# Troubleshooting issue on bump version - Error: fatal: Unable to create '/home/runner/work/mezzo/mezzo/.git/index.lock': File exists.
# - name: Sleep for 30 seconds
# uses: jakejarvis/wait-action@master
# with:
# time: '2s'
# - name: Cache node modules
# uses: actions/cache@v3
# env:
# cache-name: cache-node-modules
# with:
# path: ~/.npm
# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
# restore-keys: |
# ${{ runner.os }}-build-${{ env.cache-name }}-
- name: Bump Version
run: npm run bumpVersion:ci
# there is some quirkiness here, but some files are modified that don't pass formatting standards, so force formatting & ammend
# But when ammending commit tag is thrown off, so re-apply tag too
- name: Format Files
run: npm run format:fix
- name: get-npm-version
Expand Down Expand Up @@ -81,51 +63,92 @@ jobs:
# draft: true
generateReleaseNotes: true
tag: v${{ steps.package-version.outputs.current-version }}
build-lib:
needs: create-release
strategy:
matrix:
project:
[
'core-client',
'interceptor-react-native-with-reactotron',
'interfaces',
'constants',
'utils-logger',
]
name: Build lib
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- name: Npm install
run: npm ci
- name: install nx
run: npm i -g nx
- name: Build
run: nx build ${{ matrix.project }}
- name: Publish
run: npm publish dist/libs/${{ matrix.project }} --access public
# Kicking off new dependent jobs clone the original commit (I believe) not the one I just made in this job so version # is out of sync when publishing, for now keep all in one job
- name: Build All
run: npm run build:prod
- run: npm publish dist/libs/core-server --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
build-core-server:
needs: create-release
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://registry.npmjs.org'
- run: npm ci
- run: npm run build:prod
- run: npm publish dist/libs/core-server --access public
- run: npm publish dist/libs/core-client --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish dist/libs/core-client --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish dist/libs/constants --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish dist/libs/interceptor-react-native-with-reactotron --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish dist/libs/interfaces --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm publish dist/libs/utils-logger --access public
continue-on-error: true
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - run: npm publish dist/libs/interceptor-fetch --access public
# continue-on-error: true
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# - run: npm publish dist/libs/interceptor-react-native --access public
# continue-on-error: true
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

# build-lib:
# needs: create-release
# strategy:
# matrix:
# project: [
# 'core-client',
# 'interceptor-react-native-with-reactotron',
# 'interfaces',
# 'constants',
# 'utils-logger',
# # 'interceptor-react-native',
# # 'interceptor-fetch'
# ]
# name: Build lib
# runs-on: ubuntu-latest
# timeout-minutes: 10
# steps:
# - name: Checkout
# uses: actions/checkout@v1
# - name: Setup Node
# uses: actions/setup-node@v1
# with:
# node-version: 16
# registry-url: 'https://registry.npmjs.org'
# - name: Npm install
# run: npm ci
# - name: install nx
# run: npm i -g nx
# - name: Build
# run: nx build ${{ matrix.project }}
# - name: Publish
# run: npm publish dist/libs/${{ matrix.project }} --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
# build-core-server:
# needs: create-release
# runs-on: ubuntu-latest
# timeout-minutes: 10
# steps:
# - uses: actions/checkout@v3
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# registry-url: 'https://registry.npmjs.org'
# - run: npm ci
# - run: npm run build:prod
# - run: npm publish dist/libs/core-server --access public
# env:
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
10 changes: 1 addition & 9 deletions libs/constants/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# constants

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test constants` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint constants` to execute the lint via [ESLint](https://eslint.org/).
Holds values used across various mezzo packages
7 changes: 6 additions & 1 deletion libs/constants/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "@caribou-crew/mezzo-constants",
"version": "0.6.6"
"version": "0.6.6",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/caribou-crew/mezzo/tree/main/libs/constants"
}
}
14 changes: 1 addition & 13 deletions libs/core-client/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# FYI

Client only items move here. E.g. socket connections from RN or web based implementation to be intercepted.

# core-client

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test core-client` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint core-client` to execute the lint via [ESLint](https://eslint.org/).
Used by Mezzo's frontend web and interceptors to communicate with mezzo-server via either REST or websockets.
7 changes: 6 additions & 1 deletion libs/core-client/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "@caribou-crew/mezzo-core-client",
"version": "0.6.6"
"version": "0.6.6",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/caribou-crew/mezzo/tree/main/libs/core-client"
}
}
15 changes: 2 additions & 13 deletions libs/core-server/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
# FYI

Consider moving server only items from core to here

# core-server

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test core-server` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint core-server` to execute the lint via [ESLint](https://eslint.org/).
The mock server built on top of express.
Contains a frontend react web app as well at localhost:8000/mezzo
7 changes: 6 additions & 1 deletion libs/core-server/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "@caribou-crew/mezzo-core-server",
"version": "0.6.6"
"version": "0.6.6",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/caribou-crew/mezzo/tree/main/libs/core-server"
}
}
14 changes: 1 addition & 13 deletions libs/interceptor-fetch/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package Status

Currently a work in progress while interceptor-react-native is being focused on.
Currently a work in progress while focus is on interceptor-react-native-with-reactotron.

### Testing against a client locally

Expand All @@ -23,15 +23,3 @@ You'll need to first import react-native-get-random-values per https://github.co

Can this library be updated to detect RN and deal with this on their behalf?
We can likely drop the third party uuid dependency all together if we come up with our own internal random value, it just needs a unique ID per request initiated by client.

# interceptor-fetch

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test interceptor-fetch` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint interceptor-fetch` to execute the lint via [ESLint](https://eslint.org/).
7 changes: 6 additions & 1 deletion libs/interceptor-fetch/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "@caribou-crew/mezzo-interceptor-fetch",
"version": "0.6.6"
"version": "0.6.6",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/caribou-crew/mezzo/tree/main/libs/interceptor-fetch"
}
}
21 changes: 5 additions & 16 deletions libs/interceptor-react-native-with-reactotron/README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
# interceptor-react-native-with-reactotron

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test interceptor-react-native-with-reactotron` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint interceptor-react-native-with-reactotron` to execute the lint via [ESLint](https://eslint.org/).

## Usage

This assumes you've already setup Reactotron.
Expand Down Expand Up @@ -38,11 +26,12 @@ Reactotron.configure({
name: 'React Native Demo',
})
.useReactNative({
asyncStorage: false,
networking: false, // set networking to false if using react native
editor: false,
overlay: false,
})
.use(mezzoAndReactotronNetworking()) // and use mezzo & reactotron networking
.use(
mezzoAndReactotronNetworking({
mezzoPort: 8000,
})
) // and use mezzo & reactotron networking
.connect();
```
5 changes: 5 additions & 0 deletions libs/interceptor-react-native-with-reactotron/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,10 @@
"peerDependencies": {
"reactotron-core-client": "2.x.x",
"react-native": "0.x.x"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/caribou-crew/mezzo/tree/main/libs/interceptor-react-native-with-reactotron"
}
}
12 changes: 4 additions & 8 deletions libs/interceptor-react-native/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
# interceptor-react-native

This library was generated with [Nx](https://nx.dev).
# Package Status

## Running unit tests
Currently a work in progress while focus is on interceptor-react-native-with-reactotron.

Run `nx test interceptor-react-native` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint
# interceptor-react-native

Run `nx lint interceptor-react-native` to execute the lint via [ESLint](https://eslint.org/).
Supports intercepting react-native's `fetch`.
5 changes: 5 additions & 0 deletions libs/interceptor-react-native/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,10 @@
"version": "0.6.6",
"peerDependencies": {
"react-native": "0.x.x"
},
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/caribou-crew/mezzo/tree/main/libs/interceptor-react-native"
}
}
10 changes: 1 addition & 9 deletions libs/interfaces/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# interfaces

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test interfaces` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint interfaces` to execute the lint via [ESLint](https://eslint.org/).
Holds TypeScript types used across various mezzo packages
7 changes: 6 additions & 1 deletion libs/interfaces/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
{
"name": "@caribou-crew/mezzo-interfaces",
"version": "0.6.6"
"version": "0.6.6",
"license": "MIT",
"repository": {
"type": "git",
"url": "https://github.com/caribou-crew/mezzo/tree/main/libs/interfaces"
}
}
10 changes: 1 addition & 9 deletions libs/utils-logger/README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
# utils-logger

This library was generated with [Nx](https://nx.dev).

## Running unit tests

Run `nx test utils-logger` to execute the unit tests via [Jest](https://jestjs.io).

## Running lint

Run `nx lint utils-logger` to execute the lint via [ESLint](https://eslint.org/).
Logging used across various mezzo packages that run in a node runtime
Loading