{"name":"alge","version":"0.1.0-next.5","repository":{"type":"git","url":"git+ssh://git@github.com/jasonkuhrt/alge.git"},"author":{"name":"Jason Kuhrt"},"packageManager":"yarn@3.2.0","license":"MIT","exports":{".":{"require":"./dist-cjs/index.js","import":"./dist-esm/index.js"}},"main":"./dist-cjs/index.js","module":"./dist-esm/index.js","scripts":{"reflect:toc":"markdown-toc README.md -i --maxdepth 4 && prettier --write README.md","format":"yarn format:prettier","format:prettier":"prettier --write .","format:check":"yarn format:check:prettier","format:check:prettier":"prettier --check .","lint":"eslint . --ext .ts,.tsx --fix","lint:check":"eslint . --ext .ts,.tsx --max-warnings 0","type-check":"yarn tsc --noEmit","dev":"yarn clean && tsc --build --watch tsconfig.cjs.json tsconfig.esm.json","build":"yarn clean && yarn build:cjs && yarn build:esm","build:cjs":"tsc --project tsconfig.cjs.json","build:esm":"tsc --project tsconfig.esm.json","test":"jest","clean":"rm -rf dist-cjs dist-esm node_modules/.cache","release:pr":"dripip pr","release:canary":"dripip preview","release:stable":"dripip stable","prepack":"yarn build","prepare":"ts-patch install -s"},"dependencies":{"endent":"^2.1.0","tslib":"^2.3.1","zod":"^3.14.3"},"devDependencies":{"@jest/types":"27.5.1","@prisma-labs/prettier-config":"0.1.0","@swc/core":"1.2.160","@swc/helpers":"0.3.8","@swc/jest":"0.2.20","@tsconfig/recommended":"1.0.1","@types/jest":"27.4.1","@types/node":"17.0.23","@typescript-eslint/eslint-plugin":"5.16.0","@typescript-eslint/parser":"5.16.0","dripip":"0.10.0","eslint":"8.12.0","eslint-config-prettier":"8.5.0","eslint-plugin-deprecation":"1.3.2","eslint-plugin-only-warn":"1.0.3","eslint-plugin-prefer-arrow":"1.2.3","eslint-plugin-simple-import-sort":"7.0.0","eslint-plugin-tsdoc":"0.2.14","jest":"27.5.1","jest-watch-select-projects":"2.0.0","jest-watch-suspend":"1.1.2","jest-watch-typeahead":"1.0.0","konn":"0.7.0","markdown-toc":"1.2.0","prettier":"2.6.1","ts-jest":"27.1.4","ts-node":"10.7.0","ts-patch":"2.0.1","tsconfig-paths":"3.14.1","typescript":"4.6.3","typescript-snapshots-plugin":"1.7.0","typescript-transform-paths":"3.3.1"},"types":"./dist-cjs/index.d.ts","readme":"# alge\n\n[![trunk](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml/badge.svg)](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml)\n\n<!-- toc -->\n\n- [Quick Start](#quick-start)\n- [Features](#features)\n  - [TypeScript](#typescript)\n  - [ESLint](#eslint)\n  - [Jest](#jest)\n  - [Dripip](#dripip)\n  - [Simple succinct friendly low-barrier issue templates](#simple-succinct-friendly-low-barrier-issue-templates)\n  - [Prettier](#prettier)\n  - [npm scripts for development lifecycle](#npm-scripts-for-development-lifecycle)\n  - [CI with GitHub Actions](#ci-with-github-actions)\n  - [Renovate](#renovate)\n  - [Yarn 2](#yarn-2)\n  - [CJS+ESM Hybrid package build](#cjsesm-hybrid-package-build)\n  - [VSCode Settings](#vscode-settings)\n  - [Readme Table of Contents](#readme-table-of-contents)\n  - [Useful TypeScript Libraries](#useful-typescript-libraries)\n\n<!-- tocstop -->\n\nProject template for TypeScript libraries\n\n### Quick Start\n\n1. Setup a clone of this repo, enable [Corepack](https://nodejs.org/api/corepack.html#enabling-the-feature), and install dependencies:\n\n   ```\n   gh repo clone jasonkuhrt/alge <your package name> && \\\n   cd <your package name> && \\\n   corepack enable && \\\n   yarn\n   ```\n\n1. Run the bootstrap script. You will be prompted to answer some questions:\n\n   ```\n   yarn ts-node scripts/bootstrap\n   ```\n\n1. [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.\n\nExample:\n\n```\ngh repo clone jasonkuhrt/alge foobar \\\n   && cd foobar \\\n   && yarn \\\n   && yarn bootstrap \\\n      --orgAndRepo 'jasonkuhrt/foobar' \\\n      --developerName 'Jason Kuhrt' \\\n      --packageName 'foobar' \\\n      --createGithubRepo\n```\n\n### Features\n\n#### [TypeScript](https://www.typescriptlang.org/) for Type Safety & Productivity\n\n1.  Optimal settings for the safety of your implementation\n\n    1. [`strict`](https://www.typescriptlang.org/tsconfig#strict) mode enabled.\n    1. All lint flags enabled:\n       - [`noImplicitReturns`](https://www.typescriptlang.org/tsconfig#noImplicitReturns)\n       - [`noFallthroughCasesInSwitch`](https://www.typescriptlang.org/tsconfig#noFallthroughCasesInSwitch)\n       - [`noUncheckedIndexedAccess`](https://www.typescriptlang.org/tsconfig#noUncheckedIndexedAccess)\n       - [`noPropertyAccessFromIndexSignature`](https://www.typescriptlang.org/tsconfig#noPropertyAccessFromIndexSignature)\n       - [`noImplicitOverride`](https://www.typescriptlang.org/tsconfig#noImplicitOverride)\n\n1.  `.tsbuildinfo` cache setup, output discretely into `node_modules/.cache`\n\n1.  Inherit settings from [`@tsconfig/recommended` (Node 14 flavour)](https://github.com/tsconfig/bases#node-16-tsconfigjson)\n\n1.  Base `tsconfig.json` shared across `tests`, `src`, and `ts-node`.\n\n1.  [`ts-patch`](https://github.com/nonara/ts-patch) setup for enhanced language features:\n\n    1. [`typescript-transform-paths`](https://github.com/LeDDGroup/typescript-transform-paths) for a **_working_** [tsconfig `paths` config](https://www.typescriptlang.org/tsconfig#paths)!\n    1. Intentional avoidance of [`ttypescript`](https://github.com/microsoft/TypeScript/issues/38365#issuecomment-921889655)\n\n1.  Optimal output setup for your users\n\n    1. Target ES2020 which Node as low as version 14 has good support for ([Kangax compatibility table](https://node.green/#ES2019)).\n    1. [`declaration`](https://www.typescriptlang.org/tsconfig#declaration) so your users can power their intellisense with your packages typings.\n    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\".\n    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.\n    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.\n    1. [`importHelpers`](https://www.typescriptlang.org/tsconfig#importHelpers) enabled to minimize build size.\n    1. Publish `src` with dist files so that jump-to-definition tools work optimally for users.\n\n1.  `ts-node` for running TypeScript scripts/modules.\n\n    1. [Setup to use SWC](https://typestrong.org/ts-node/docs/transpilers/#swc) for maximum speed.\n\n#### [ESLint](https://eslint.org/) For Linting\n\n1.  TypeScript integration\n1.  TS type-checker powered eslint checks enabled\n1.  Prettier integration using just [`eslint-config-prettier`](https://github.com/prettier/eslint-config-prettier). [`eslint-plugin-prettier`](https://github.com/prettier/eslint-plugin-prettier) is _not_ used to avoid lint noise and slower run time. Prettier is expected to be run by your IDE and your CI and if really needed _you manually_ via `yarn format`.\n1.  Setup as a CI check for PRs\n1.  Always display as warning to keep IDE error feedback for TypeScript (CI enforces warnings).\n1.  Auto-fixable import sorting\n\n#### [Jest](https://jestjs.io/) for Testing\n\n1. Transpile TypeScript tests with [`@swc/jest`](https://github.com/swc-project/jest)\n1. Useful watch mode plugins\n   1. [`jest-watch-typeahead`](https://github.com/jest-community/jest-watch-typeahead)\n   1. [`jest-watch-suspend`](https://github.com/unional/jest-watch-suspend)\n   1. [`jest-watch-select-projects`](https://github.com/jest-community/jest-watch-select-projects)\n1. `jest.config.ts` (TypeScript file) for type safe & intellisense configuration.\n1. [`typescript-snapshots-plugin`](https://github.com/asvetliakov/typescript-snapshots-plugin) for viewing snapshots on hover of `.toMatchSnapshot` method.\n1. [`konn`](https://github.com/prisma-labs/konn) for type safe test context creation.\n1. Strongly typed Jest configuration via use of `@jest/types`\n\n#### [Dripip](https://github.com/prisma-labs/dripip) for Releasing\n\n#### Simple succinct friendly low-barrier issue templates\n\n1.  Emojis ✈️\n1.  Feature / bug / docs / something-else\n1.  Config to display discussions link right in new issue type listing UI\n\n#### [Prettier](https://prettier.io/) for code formatting\n\n1.  Prisma Labs config preset, 110 line width\n1.  Setup as a CI check for PRs\n1.  [VSCode extension](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) in recommended extensions list so that when collaborators open the project they'll get prompted to install it if they haven't already.\n1.  npm script\n\n#### npm scripts for development lifecycle\n\n1.  `clean` to remove cache and dist files\n1.  `build` that runs `clean` beforehand\n1.  `prepublishOnly` that runs `build` beforehand\n1.  `format` to quickly run `prettier` over whole codebase\n1.  `lint` to quickly run `eslint` over whole codebase\n\n#### CI with GitHub Actions\n\n1.  Separate trunk and pull-request (PR) workflows.\n1.  [Dependency install cache](https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-dependencies) enabled.\n1.  On PR:\n    1.  Prettier Check\n    1.  Lint Check\n    1.  Tests across matrix of mac/linux/windows for Node 14/16\n1.  On trunk:\n    1. Tests across matrix of mac/linux/windows for Node 14/16\n    1. Automated canary release\n\n#### [Renovate](https://github.com/renovatebot/renovate) configuration\n\n1.  JSON Schema setup for optimal intellisense\n1.  Group all non-major devDependency updates into single PR (which \"chore\" conventional commit type)\n1.  Group all major devDependency updates into single PR (with \"chore\" conventional commit type)\n1.  Group all non-major dependency updates into single PR (with \"deps\" conventional commit type)\n1.  Each major dependency update in own PR (with \"deps\" conventional commit type)\n\n#### [Yarn 2](https://classic.yarnpkg.com/lang/en/) for package management\n\n1.  Painless/familiar workflow via `node_modules` for `nodeLinker`\n1.  Using [Corepack](https://nodejs.org/api/corepack.html#enabling-the-feature). This means the Yarn specified in `package.json` will be used. And note this is a Yarn 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.\n1.  Plugins:\n    1.  [`plugin-outdated`](https://github.com/mskelton/yarn-plugin-outdated) Bring back `outdated` command from Yarn 1.\n    1.  [`plugin-typescript`](https://github.com/yarnpkg/berry/tree/master/packages/plugin-typescript) for painless `@types` consumptions (e.g. You probably forget how to pull down `@types` packages for already-scoped npm packages, doesn't matter now).\n    1.  [`plugin-interactive-tools`](https://github.com/yarnpkg/berry/tree/master/packages/plugin-interactive-tools) for some slick in-terminal project maintenance.\n\n#### CJS+ESM Hybrid package build\n\nSee [Dr. Axel's article about this](https://2ality.com/2019/10/hybrid-npm-packages.html))\n\n1.  Use `exports` field to give support to both modern `import` and legacy `require` consumers using Node 12.x and up. For details about the `exports` field refer to the [Official Node.js Docs](https://nodejs.org/api/packages.html#packages_package_entry_points) about it.\n1.  Use `main` field for legacy versions of Node (before `12.x`) requiring the CJS build.\n1.  Use `module` field for legacy bundlers importing the ESM build.\n\n#### VSCode Settings\n\n1.  Optimize project search by ignoring `dist-*/`, `.yarn/`, snapshots, lock files, and more.\n1.  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))\n1.  List of VSCode extensions that users who open the project will be prompted to install if they don't already.\n1.  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.\n\n#### Readme Table of Contents\n\n1. Using [`markdown-toc`](https://github.com/jonschlinkert/markdown-toc)\n\n#### Useful TypeScript Libraries\n\nHere are some TypeScript libraries you might want to use for your new project:\n\nhttps://github.com/stars/jasonkuhrt/lists/typescript\n\n![Alt](https://repobeats.axiom.co/api/embed/3c932f1cb76da4ad21328bfdd0ad1c6fbbe76a0b.svg 'Repobeats analytics image')\n","readmeFilename":"README.md","gitHead":"2a1746be97c0b5c2fb802721ac2b0d64fd456a38","description":"[![trunk](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml/badge.svg)](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml)","bugs":{"url":"https://github.com/jasonkuhrt/alge/issues"},"homepage":"https://github.com/jasonkuhrt/alge#readme","_id":"alge@0.1.0-next.5","_nodeVersion":"16.14.0","_npmVersion":"8.3.1","dist":{"integrity":"sha512-QoeL8LAwtiZ+JnuCOxqHqdeFIAEHq43UQ28fZW1i7KEXHuNoUAVLfAfoWikPEzSVB35uAZoyYv2pNDNgKTiuNg==","shasum":"487dc6634fc99b0697f6d5fdeb924c45a3473818","tarball":"http://registry-npm.ywwl.com/alge/download/alge-0.1.0-next.5.tgz","fileCount":22,"unpackedSize":64847,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQFlaACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrd7g/+K65291I9Rie+kOGnrLADiC8CyKXJbopr7PCFuIG3WVuFF+km\r\nJgOPYra/9NBVWsFP++hsXOM8GBuv/dkFy0+vEiARATLYm0RdHXlhNgCZQO1D\r\ngOa6m+z0AY3eujAsYarPBmP87Mm0Zsm4+sjWijypNLQFfCboHvFK3gmEOU23\r\nAwodvDhzsdt3SU45VB0ZPYpnPn8nMlv7L5vxbIgIESUkOEhME6O9JmRA6gs7\r\nMn1JaDNV+/pbUQOAemLI6eg1cULhO3ffe/IzPHmiTOmIHUmSEDTrPn2vy3ru\r\nrbocxCXfPQAmQJ+z/DJyd/ShigW5Cucbnwo1rszw14Yzg9x6/sbLrNmK/8iX\r\ntvJq/7P9rv9l3f2oLenDpzlgoprOPUMGEwiBoLbeFzSxpKLyzzMOyBzDQveq\r\ng1XzTm/P7ZAi1dEe2i9P/ot+MMYen2ssTU+EQkaoQDeyxgrE4ucSLpSfjXGA\r\ncs3TWJWKUXlqM3h3cA3tFHAbkJ+JX9ikLt3+aXzWPOM9CNVRFEsTn0HKEP73\r\ncpIQY+6Q0K8FKKOTC/jOLJf2tCBNTfBqNznF3hM4/zoLoftM6+DIWWTvStF0\r\nnhxYvx3OF3xvyte/9bpAcjEFESJNgNKxmRj7DysngJMWgwZd5fbZIg7TrVqS\r\nYTfepnbek0AFauiKJo1ApztGhIlY+yUOhiw=\r\n=/SfD\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCtjv15je/4fGc/ew9GcfhgcEDIE4VFvEkfRp8GHjQRFQIgVAZClqs4UssIHv9C2gmN7ZbR7b030n7YObOuXKQqx5o="}],"size":13720,"noattachment":false,"key":"/alge/-/alge-0.1.0-next.5.tgz"},"_npmUser":{"name":"jasonkuhrt","email":"jasonkuhrt@me.com"},"directories":{},"maintainers":[{"name":"jasonkuhrt","email":"jasonkuhrt@me.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/alge_0.1.0-next.5_1648384346094_0.3352352425727212"},"_hasShrinkwrap":false,"publish_time":1648384346234,"_cnpm_publish_time":1648384346234,"dist-tags":{"latest":"0.8.1","next":"0.8.1"}}