Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ improve: peer dependencies vendoring #1973

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions config/vitest.setup.js

This file was deleted.

1 change: 0 additions & 1 deletion config/vitest.unit.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@ export default {
`tests/unit/*.test.ts`,
`tests/reproductions/*.test.ts`,
],
setupFiles: [`config/vitest.setup.js`],
},
}
29 changes: 15 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,33 +33,34 @@
"@repo/test-kit": "workspace:sources/@repo/test-kit",
"@roots/bud-support": "workspace:sources/@roots/bud-support",
"@skypack/package-check": "0.2.2",
"@types/express": "4.17.14",
"@types/eslint": "8.4.10",
"@types/express": "4.17.15",
"@types/fs-extra": "9.0.13",
"@types/node": "16.18.6",
"@typescript-eslint/eslint-plugin": "5.45.1",
"@typescript-eslint/parser": "5.45.1",
"@vitest/coverage-istanbul": "0.25.8",
"@types/lodash": "4.14.191",
"@types/node": "16.18.11",
"@types/prettier": "2.7.2",
"@typescript-eslint/eslint-plugin": "5.47.1",
"@typescript-eslint/parser": "5.47.1",
"@vitest/coverage-istanbul": "0.26.2",
"@vitest/ui": "0.26.2",
"eslint": "8.29.0",
"eslint": "8.31.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-n": "15.6.0",
"eslint-plugin-react": "7.31.11",
"eslint-plugin-react-hooks": "4.6.0",
"eslint-plugin-simple-import-sort": "8.0.0",
"execa": "6.1.0",
"fs-extra": "10.1.0",
"import-meta-resolve": "2.2.0",
"lodash": "4.17.21",
"playwright": "1.28.1",
"prettier": "2.8.0",
"playwright": "1.29.1",
"prettier": "2.8.1",
"syncpack": "8.4.11",
"ts-node": "10.9.1",
"tslib": "2.4.1",
"typescript": "4.9.3",
"vitest": "0.25.4",
"typescript": "4.9.4",
"vite": "4.0.3",
"vitest": "0.26.2",
"webpack": "5.75.0"
},
"devDependencies": {
"@types/lodash": "^4.14.191",
"eslint-plugin-n": "15.6.0"
}
}
7 changes: 5 additions & 2 deletions sources/@repo/compile-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,17 @@
"@repo/logger": "workspace:sources/@repo/logger",
"@types/fs-extra": "9.0.13",
"@types/lodash-es": "4.17.6",
"@types/node": "16.18.6",
"@types/node": "16.18.11",
"@vercel/ncc": "0.36.0",
"download-package-tarball": "1.0.7",
"fs-extra": "10.1.0",
"get-package-json-from-registry": "2.2.2",
"lodash-es": "4.17.21",
"npm-package-arg": "10.1.0",
"registry-info": "1.0.0",
"vitest": "0.25.4"
"vitest": "0.26.2"
},
"devDependencies": {
"@types/npm-package-arg": "6.1.1"
}
}
4 changes: 2 additions & 2 deletions sources/@repo/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
}
},
"devDependencies": {
"@types/node": "16.18.6",
"vitest": "0.25.4"
"@types/node": "16.18.11",
"vitest": "0.26.2"
},
"volta": {
"extends": "../../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion sources/@repo/docs/content/extensions/bud-entrypoints.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {Install} from '@site/src/docs/Install'

<Install packages="@roots/bud-entrypoints" />

## Example output
## entrypoints.json

Assets are broken down by entrypoint and then filetype.

Expand Down
35 changes: 35 additions & 0 deletions sources/@repo/docs/content/extensions/bud-wordpress-manifests.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: '@roots/bud-wordpress-manifests'
description: 'Include wordpress dependencies in entrypoints.json'
sidebar_label: '@roots/bud-wordpress-manifests'
---

import {Install} from '@site/src/docs/Install'

Installs the following extensions:

- [@roots/bud-entrypoints](bud-entrypoints.mdx)
- [@roots/bud-wordpress-dependencies](https://github.com/roots/bud/tree/main/sources/@roots/bud-wordpress-dependencies)
- [@roots/bud-wordpress-externals](https://github.com/roots/bud/tree/main/sources/@roots/bud-wordpress-externals)

## Installation

<Install packages="@roots/bud-wordpress-manifests" />

## Usage

After installation you'll find any wordpress dependencies utilized in an entrypoint incorporated into `entrypoints.json` under a new `dependencies` key.

Example:

```json title="entrypoints.json"
{
"entrypoint-a": {
"js": ["runtime.js", "entrypoint-a.js"],
"css": ["entrypoint-a.css"],
"dependencies": ["jquery", "lodash", "wp-i18n"]
}
}
```

You can use this information to load wordpress dependencies in [wp_enqueue_scripts](https://developer.wordpress.org/reference/hooks/wp_enqueue_scripts/) or [admin_enqueue_scripts](https://developer.wordpress.org/reference/hooks/admin_enqueue_scripts/).
2 changes: 0 additions & 2 deletions sources/@repo/docs/content/extensions/sage/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import IncludedExtensions from '@site/../../@roots/sage/docs/02-included-extensi

The [Sage docs](https://docs.roots.io/sage/10.x/compiling-assets) cover everything in more detail than can be found here.

The documentation here is focused largely on installation of compatible themes.

## Included extensions

<IncludedExtensions />
12 changes: 5 additions & 7 deletions sources/@repo/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,22 @@
"@repo/constants": "workspace:sources/@repo/constants",
"@svgr/webpack": "6.5.1",
"@tsconfig/docusaurus": "1.0.6",
"@types/node": "16.18.6",
"@types/file-loader": "5.0.1",
"@types/node": "16.18.11",
"@types/react": "17.0.52",
"@types/react-dom": "17.0.18",
"@types/react-helmet": "6.1.6",
"@types/react-reconciler": "0.28.0",
"@types/react-router-dom": "5.3.3",
"file-loader": "6.2.0",
"netlify-cli": "12.2.8",
"netlify-cli": "12.5.0",
"raw-loader": "4.0.2",
"ts-node": "10.9.1",
"typescript": "4.9.3",
"typescript": "4.9.4",
"url-loader": "4.1.1",
"webpack": "5.75.0"
},
"dependencies": {
"@docusaurus/theme-classic": "2.2.0",
"@docusaurus/theme-common": "2.2.0",
"axios": "1.2.1",
"axios": "1.2.2",
"clsx": "1.2.1",
"docusaurus-lunr-search": "2.3.2",
"react": "17.0.2",
Expand Down
7 changes: 5 additions & 2 deletions sources/@repo/logger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,14 @@
},
"dependencies": {
"@repo/constants": "workspace:sources/@repo/constants",
"@types/node": "16.18.6",
"@types/node": "16.18.11",
"signale": "1.4.0",
"vitest": "0.25.4"
"vitest": "0.26.2"
},
"volta": {
"extends": "../../../package.json"
},
"devDependencies": {
"@types/signale": "1.4.4"
}
}
14 changes: 8 additions & 6 deletions sources/@repo/markdown-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
"build": "yarn tsc -b"
},
"devDependencies": {
"@types/node": "16.18.6",
"@types/prettier": "2.7.1",
"vitest": "0.25.4"
"@types/fs-extra": "9.0.13",
"@types/lodash-es": "4.17.6",
"@types/node": "16.18.11",
"@types/prettier": "2.7.2",
"vitest": "0.26.2"
},
"dependencies": {
"@repo/constants": "workspace:sources/@repo/constants",
Expand All @@ -23,16 +25,16 @@
"dotenv": "16.0.3",
"execa": "6.1.0",
"fs-extra": "10.1.0",
"globby": "13.1.2",
"globby": "13.1.3",
"gray-matter": "4.0.3",
"handlebars": "4.7.7",
"helpful-decorators": "2.1.0",
"json5": "2.2.2",
"lodash-es": "4.17.21",
"octokit": "2.0.10",
"prettier": "2.8.0",
"prettier": "2.8.1",
"strip-ansi": "7.0.1",
"typescript": "4.9.3"
"typescript": "4.9.4"
},
"volta": {
"extends": "../../../package.json"
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/notifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
"name": "@repo/notifier",
"private": true,
"devDependencies": {
"@types/node": "16.18.6",
"vitest": "0.25.4"
"@types/node": "16.18.11",
"vitest": "0.26.2"
},
"volta": {
"extends": "../../../package.json"
Expand Down
6 changes: 3 additions & 3 deletions sources/@repo/test-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
"@roots/bud-framework": "workspace:sources/@roots/bud-framework",
"@roots/bud-support": "workspace:sources/@roots/bud-support",
"@types/fs-extra": "9.0.13",
"@types/node": "16.18.6",
"@types/node": "16.18.11",
"chalk": "5.2.0",
"execa": "6.1.0",
"fs-extra": "10.1.0",
"globby": "13.1.2",
"globby": "13.1.3",
"helpful-decorators": "2.1.0",
"json5": "2.2.2",
"tslib": "2.4.1",
"vitest": "0.25.4"
"vitest": "0.26.2"
},
"volta": {
"extends": "../../../package.json"
Expand Down
13 changes: 8 additions & 5 deletions sources/@repo/yarn-plugin-bud/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@
},
"devDependencies": {
"@types/fs-extra": "9.0.13",
"@types/node": "16.18.6",
"@types/js-yaml": "4.0.5",
"@types/lodash": "4.14.191",
"@types/node": "16.18.11",
"@types/semver": "7.3.13",
"@yarnpkg/builder": "3.2.6"
},
"dependencies": {
"@repo/constants": "workspace:sources/@repo/constants",
"@yarnpkg/cli": "3.3.0",
"@yarnpkg/core": "3.3.0",
"@yarnpkg/cli": "3.3.1",
"@yarnpkg/core": "3.3.1",
"@yarnpkg/shell": "3.2.5",
"clipanion": "3.2.0-rc.14",
"fs-extra": "10.1.0",
Expand All @@ -24,8 +27,8 @@
"pm2": "5.2.2",
"semver": "7.3.8",
"tslib": "2.4.1",
"typescript": "4.9.3",
"verdaccio": "5.18.0"
"typescript": "4.9.4",
"verdaccio": "5.19.0"
},
"volta": {
"node": "16.18.0",
Expand Down
11 changes: 6 additions & 5 deletions sources/@repo/yarn-plugin-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@
},
"dependencies": {
"@types/fs-extra": "9.0.13",
"@types/node": "16.18.6",
"@types/lodash-es": "4.17.6",
"@types/node": "16.18.11",
"@yarnpkg/builder": "3.2.6",
"@yarnpkg/cli": "3.3.0",
"@yarnpkg/core": "3.3.0",
"@yarnpkg/cli": "3.3.1",
"@yarnpkg/core": "3.3.1",
"@yarnpkg/shell": "3.2.5",
"clipanion": "3.2.0-rc.14",
"fs-extra": "10.1.0",
"helpful-decorators": "2.1.0",
"lodash-es": "4.17.21",
"tslib": "2.4.1",
"typescript": "4.9.3",
"vitest": "0.25.4"
"typescript": "4.9.4",
"vitest": "0.26.2"
},
"volta": {
"extends": "../../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"@roots/bud-extensions": "workspace:sources/@roots/bud-extensions",
"@roots/bud-terser": "workspace:sources/@roots/bud-terser",
"@skypack/package-check": "0.2.2",
"@types/node": "16.18.6"
"@types/node": "16.18.11"
},
"dependencies": {
"@roots/bud-framework": "workspace:sources/@roots/bud-framework",
Expand Down
5 changes: 4 additions & 1 deletion sources/@roots/bud-babel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,10 @@
"devDependencies": {
"@roots/bud": "workspace:sources/@roots/bud",
"@skypack/package-check": "0.2.2",
"@types/node": "16.18.6",
"@types/babel__core": "7.1.20",
"@types/babel__plugin-transform-runtime": "7.9.2",
"@types/babel__preset-env": "7.9.2",
"@types/node": "16.18.11",
"webpack": "5.75.0"
},
"dependencies": {
Expand Down
16 changes: 2 additions & 14 deletions sources/@roots/bud-build/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,23 +75,11 @@
"@roots/bud-api": "workspace:sources/@roots/bud-api",
"@roots/bud-hooks": "workspace:sources/@roots/bud-hooks",
"@skypack/package-check": "0.2.2",
"@types/node": "16.18.6"
"@types/node": "16.18.11"
},
"dependencies": {
"@roots/bud-framework": "workspace:sources/@roots/bud-framework",
"@roots/bud-support": "workspace:sources/@roots/bud-support",
"css-loader": "^6.7.2",
"csv-loader": "^3.0.5",
"file-loader": "^6.2.0",
"helpful-decorators": "2.1.0",
"html-loader": "^4.2.0",
"mini-svg-data-uri": "1.4.4",
"remark": "14.0.2",
"remark-html": "15.0.1",
"remark-loader": "5.0.0",
"style-loader": "3.3.1",
"xml-loader": "1.2.1",
"yml-loader": "2.1.0"
"@roots/bud-support": "workspace:sources/@roots/bud-support"
},
"volta": {
"extends": "../../../package.json"
Expand Down
16 changes: 8 additions & 8 deletions sources/@roots/bud-build/src/handlers/loaders/loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,28 +4,28 @@ import * as MiniCss from '@roots/bud-support/mini-css-extract-plugin'
import type {Factory} from '../index.js'

export const css: Factory<Loader> = ({makeLoader}) =>
makeLoader(`css-loader`)
makeLoader(`@roots/bud-support/css-loader`)

export const csv: Factory<Loader> = ({makeLoader}) =>
makeLoader(`csv-loader`)
makeLoader(`@roots/bud-support/csv-loader`)

export const file: Factory<Loader> = ({makeLoader}) =>
makeLoader(`file-loader`)
makeLoader(`@roots/bud-support/file-loader`)

export const html: Factory<Loader> = ({makeLoader}) =>
makeLoader(`html-loader`)
makeLoader(`@roots/bud-support/html-loader`)

export const remark: Factory<Loader> = ({makeLoader}) =>
makeLoader(`remark-loader`)
makeLoader(`@roots/bud-support/remark-loader`)

export const minicss: Factory<Loader> = ({makeLoader}) =>
makeLoader(MiniCss.loader)

export const style: Factory<Loader> = ({makeLoader}) =>
makeLoader(`style-loader`)
makeLoader(`@roots/bud-support/style-loader`)

export const xml: Factory<Loader> = ({makeLoader}) =>
makeLoader(`xml-loader`)
makeLoader(`@roots/bud-support/xml-loader`)

export const yml: Factory<Loader> = ({makeLoader}) =>
makeLoader(`yml-loader`)
makeLoader(`@roots/bud-support/yml-loader`)
Loading