{"name":"alge","version":"0.1.0-next.4","repository":{"type":"git","url":"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"},"readmeFilename":"README.md","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","description":"[![trunk](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml/badge.svg)](https://github.com/jasonkuhrt/alge/actions/workflows/trunk.yml)","licenseText":"MIT License\n\nCopyright (c) 2021 Jason Kuhrt\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_id":"alge@0.1.0-next.4","dist":{"shasum":"482be3373f896619c48e3e7077a3dbcb2dca97d8","integrity":"sha512-BhrRE4Zjom2oRwCN9dTsX1dWbA1cb9tbFKi/1Mh1wwXc+lD868RibT+5i8xQDXHlW5g9I/XyoLPR4tnzq9b/Yw==","tarball":"http://registry-npm.ywwl.com/alge/download/alge-0.1.0-next.4.tgz","fileCount":28,"unpackedSize":64848,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJiQFI+ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpzkQ//Q0lSTvffovBt9F2H7wgMZDj0LSowRelbqUNaGHCdSeXFJ+IO\r\nj4bx2xP+ZjXD/6OdpxlL5k9tV1Wqc3DjftLLs3ZlF7ghvol9RT0jDvxUMlxO\r\nhSX0xbfXcGFzsMJgMaYbAgkkVu2gv51S8O2hfDSecY8jaFhKuGXW1hjpEhO6\r\nnDvqT6zdfinO2/JCDMPei/Vxh+V5qCG6E5BVXxh20e4WsP9MLCGLeNMSjWf8\r\nskQhug+FKsBpiZ5e71z1eCI/+fKhPmEotMwnJ5EM5QKGbT3KhQ1FwS/4eGmq\r\nlBjahCJWgsvC877h5d2A5O9SykyzTZ0sVR4X5oO5pDIOmjDQNZ8lHo3egFCP\r\nDY9wwJkw3n7EbXR/ZefwLphp0F6S4EmulRiq3jmiGi5FDWKRUdhaa1KO6jIg\r\nuhYZttpY8km+GhZ/v84X7b3raSmBfW0KVRfLCdFttU2Omrcgg9h+HIj7nKPO\r\noQaGzdMMrWI418XKvTKGgoD5wa/myy78o+I0sqW4frSnJMri68T+ckwKomAp\r\n5985qfskOREIT61ojBiua0gwkn4OtFXysg2RSGxMO/ql4iNV/aVvZN4sIL9x\r\n8zG3Tpt8yyriqK3lv4KaKKueVKWxyfYYzoVkx8419JSQvpXqcjW5MbqXNZ/R\r\nMaMDDaeXk5mwWp4Ube8zrURpBunu93EOdn4=\r\n=xTYl\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFYY2sgsXF45BoZFREF5U3KkpFj3qvSPrKLVRhAN1PPhAiEA3rqv88sslK0THpfBHufU6xuTrvQATG4XRph+2WHhqOw="}],"size":13197,"noattachment":false,"key":"/alge/-/alge-0.1.0-next.4.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.4_1648382526103_0.4736009321983532"},"_hasShrinkwrap":false,"publish_time":1648382526336,"_cnpm_publish_time":1648382526336,"dist-tags":{"latest":"0.8.1","next":"0.8.1"}}