Skip to content

Commit

Permalink
🩹 fix(minor): #2518 (#2519)
Browse files Browse the repository at this point in the history
- Fixes #2518 by setting up asset/resources and asset/inline rules before the main `oneOf` group, each in their own `ownOf` ruleset.
- Simplifies `@roots/bud-vue`, which doesn't need to handle this exceptionally any longer
- Adds an integration test specifically targeting this to prevent regressions

Whoops, this also bumps us up to yarn v4. I thought I branched that before committing but we want to do this anyway, for sure.

## Type of change

**MINOR: feature**
  • Loading branch information
kellymears authored Dec 12, 2023
1 parent 20fd66c commit 292f455
Show file tree
Hide file tree
Showing 253 changed files with 14,301 additions and 14,473 deletions.
2 changes: 1 addition & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"autoAttachChildProcesses": true,
"skipFiles": ["<node_internals>/**", "**/node_modules/**"],
"program": "${workspaceRoot}/node_modules/.bin/bud",
"args": ["build", "--log", "--verbose", "--ci"],
"args": ["build"],
"smartStep": true,
"console": "integratedTerminal",
"cwd": "${workspaceRoot}/tests/util/project"
Expand Down
52 changes: 0 additions & 52 deletions .yarn/plugins/@yarnpkg/plugin-constraints.cjs

This file was deleted.

541 changes: 0 additions & 541 deletions .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs

This file was deleted.

9 changes: 0 additions & 9 deletions .yarn/plugins/@yarnpkg/plugin-typescript.cjs

This file was deleted.

28 changes: 0 additions & 28 deletions .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs

This file was deleted.

823 changes: 0 additions & 823 deletions .yarn/releases/yarn-3.3.1.cjs

This file was deleted.

893 changes: 893 additions & 0 deletions .yarn/releases/yarn-4.0.2.cjs

Large diffs are not rendered by default.

14 changes: 3 additions & 11 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cacheFolder: storage/yarn/cache

compressionLevel: mixed

defaultSemverRangePrefix: ""

enableGlobalCache: true
Expand Down Expand Up @@ -69,18 +71,8 @@ packageExtensions:
optional: true

plugins:
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
spec: "@yarnpkg/plugin-interactive-tools"
- path: .yarn/plugins/@yarnpkg/plugin-workspace-tools.cjs
spec: "@yarnpkg/plugin-workspace-tools"
- sources/@repo/yarn-plugin-bud/bundles/@yarnpkg/plugin-bud.js
- sources/@repo/yarn-plugin-package/bundles/@yarnpkg/plugin-package.js
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
spec: "@yarnpkg/plugin-typescript"
- path: .yarn/plugins/@yarnpkg/plugin-constraints.cjs
spec: "@yarnpkg/plugin-constraints"

pnpDataPath: .yarn/pnp.data.json

pnpUnpluggedFolder: .yarn/unplugged

Expand All @@ -94,4 +86,4 @@ unsafeHttpWhitelist:

virtualFolder: .yarn/__virtual__

yarnPath: .yarn/releases/yarn-3.3.1.cjs
yarnPath: .yarn/releases/yarn-4.0.2.cjs
2 changes: 1 addition & 1 deletion examples/typescript/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
"@roots/bud": "workspace:*",
"@roots/bud-babel": "workspace:*",
"@roots/bud-typescript": "workspace:*",
"ts-node": "10.9.1"
"ts-node": "10.9.2"
}
}
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"npm": "8.19.2"
},
"license": "MIT",
"packageManager": "yarn@3.3.1",
"packageManager": "yarn@4.0.2",
"repository": {
"type": "git",
"url": "https://github.com/roots/bud.git"
Expand All @@ -25,16 +25,16 @@
"@types/lodash": "4.14.202",
"@types/node": "20.10.4",
"@types/prettier": "3.0.0",
"@types/react": "18.2.42",
"@types/react": "18.2.43",
"@typescript-eslint/eslint-plugin": "6.13.2",
"@typescript-eslint/parser": "6.13.2",
"@vitest/coverage-v8": "1.0.1",
"@vitest/ui": "1.0.1",
"@vitest/coverage-v8": "1.0.4",
"@vitest/ui": "1.0.4",
"browserslist": "4.22.2",
"caniuse-lite": "1.0.30001566",
"esbuild": "0.19.8",
"caniuse-lite": "1.0.30001568",
"esbuild": "0.19.9",
"eslint": "8.55.0",
"eslint-plugin-n": "16.3.1",
"eslint-plugin-n": "16.4.0",
"eslint-plugin-perfectionist": "2.5.0",
"eslint-plugin-react": "7.33.2",
"eslint-plugin-react-hooks": "4.6.0",
Expand All @@ -51,12 +51,12 @@
"pm2": "5.3.0",
"prettier": "3.1.0",
"syncpack": "11.2.1",
"ts-node": "10.9.1",
"ts-node": "10.9.2",
"tslib": "2.6.2",
"typescript": "5.3.3",
"update-browserslist-db": "1.0.13",
"verdaccio": "5.28.0",
"vitest": "1.0.1",
"verdaccio": "5.29.0",
"vitest": "1.0.4",
"vitest-github-actions-reporter": "0.11.1",
"webpack": "5.89.0"
},
Expand Down
2 changes: 1 addition & 1 deletion sources/@repo/constants/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
},
"devDependencies": {
"@types/node": "20.10.4",
"vitest": "1.0.1"
"vitest": "1.0.4"
},
"dependencies": {
"tslib": "2.6.2"
Expand Down
6 changes: 3 additions & 3 deletions sources/@repo/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
"@tsconfig/docusaurus": "2.0.2",
"@types/file-loader": "5.0.4",
"@types/node": "20.10.4",
"@types/react": "18.2.42",
"@types/react": "18.2.43",
"@types/react-dom": "18.2.17",
"file-loader": "6.2.0",
"netlify-cli": "16.9.3",
"raw-loader": "4.0.2",
"ts-node": "10.9.1",
"ts-node": "10.9.2",
"typescript": "5.3.3",
"url-loader": "4.1.1",
"webpack": "5.89.0"
Expand All @@ -36,7 +36,7 @@
"@docusaurus/theme-common": "2.4.3",
"axios": "1.6.2",
"clsx": "2.0.0",
"docusaurus-lunr-search": "3.3.0",
"docusaurus-lunr-search": "3.3.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"tslib": "2.6.2"
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/markdown-kit/contributors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import {Octokit} from '@octokit/core'
import {paginateRest} from '@octokit/plugin-paginate-rest'
import {paths} from '@repo/constants'
import {json, yml} from '@roots/bud-support/filesystem'
import isUndefined from '@roots/bud-support/lodash/isUndefined'
import sortBy from '@roots/bud-support/lodash/sortBy'
import isUndefined from '@roots/bud-support/isUndefined'
import sortBy from '@roots/bud-support/sortBy'
import fs from 'fs-jetpack'

import ignoredCommits from './ignored_sha.js'
Expand Down
2 changes: 1 addition & 1 deletion sources/@repo/markdown-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@types/lodash-es": "4.17.12",
"@types/node": "20.10.4",
"@types/prettier": "3.0.0",
"vitest": "1.0.1"
"vitest": "1.0.4"
},
"dependencies": {
"@octokit/core": "5.0.2",
Expand Down
2 changes: 1 addition & 1 deletion sources/@repo/notifier/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"private": true,
"devDependencies": {
"@types/node": "20.10.4",
"vitest": "1.0.1"
"vitest": "1.0.4"
},
"dependencies": {
"tslib": "2.6.2"
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/test-kit/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {Context} from '@roots/bud-framework/context'
import type {Bud, Context} from '@roots/bud-framework'

import {path} from '@repo/constants'
import {type Bud, factory} from '@roots/bud'
import {factory} from '@roots/bud'

export type Options = Omit<Partial<Context>, `extensions`> & {
extensions?: Array<string>
Expand Down
2 changes: 1 addition & 1 deletion sources/@repo/test-kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"json5": "2.2.3",
"strip-ansi": "7.1.0",
"tslib": "2.6.2",
"vitest": "1.0.1"
"vitest": "1.0.4"
},
"volta": {
"extends": "../../../package.json"
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/yarn-plugin-bud/bundles/@yarnpkg/plugin-bud.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions sources/@repo/yarn-plugin-bud/sources/command/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export class Release extends Command {
.run([
`workspaces`,
`foreach`,
`--all`,
`--no-private`,
`npm`,
`publish`,
Expand Down
1 change: 1 addition & 0 deletions sources/@repo/yarn-plugin-bud/sources/command/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export class Version extends Command {
.run([
`workspaces`,
`foreach`,
`--all`,
`--no-private`,
`package`,
`set`,
Expand Down
2 changes: 1 addition & 1 deletion sources/@repo/yarn-plugin-package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"lodash-es": "4.17.21",
"tslib": "2.6.2",
"typescript": "5.3.3",
"vitest": "1.0.1"
"vitest": "1.0.4"
},
"scripts": {
"build": "builder build plugin"
Expand Down
1 change: 0 additions & 1 deletion sources/@roots/blade-loader/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@
"memfs": "4.6.0"
},
"dependencies": {
"lodash": "4.17.21",
"tslib": "2.6.2",
"webpack": "5.89.0"
},
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/browserslist-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
"@roots/bud-support": "workspace:*",
"@skypack/package-check": "0.2.2",
"browserslist": "4.22.2",
"caniuse-lite": "1.0.30001566"
"caniuse-lite": "1.0.30001568"
},
"volta": {
"extends": "../../../package.json"
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ declare module '@roots/bud-framework' {
*
* {@link https://bud.js.org/docs/bud.config 📕 Documentation}
*/
webpackConfig(...params: Config.Parameters): Bud
webpackConfig(...params: Config.Parameters): Bud
}

interface Services {
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/methods/alias/isCallback.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import isFunction from '@roots/bud-support/lodash/isFunction'
import isFunction from '@roots/bud-support/isFunction'

import type {Callback} from './types.js'

Expand Down
6 changes: 3 additions & 3 deletions sources/@roots/bud-api/src/methods/alias/isRecords.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import isArray from '@roots/bud-support/lodash/isArray'
import isFunction from '@roots/bud-support/lodash/isFunction'
import isObject from '@roots/bud-support/lodash/isObject'
import isArray from '@roots/bud-support/isArray'
import isFunction from '@roots/bud-support/isFunction'
import isObject from '@roots/bud-support/isObject'

import type {Callback, Records, Signifier} from './types.js'

Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/methods/alias/isSignifier.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import isString from '@roots/bud-support/lodash/isString'
import isString from '@roots/bud-support/isString'

import type {Callback, Records, Signifier} from './types.js'

Expand Down
4 changes: 2 additions & 2 deletions sources/@roots/bud-api/src/methods/alias/isValue.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import isArray from '@roots/bud-support/lodash/isArray'
import isString from '@roots/bud-support/lodash/isString'
import isArray from '@roots/bud-support/isArray'
import isString from '@roots/bud-support/isString'

import type {Value} from './types.js'

Expand Down
4 changes: 2 additions & 2 deletions sources/@roots/bud-api/src/methods/bundle/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import type {Bud} from '@roots/bud-framework'

import {join, sep} from 'node:path'

import isRegExp from '@roots/bud-support/lodash/isRegExp'
import isString from '@roots/bud-support/lodash/isString'
import isRegExp from '@roots/bud-support/isRegExp'
import isString from '@roots/bud-support/isString'

export type Parameters = [string, (Array<string> | RegExp | string)?]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {Parameters} from '@roots/bud-api/methods/compilePaths'
import type {Bud, Rules} from '@roots/bud-framework'

import {InputError} from '@roots/bud-support/errors'
import isArray from '@roots/bud-support/lodash/isArray'
import isArray from '@roots/bud-support/isArray'

export interface compilePaths {
(this: Bud, ...value: Parameters): Bud
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/methods/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type {Bud} from '@roots/bud-framework'
import type {Configuration} from '@roots/bud-framework/config'

import {InputError} from '@roots/bud-support/errors'
import isFunction from '@roots/bud-support/lodash/isFunction'
import isFunction from '@roots/bud-support/isFunction'

export type Parameters = [
| ((config: Partial<Configuration>) => Partial<Configuration>)
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/methods/copyDir/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type {Plugin as CopyPlugin} from '@roots/bud-support/copy-webpack-plugin'

import {isAbsolute} from 'node:path'

import isString from '@roots/bud-support/lodash/isString'
import isString from '@roots/bud-support/isString'

type FromToTuple = [string, string]

Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/methods/devtool/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type {Configuration} from '@roots/bud-framework/config'

import {Bud} from '@roots/bud-framework'
import isUndefined from '@roots/bud-support/lodash/isUndefined'
import isUndefined from '@roots/bud-support/isUndefined'

export type Parameters = [(Bud | Configuration['devtool'])?]

Expand Down
4 changes: 2 additions & 2 deletions sources/@roots/bud-api/src/methods/entry/handleNamed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type {
} from '@roots/bud-api/methods/entry'
import type {Bud} from '@roots/bud-framework'

import isArray from '@roots/bud-support/lodash/isArray'
import isString from '@roots/bud-support/lodash/isString'
import isArray from '@roots/bud-support/isArray'
import isString from '@roots/bud-support/isString'

export async function handleNamed(
bud: Bud,
Expand Down
4 changes: 2 additions & 2 deletions sources/@roots/bud-api/src/methods/entry/handleRecords.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type {
} from '@roots/bud-api/methods/entry'
import type {Bud} from '@roots/bud-framework'

import isArray from '@roots/bud-support/lodash/isArray'
import isString from '@roots/bud-support/lodash/isString'
import isArray from '@roots/bud-support/isArray'
import isString from '@roots/bud-support/isString'

export async function handleRecords(
bud: Bud,
Expand Down
4 changes: 2 additions & 2 deletions sources/@roots/bud-api/src/methods/entry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export type Parameters =

export type Records = Record<string, EntryObject>

import isArray from '@roots/bud-support/lodash/isArray'
import isString from '@roots/bud-support/lodash/isString'
import isArray from '@roots/bud-support/isArray'
import isString from '@roots/bud-support/isString'

import {isNamed} from './guards.js'
import {handleNamed} from './handleNamed.js'
Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/methods/externals/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type {Bud} from '@roots/bud-framework'

import isFunction from '@roots/bud-support/lodash/isFunction'
import isFunction from '@roots/bud-support/isFunction'

export type Parameters = [
| ((
Expand Down
16 changes: 7 additions & 9 deletions sources/@roots/bud-api/src/methods/html/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@ import type {Bud} from '@roots/bud-framework'

import {isAbsolute} from 'node:path'

import isBoolean from '@roots/bud-support/lodash/isBoolean'
import isFunction from '@roots/bud-support/lodash/isFunction'
import isObject from '@roots/bud-support/lodash/isObject'
import isString from '@roots/bud-support/lodash/isString'
import isUndefined from '@roots/bud-support/lodash/isUndefined'
import omit from '@roots/bud-support/lodash/omit'
import isBoolean from '@roots/bud-support/isBoolean'
import isFunction from '@roots/bud-support/isFunction'
import isObject from '@roots/bud-support/isObject'
import isString from '@roots/bud-support/isString'
import isUndefined from '@roots/bud-support/isUndefined'
import omit from '@roots/bud-support/omit'

type Options = HTMLExtension.Options & {
replace?: InterpolateHTMLExtension.Options
Expand Down Expand Up @@ -60,9 +60,7 @@ export const html: html = async function (this: Bud, options = true) {
)

if (isObject(options.replace)) {
Object.entries(options.replace).forEach(
(v) => interpolate.set(...v),
)
Object.entries(options.replace).forEach(v => interpolate.set(...v))
}
}

Expand Down
2 changes: 1 addition & 1 deletion sources/@roots/bud-api/src/methods/persist/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {Bud} from '@roots/bud-framework'
import isString from '@roots/bud-support/lodash/isString'
import isString from '@roots/bud-support/isString'

export type Parameters = [(`filesystem` | `memory` | boolean | Bud)?]

Expand Down
4 changes: 2 additions & 2 deletions sources/@roots/bud-api/src/methods/provide/index.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import type {Bud} from '@roots/bud-framework'

import {InputError} from '@roots/bud-support/errors'
import isString from '@roots/bud-support/lodash/isString'
import isUndefined from '@roots/bud-support/lodash/isUndefined'
import isString from '@roots/bud-support/isString'
import isUndefined from '@roots/bud-support/isUndefined'

export type Parameters<
K extends Array<string> | string = Array<string> | string,
Expand Down
Loading

0 comments on commit 292f455

Please sign in to comment.