@ozkarjs/fhir
Advanced tools
Comparing version 0.0.18 to 0.0.20
{ | ||
"name": "@ozkarjs/fhir", | ||
"module": "index.ts", | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"version": "0.0.20", | ||
"repository": "git@github.com:jasonkuhrt/template-typescript-lib.git", | ||
"author": "Jason Kuhrt", | ||
"packageManager": "pnpm@8.10.4", | ||
"license": "MIT", | ||
"type": "module", | ||
"version": "0.0.18", | ||
"description": "Ozkar library for ZKP with FHIR", | ||
"publishConfig": { | ||
"access": "public" | ||
"files": [ | ||
"src", | ||
"build" | ||
], | ||
"types": "./build/esm/index.d.ts", | ||
"exports": { | ||
".": { | ||
"require": { | ||
"types": "./build/cjs/index.d.ts", | ||
"default": "./build/cjs/index.js" | ||
}, | ||
"import": { | ||
"types": "./build/esm/index.d.ts", | ||
"default": "./build/esm/index.js" | ||
} | ||
} | ||
}, | ||
"scripts": { | ||
"build": "bun build --target=node ./src/index.ts --outfile=dist/index.js && bun run build:declaration", | ||
"build:declaration": "tsc --emitDeclarationOnly --project tsconfig.types.json", | ||
"postbuild": "rimraf tsconfig.types.tsbuildinfo" | ||
"bootstrap": "tsx scripts/bootstrap.ts", | ||
"build:toc": "markdown-toc README.md -i --maxdepth 4 && dprint fmt README.md", | ||
"format": "dprint fmt", | ||
"lint": "eslint . --ext .ts,.tsx --fix", | ||
"dev": "pnpm clean && tsc --build --watch tsconfig.cjs.json tsconfig.esm.json", | ||
"build": "pnpm clean && pnpm build:cjs && pnpm build:esm", | ||
"build:cjs": "tsc --project tsconfig.cjs.json && echo '{\"type\":\"commonjs\"}' > build/cjs/package.json", | ||
"build:esm": "tsc --project tsconfig.esm.json", | ||
"clean": "tsc --build --clean && rm -rf build", | ||
"test": "vitest", | ||
"prepack": "pnpm build", | ||
"check": "pnpm check:format && pnpm check:lint && pnpm check:types", | ||
"check:format": "dprint check", | ||
"check:lint": "eslint . --ext .ts,.tsx --max-warnings 0", | ||
"check:types": "tsc --noEmit" | ||
}, | ||
"devDependencies": { | ||
"bun-types": "latest", | ||
"prettier": "^3.0.3", | ||
"rimraf": "^5.0.5", | ||
"typescript": "^5.2.2" | ||
"@tsconfig/node18": "2.0.1", | ||
"@tsconfig/recommended": "1.0.2", | ||
"@tsconfig/strictest": "2.0.1", | ||
"@types/inquirer": "9.0.3", | ||
"@types/node": "20.3.1", | ||
"@typescript-eslint/eslint-plugin": "5.60.1", | ||
"@typescript-eslint/parser": "5.60.1", | ||
"dripip": "0.10.0", | ||
"eslint": "8.43.0", | ||
"eslint-plugin-deprecation": "1.4.1", | ||
"eslint-plugin-only-warn": "1.1.0", | ||
"eslint-plugin-tsdoc": "0.2.17", | ||
"execa": "7.1.1", | ||
"fast-glob": "3.2.12", | ||
"floggy": "0.3.5", | ||
"fs-jetpack": "5.1.0", | ||
"inquirer": "9.2.7", | ||
"markdown-toc": "1.2.0", | ||
"tsx": "3.12.7", | ||
"typescript": "5.1.3", | ||
"vitest": "0.32.2" | ||
}, | ||
"peerDependencies": { | ||
"typescript": "^5.0.0" | ||
}, | ||
"dependencies": { | ||
"o1js": "^0.15.3" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/iam-robi/ozkarjsfhir.git" | ||
}, | ||
"keywords": [ | ||
"ZKP", | ||
"FHIR" | ||
], | ||
"author": "Robin Sarfati", | ||
"license": "MIT", | ||
"files": [ | ||
"dist/*.js", | ||
"dist/*.d.ts" | ||
] | ||
} | ||
"cid": "github:multiformats/cid", | ||
"hkt-toolbelt": "^0.22.2", | ||
"multiformats": "^13.0.1", | ||
"o1js": "^0.15.3", | ||
"ts-essentials": "^9.4.1" | ||
} | ||
} |
174
README.md
@@ -1,15 +0,171 @@ | ||
# @ozkarjs/fhir | ||
# template-typescript-lib | ||
To install dependencies: | ||
[![trunk](https://github.com/jasonkuhrt/template-typescript-lib/actions/workflows/trunk.yaml/badge.svg)](https://github.com/jasonkuhrt/template-typescript-lib/actions/workflows/trunk.yaml) | ||
```bash | ||
bun install | ||
``` | ||
Project template for Node libraries. Features: | ||
To run: | ||
- Modules: Hybrid ESM/CJS | ||
- Types: TypeScript | ||
- Tests: Vitest | ||
- Linting: ESLint | ||
- Formatting: dprint | ||
- Publishing: Dripip | ||
- Continuous Integration: GitHub Actions | ||
- Dependency Management: Renovate | ||
- Community: Issue Templates | ||
```bash | ||
bun run index.ts | ||
## Quick Start | ||
Make sure you have `corepack` enabled: | ||
``` | ||
$ corepack enable | ||
``` | ||
This project was created using `bun init` in bun v1.0.21. [Bun](https://bun.sh) is a fast all-in-one JavaScript runtime. | ||
### Used as a GitHub Template Repo | ||
The following will get you a ready to go new repository on GitHub based on this one. | ||
1. Run: | ||
``` | ||
gh repo create foobar --template jasonkuhrt/template-typescript-lib --clone --public && \ | ||
cd foobar && \ | ||
pnpm install && \ | ||
pnpm bootstrap | ||
``` | ||
2. [Setup a repo secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) called `NPM_TOKEN` containing an [npm token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) for CI package publishing. | ||
### Used With Manual Git Setup | ||
The following will get you a ready to go new repository on GitHub based on this one. | ||
1. Run: | ||
``` | ||
gh repo clone jasonkuhrt/template-typescript-lib <directory> && \ | ||
cd <directory> && \ | ||
pnpm install && \ | ||
pnpm bootstrap | ||
``` | ||
2. [Setup a repo secret](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets) called `NPM_TOKEN` containing an [npm token](https://docs.npmjs.com/creating-and-viewing-authentication-tokens) for CI package publishing. | ||
## Details | ||
<!-- toc --> | ||
- [TypeScript](#typescript) | ||
- [ESLint](#eslint) | ||
- [Vitest](#vitest) | ||
- [Dripip](#dripip) | ||
- [Simple succinct friendly low-barrier issue templates](#simple-succinct-friendly-low-barrier-issue-templates) | ||
- [dprint](#dprint) | ||
- [npm scripts for development lifecycle](#npm-scripts-for-development-lifecycle) | ||
- [CI with GitHub Actions](#ci-with-github-actions) | ||
- [Renovate](#renovate) | ||
- [PnPM](#pnpm) | ||
- [CJS+ESM Hybrid package build](#cjsesm-hybrid-package-build) | ||
- [VSCode Settings](#vscode-settings) | ||
- [Readme Table of Contents](#readme-table-of-contents) | ||
- [Useful TypeScript Libraries](#useful-typescript-libraries) | ||
<!-- tocstop --> | ||
#### [TypeScript](https://www.typescriptlang.org/) for Type Safety & Productivity | ||
1. Optimal settings for type safety via `@tsconfig/node18` and `@tsconfig/strictest` | ||
1. `.tsbuildinfo` cache setup, output discretely into `node_modules/.cache` | ||
1. Base `tsconfig.json` shared across `tests` and `src`. | ||
1. Optimal output setup for your users | ||
1. [`declaration`](https://www.typescriptlang.org/tsconfig#declaration) so your users can power their intellisense with your packages typings. | ||
1. [`declarationMap`](https://www.typescriptlang.org/tsconfig#declarationMap) enabled to make your published source code be navigated to when your users use "go to definition". | ||
1. `package.json` [`typeVersions`](https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#version-selection-with-typesversions) used to emit only **one** set of declaration files shared by both CJS and ESM builds. | ||
1. [`sourceMap`](https://www.typescriptlang.org/tsconfig#sourceMap) enabled to allow your users' tools to base off the source for e.g. stack traces instead of the less informative derived built JS. | ||
1. Publish `src` with build files so that jump-to-definition tools work optimally for users. | ||
1. `tsx` for running TypeScript scripts/modules. | ||
#### [ESLint](https://eslint.org/) For Linting | ||
1. TypeScript integration | ||
1. TS type-checker powered eslint checks enabled | ||
1. Setup as a CI check for PRs | ||
1. Always display as warning to keep IDE error feedback for TypeScript (CI enforces warnings). | ||
1. Auto-fixable import sorting | ||
#### [Vitest](https://vitest.dev) for Testing | ||
Just Works :) | ||
#### [Dripip](https://github.com/prisma-labs/dripip) for Releasing | ||
#### Simple succinct friendly low-barrier issue templates | ||
1. Emojis ✈️ | ||
1. Feature / bug / docs / something-else | ||
1. Config to display discussions link right in new issue type listing UI | ||
#### [dprint](https://dprint.dev/) for code formatting | ||
1. Setup as a CI check for PRs | ||
1. [VSCode extension](https://marketplace.visualstudio.com/items?itemName=dprint.dprint) in recommended extensions list so that when collaborators open the project they'll get prompted to install it if they haven't already. | ||
1. npm script | ||
#### npm scripts for development lifecycle | ||
1. `clean` to remove cache and build files | ||
1. `build` that runs `clean` beforehand | ||
1. `prepublishOnly` that runs `build` beforehand | ||
1. `format` to run `dprint` over whole codebase | ||
1. `lint` to run `eslint` over whole codebase | ||
#### CI with GitHub Actions | ||
1. Separate trunk and pull-request (PR) workflows. | ||
1. [Dependency install cache](https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies) enabled. | ||
1. On PR: | ||
1. Formatting Check | ||
1. Lint Check | ||
1. Type Check | ||
1. Tests across matrix of mac/linux/windows for Node 14/16 | ||
1. On trunk: | ||
1. Tests across matrix of mac/linux/windows for Node 14/16 | ||
1. Automated canary release | ||
#### [Renovate](https://github.com/renovatebot/renovate) configuration | ||
1. JSON Schema setup for optimal intellisense | ||
1. Group all non-major devDependency updates into single PR (which "chore" conventional commit type) | ||
1. Group all major devDependency updates into single PR (with "chore" conventional commit type) | ||
1. Group all non-major dependency updates into single PR (with "deps" conventional commit type) | ||
1. Each major dependency update in own PR (with "deps" conventional commit type) | ||
#### [PnPM](https://pnpm.io/) for package management | ||
1. Using [Corepack](https://nodejs.org/api/corepack.html#enabling-the-feature). This means the PnPM specified in `package.json` will be used. And note this is a PnPM binary shipped with Node now. In a future version of Node you will not need to even opt-in into Corepack. Make sure you've done `corepack enable` at least once. | ||
#### CJS+ESM Hybrid package build | ||
An [actually working](https://kuhrt.me/logs/hybrid-esm-cjs-node-packages-using-typescript-take-2) hybrid CJS/ESM build. | ||
#### VSCode Settings | ||
1. Optimize project search by recursively (ready for monorepo) ignoring `build/*`, snapshots, lock files, and more. | ||
1. On-Save actions for optimal editing experience (e.g. ESLint auto-fix to [organize imports automatically](https://github.com/lydell/eslint-plugin-simple-import-sort#can-i-use-this-without-autofix)) | ||
1. List of VSCode extensions that users who open the project will be prompted to install if they don't already. | ||
1. Enable `typescript.enablePromptUseWorkspaceTsdk` so that oneself and collaborators will get prompted to use the workspace version of TypeScript instead of the one in the editor. | ||
#### Readme Table of Contents | ||
1. Using [`markdown-toc`](https://github.com/jonschlinkert/markdown-toc) | ||
#### Useful TypeScript Libraries | ||
Here are some TypeScript libraries you might want to use for your new project: | ||
https://github.com/stars/jasonkuhrt/lists/typescript | ||
![Alt](https://repobeats.axiom.co/api/embed/3c932f1cb76da4ad21328bfdd0ad1c6fbbe76a0b.svg 'Repobeats analytics image') |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
GitHub dependency
Supply chain riskContains a dependency which resolves to a GitHub URL. Dependencies fetched from GitHub specifiers are not immutable can be used to inject untrusted code or reduce the likelihood of a reproducible install.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
No repository
Supply chain riskPackage does not have a linked source code repository. Without this field, a package will have no reference to the location of the source code use to generate the package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
205491
70
4025
172
5
21
1
1
1
+ Addedcid@github:multiformats/cid
+ Addedhkt-toolbelt@^0.22.2
+ Addedmultiformats@^13.0.1
+ Addedts-essentials@^9.4.1
+ Addedhkt-toolbelt@0.22.2(transitive)
+ Addedmultiformats@13.3.1(transitive)
+ Addedts-essentials@9.4.2(transitive)
- Removedtypescript@5.7.3(transitive)