{"id":14976288,"url":"https://github.com/webpack/tooling","last_synced_at":"2025-10-19T11:30:31.556Z","repository":{"id":41545194,"uuid":"249711153","full_name":"webpack/tooling","owner":"webpack","description":"A collection of reusable tooling for webpack repos.","archived":false,"fork":false,"pushed_at":"2024-10-23T20:26:59.000Z","size":163,"stargazers_count":20,"open_issues_count":2,"forks_count":12,"subscribers_count":42,"default_branch":"main","last_synced_at":"2024-10-29T14:58:06.311Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/webpack.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-24T13:09:40.000Z","updated_at":"2024-10-23T20:27:03.000Z","dependencies_parsed_at":"2023-12-19T09:51:06.857Z","dependency_job_id":"e5bfcf9b-09ff-4de6-a733-feafec8d5f16","html_url":"https://github.com/webpack/tooling","commit_stats":{"total_commits":113,"total_committers":9,"mean_commits":"12.555555555555555","dds":"0.23008849557522126","last_synced_commit":"5f9eb3dff9a29dd306be59579fe13609de9062e4"},"previous_names":[],"tags_count":40,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack%2Ftooling","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack%2Ftooling/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack%2Ftooling/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webpack%2Ftooling/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webpack","download_url":"https://codeload.github.com/webpack/tooling/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236773795,"owners_count":19202486,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:53:39.347Z","updated_at":"2025-10-19T11:30:31.539Z","avatar_url":"https://github.com/webpack.png","language":"JavaScript","readme":"# tooling\n\nA collection of reusable tooling for webpack repos\n\n## Setup\n\nAdd this repo as dev dependency:\n\n```json\n\"devDependencies\": {\n    \"tooling\": \"webpack/tooling\"\n}\n```\n\nThe lockfile will take care pinning the version.\nRun `yarn upgrade tooling` to upgrade the to latest version.\n\nAdd two scripts to the package.json:\n\n```json\n\"scripts\": {\n    \"lint:special\": \"...\",\n    \"fix:special\": \"...\"\n}\n```\n\nAdd all tooling that should be used to these scripts (concatenated with `\u0026\u0026`). In the `fix:special` version pass `--write` to all tooling.\n\nExample:\n\n```json\n\"scripts\": {\n    \"lint:special\": \"node node_modules/tooling/compile-to-definitions\",\n    \"fix:special\": \"node node_modules/tooling/compile-to-definitions --write\"\n}\n```\n\n## Common arguments\n\nBy default all tooling checks if affected files are up-to-date, so it can be added as linting step in CI.\nUse `--write` to switch to updating mode.\nIn this mode affected files are updated to the fixed version when possible.\n\nBy default all tooling will operate in the root directory of the calling project.\nUse `--root some/dir` to operate in a different directory.\n\nSome tooling displays more information when `--verbose` is used.\n\nMost tooling uses prettier to format generated files, so a prettier config is needed and prettier need to be installed.\n\n## lockfile-lint\n\n```sh\nnode node_modules/tooling/lockfile-lint\n```\n\nVerifies the correctness of a yarn lockfile.\nMakes sure that all dependencies are provided from npm (e. g. not github dependencies).\nThis is important as some users might not be able to access github.\n\n`yarn.lock` must be present in root directory.\n\n## schemas-lint\n\n```sh\nnode node_modules/tooling/schemas-lint\n```\n\nVerifies the correctness of all JSON schemas.\n\n- Definitions and properties need to a `description` in the correct format.\n- Only allowed properties are used.\n- `$ref` must be the only property when provided.\n- `tsType` is needed when `instanceof` is used.\n- `type: \"string\"` is needed when `absolutePath` is used.\n- `additionalProperties` is needed when `properties` are used.\n\n```text\n--schemas ./schemas/**/*.json\n```\n\nGlob to the schemas that should be processed.\n\n## compile-to-definitions\n\n```sh\nnode node_modules/tooling/compile-to-definitions\n```\n\nGenerates typescript declaration files from JSON schemas.\n\n```text\n--schemas ./schemas/**/*.json\n```\n\nGlob to the schemas that should be processed.\n\n```text\n---declarations declarations\n```\n\nOutput folder of the generated declaration files.\n\n## precompile-schemas\n\n```sh\nnode node_modules/tooling/precompile-schemas\n```\n\nGenerate `.check.js` files next to the JSON schemas.\nThey export a single function which returned a boolean whether the object is validate according to the schema.\nThis function doesn't do error handling, so run a real schema validation when it returns false.\n\nIt will also generate a `.check.d.ts` file with type declarations.\n\n```text\n--schemas ./schemas/**/*.json\n```\n\nGlob to the schemas that should be processed.\n\n```text\n---declarations declarations\n```\n\nFolder of the generated declaration files.\n\n## inherit-types\n\n```sh\nnode node_modules/tooling/inherit-types\n```\n\nSynchronize jsdoc method annotations in classes with jsdoc of the same method in base class.\nThis copies jsdoc one to one from base class, but omits `@abstract`.\n\n`tsconfig.json` must be present in root directory and typescript must be installed.\n\n## format-file-header\n\n```sh\nnode node_modules/tooling/format-file-header\n```\n\nEnsures that the starting of all source files follows the following convention:\n\n```js\n/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor ...\n*/\n\n\"use strict\";\n\nconst Import = require(\"./Import\");\nconst SortedAlphabetically = require(\"./SortedAlphabetically\");\n\n/** @typedef {import(\"../TypeImport\")} TypeImport */\n/** @typedef {import(\"../SortedAlphabetically\")} SortedAlphabetically */\n```\n\n```text\n--source ./lib/**/*.js\n```\n\nGlob to the source that should be processed.\n\n## format-schemas\n\n```sh\nnode node_modules/tooling/format-schemas\n```\n\nSort JSON schema according to convention.\n\n```text\n--schemas ./schemas/**/*.json\n```\n\nGlob to the schemas that should be processed.\n\n## generate-types\n\n```sh\nnode node_modules/tooling/generate-types\n```\n\nGenerate typescript types declarations file (`types.d.ts`) from the visible types in the exposed `main` (package.json) entry file.\nThis declaration file should be used as `types` in `package.json`.\n\nWhen a `declarations/index.d.ts` file exists, types from this are also exposed.\n\n`tsconfig.types.json` must be present in root directory and typescript must be installed.\n\n```text\n--types types.d.ts\n```\n\nPath of the generated declarations file.\n\n## type-coverage\n\n```sh\nnode node_modules/tooling/generate-types\n```\n\nGenerates type coverage raw coverage data in the `coverage` directory.\n`instanbul report` can be used to generate a readable report.\n\n`tsconfig.json` must be present in root directory and typescript must be installed.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpack%2Ftooling","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebpack%2Ftooling","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebpack%2Ftooling/lists"}