Skip to content

Commit

Permalink
Merge pull request #18 from Apillon/v1.0.2
Browse files Browse the repository at this point in the history
fix ApllonModule bug, publish docs, published
  • Loading branch information
tinemlakar authored Nov 30, 2023
2 parents 2b9f86a + e8fd555 commit 908d347
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 12 deletions.
63 changes: 63 additions & 0 deletions PUBLISH.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Publishing to NPM

This document outlines the steps for publishing production and beta releases to NPM.

## Publish Production Release

1. **Set Release Versions**: Update the version number in the `package.json` files of the CLI, SDK, and root directory.

2. **Build and Test**: Ensure all packages are built and tested.

3. **Update Dependencies**:
- In `packages/cli/package.json`, replace the wildcard version in dependencies with the specific version you intend to publish. For example, change `"@apillon/sdk": "*"` to `"@apillon/sdk": "1.0.0"`.

```json
{
...
"dependencies": {
...
"@apillon/sdk": "1.0.0"
}
}
```

4. **Publish Packages**: Use `npm publish` to publish each package, starting with the base package that has no internal dependencies (like SDK).

5. **Revert Changes**: Remember to revert the changes made in step 3 before committing to Git!

## Publish Beta Release

1. **Set Beta Version**: Assign the beta release version in the `package.json` files of the CLI and SDK. Use the format `X.Y.Z-beta.V`.

```json
{
"version": "1.0.1-beta.0"
}
```

2. **Build and Test**: Ensure all packages are built and tested.

3. **Update Dependencies**:
- Similar to the production release, update the internal dependencies in `packages/cli/package.json` to the beta version you are about to publish.

```json
{
...
"dependencies": {
...
"@apillon/sdk": "1.0.1-beta.0"
...
}
}
```

4. **Publish with Beta Tag**: Publish each package with the beta tag using `npm publish --tag beta`, starting with the base package.

```sh
npm publish --tag beta
```

5. **Update Beta Version**: If re-publishing a beta version, increment the beta version tag (e.g., `1.0.1-beta.1`) and repeat the above steps.

6. **Revert Changes**: Remember to revert the changes made in step 3 before committing to Git!

16 changes: 8 additions & 8 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "apillon-web3-tools",
"version": "1.0.1",
"version": "1.0.2",
"description": "Monorepo for Apillon tools",
"author": "Apillon",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/cli/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@apillon/cli",
"description": "▶◀ Apillon CLI tools ▶◀",
"version": "1.0.1",
"version": "1.0.2",
"author": "Apillon",
"license": "MIT",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@apillon/sdk",
"description": "▶◀ Apillon SDK for NodeJS ▶◀",
"version": "1.0.1",
"version": "1.0.2",
"author": "Apillon",
"license": "MIT",
"main": "./dist/index.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/sdk/src/lib/apillon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export class ApillonModule {
public constructor(config?: ApillonConfig) {
ApillonApi.initialize(config);
ApillonLogger.initialize(
config.debug ? LogLevel.VERBOSE : config.logLevel || LogLevel.ERROR,
config?.debug ? LogLevel.VERBOSE : config?.logLevel || LogLevel.ERROR,
);
}
}
Expand Down

0 comments on commit 908d347

Please sign in to comment.