{"id":15062487,"url":"https://github.com/skovy/yarn-check-webpack-plugin","last_synced_at":"2025-08-02T13:33:53.969Z","repository":{"id":35062757,"uuid":"199960390","full_name":"skovy/yarn-check-webpack-plugin","owner":"skovy","description":"📦 Validate the proper packages are installed","archived":false,"fork":false,"pushed_at":"2022-12-04T07:22:21.000Z","size":9530,"stargazers_count":2,"open_issues_count":38,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-13T08:17:45.126Z","etag":null,"topics":["typescript","webpack","webpack-plugin","yarn"],"latest_commit_sha":null,"homepage":"https://github.com/skovy/yarn-check-webpack-plugin","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/skovy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-01T02:20:22.000Z","updated_at":"2021-03-14T18:39:09.000Z","dependencies_parsed_at":"2023-01-15T13:15:28.740Z","dependency_job_id":null,"html_url":"https://github.com/skovy/yarn-check-webpack-plugin","commit_stats":null,"previous_names":["skovy/yarn-check-integrity-webpack-plugin"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/skovy/yarn-check-webpack-plugin","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Fyarn-check-webpack-plugin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Fyarn-check-webpack-plugin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Fyarn-check-webpack-plugin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Fyarn-check-webpack-plugin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/skovy","download_url":"https://codeload.github.com/skovy/yarn-check-webpack-plugin/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/skovy%2Fyarn-check-webpack-plugin/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268348417,"owners_count":24236295,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["typescript","webpack","webpack-plugin","yarn"],"created_at":"2024-09-24T23:41:07.051Z","updated_at":"2025-08-02T13:33:53.911Z","avatar_url":"https://github.com/skovy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# yarn-check-webpack-plugin\n\n[![npm version](https://badge.fury.io/js/yarn-check-webpack-plugin.svg)](https://badge.fury.io/js/yarn-check-webpack-plugin)\n[![Build Status](https://travis-ci.org/skovy/yarn-check-webpack-plugin.svg?branch=master)](https://travis-ci.org/skovy/yarn-check-webpack-plugin)\n\nWhen working in a large codebase it's likely someone else will add a new package or upgrade an existing package. This often leads to a convoluted webpack error or runtime error as a result of a missing or outdated package.\n\nThe intent of this plugin is to be run in development with webpack so as you checkout different branches or recent changes in version control this plugin can remind you when there are missing or outdated packages.\n\nFor example, say a webpack watch process is running and started on the `master` branch. In the process of working or reviewing code the branch `add-underscore` is checked out (`git checkout add-underscore`). In this case, the branch name gives it away but sometimes it's not immediately obvious that a package was added or changed. This plugin will list the differences between the installed versus expected packages. In this specific example, the `forceKill` option is enabled so the webpack process also exits.\n\n![Demo of yarn-check-webpack-plugin](./docs/yarn-check-webpack-plugin.gif)\n\n## Getting Started\n\nInstall the package:\n\n```bash\nyarn add -D yarn-check-webpack-plugin\nnpm install --save-dev yarn-check-webpack-plugin\n```\n\nAnd add the plugin to `webpack.config.js`:\n\n```javascript\nconst { YarnCheck } = require(\"yarn-check-webpack-plugin\");\n\nmodule.exports = {\n  // Additional configuration...\n  plugins: [new YarnCheck()]\n};\n```\n\nOr, to `webpack.config.ts`:\n\n```typescript\nimport * as webpack from \"webpack\";\nimport { YarnCheck } from \"yarn-check-webpack-plugin\";\n\nconst config: webpack.Configuration = {\n  // Additional configuration...\n  plugins: [new YarnCheck()]\n};\n\nmodule.exports = config;\n```\n\nThen, run `webpack` as normal.\n\n### How do I verify it's working?\n\nFind a random `node_module` (eg: `ls node_modules`) and remove it (eg: `rm -rf node_modules/lodash`) and trigger a rebuild _(by changing a file if in watch mode)_ or by running webpack again.\n\nThe output should include something that looks like:\n\n```\nMissing packages:\n  - lodash\nPlease run `yarn install --check-files` to update.\n```\n\n## Configuration\n\nAll configuration is optional. Pass a configuration object when initializing to change any of the options.\n\nFor example:\n\n```typescript\nnew YarnCheck({\n  rootDirectory: \"./another/directory\",\n  exclude: /underscore/,\n  forceKill: true\n});\n```\n\n### `rootDirectory`\n\n**Type**: String\n\n**Description**: The root directory to run the commands. This should be the directory that contains `package.json`, `yarn.lock` and `node_modules`. By default, it will run in the current directory. This option only needs to be set if this plugin is being run in a different directory.\n\n### `exclude`\n\n**Type**: RegExp\n\n**Description**: Ignore warnings for any missing or wrong version packages that match this regex expression.\n\n### `forceKill`\n\n**Type**: Boolean\n\n**Description**: Force the webpack process to exit if there is an error. This is desirable if you want to ensure the proper packages are installed before continuing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskovy%2Fyarn-check-webpack-plugin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fskovy%2Fyarn-check-webpack-plugin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fskovy%2Fyarn-check-webpack-plugin/lists"}