Skip to content

Commit

Permalink
fixed: not emiting source files, omit source, test files in while pub…
Browse files Browse the repository at this point in the history
…lishing, bump to 0.0.9
  • Loading branch information
Salmandabbakuti committed Sep 29, 2023
1 parent e0e55e3 commit 7f22d21
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
src/
test/
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SuperJWT

![npm version](https://img.shields.io/badge/npm-0.0.7-brightgreen)
![npm version](https://img.shields.io/badge/npm-0.0.9-brightgreen)

Super-JWT is a Node.js package that helps authenticate users based on Superfluid streams using JSON Web Tokens (JWT).

Expand All @@ -9,7 +9,7 @@ Super-JWT is a Node.js package that helps authenticate users based on Superfluid
To install Super-JWT, use npm:

```shell
npm install super-jwt
npm install super-jwt@latest
```

## Usage
Expand Down Expand Up @@ -119,11 +119,17 @@ type Chain =
To publish a new version of the package to npm, run the following command:

```shell
npm run build

npm publish
```

### Change Log

#### 0.0.9

- Omit source and test files when publishing to npm to reduce package size.

#### 0.0.7

- Added more chains to the supported chains list. see [supported chains](#supported-chains) for more information.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "super-jwt",
"version": "0.0.7",
"version": "0.0.9",
"description": "Super-JWT helps to authenticate your users based on Superfluid streams using JSON Web Tokens (JWT)",
"author": "Salman Dabbakuti",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ export async function authenticateWithStream(
): Promise<AuthenticationResult> {
const requiredParams = ["chain", "sender", "receiver", "token"];

if (!requiredParams.every((param) => param in streamPayload)) {
if (!requiredParams.every((param) => streamPayload.hasOwnProperty(param))) {
throw new Error(
"super-jwt: Missing required stream payload params: chain, sender, receiver, token"
);
Expand Down
6 changes: 2 additions & 4 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"include": ["src"],
"exclude": ["./test/", "./node_modules/", "./dist/"],
"compilerOptions": {
"allowImportingTsExtensions": true,
"target": "es5",
"module": "commonjs",
"importHelpers": true,
Expand All @@ -12,7 +11,7 @@
// output .js.map sourcemap files for consumers
"sourceMap": true,
// match output dir to input dir. e.g. dist/index instead of dist/src/index
"rootDir": "./src",
"rootDir": "src",
"outDir": "dist",
// stricter type-checking for stronger correctness. Recommended by TS
"strict": true,
Expand All @@ -31,7 +30,6 @@
// error out if import and file system have a casing mismatch. Recommended by TS
"forceConsistentCasingInFileNames": true,
// `tsdx build` ignores this option, but it is commonly used when type-checking separately with `tsc`
"noEmit": false,
"emitDeclarationOnly": true
"noEmit": false
}
}

0 comments on commit 7f22d21

Please sign in to comment.