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

🩹 fix(none): nightly release #2383

Merged
merged 9 commits into from
Jul 20, 2023
Merged
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
8 changes: 5 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,20 @@ version: 2

updates:
- package-ecosystem: npm
directory: /
assignees:
- kellymears
directory: /sources
schedule:
interval: daily
time: '09:00'
commit-message:
prefix: '📦 deps'
include: scope
labels:
- dependencies

- package-ecosystem: github-actions
assignees:
- kellymears
directory: /
schedule:
interval: daily
Expand All @@ -21,4 +24,3 @@ updates:
- dependencies
commit-message:
prefix: '⚙️ internal'
include: scope
2 changes: 1 addition & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
"**/node_modules": true,
"**/.budfiles/**/*": true
},
"prettier.configPath": "config/prettier.config.cjs",
"prettier.configPath": "config/prettier.config.js",
"prettier.ignorePath": "config/.prettierignore",
"typescript.enablePromptUseWorkspaceTsdk": true
}
2 changes: 1 addition & 1 deletion config/prettier.config.cjs → config/prettier.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = {
export default {
arrowParens: `avoid`,
bracketSpacing: false,
overrides: [
Expand Down
10 changes: 5 additions & 5 deletions examples/sage/resources/scripts/app.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import { main } from "@scripts/components/main";
import {main} from '@scripts/components/main'

const init = () =>
window.requestAnimationFrame(function ready() {
return document.body ? main() : window.requestAnimationFrame(ready);
});
return document.body ? main() : window.requestAnimationFrame(ready)
})

init();
init()

if (import.meta.webpackHot) {
if (import.meta.webpackHot)
import.meta.webpackHot.accept("./components/main.js", init);
import.meta.webpackHot.accept('./components/main.js', init)
}
10 changes: 5 additions & 5 deletions examples/sage/resources/scripts/components/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ export const main = () => {
/**
* Remove no-js class from body element
*/
document.body.classList.contains("no-js") &&
document.body.classList.remove("no-js");
document.body.classList.contains('no-js') &&
document.body.classList.remove('no-js')

document.body.classList.add(`text-xl`);
document.body.classList.add(`text-custom`);
};
document.body.classList.add(`text-xl`)
document.body.classList.add(`text-custom`)
}
20 changes: 10 additions & 10 deletions examples/sage/resources/scripts/editor.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import "@wordpress/edit-post";
import '@wordpress/edit-post'

import { registerBlockStyle, unregisterBlockStyle } from "@wordpress/blocks";
import domReady from "@wordpress/dom-ready";
import {registerBlockStyle, unregisterBlockStyle} from '@wordpress/blocks'
import domReady from '@wordpress/dom-ready'

domReady(() => {
unregisterBlockStyle("core/button", "outline");
unregisterBlockStyle('core/button', 'outline')

registerBlockStyle("core/button", {
name: "outline",
label: "Outline",
});
});
registerBlockStyle('core/button', {
name: 'outline',
label: 'Outline',
})
})

if (import.meta.webpackHot) {
import.meta.webpackHot.accept(console.error);
import.meta.webpackHot.accept(console.error)
}
8 changes: 4 additions & 4 deletions examples/sage/resources/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
@import 'tailwindcss/base';
@import "tailwindcss/base";

@import 'common/global';
@import "common/global";

@import 'tailwindcss/components';
@import 'tailwindcss/utilities';
@import "tailwindcss/components";
@import "tailwindcss/utilities";

body {
background: url(@src/images/logo.svg?inline) no-repeat;
Expand Down
2 changes: 1 addition & 1 deletion examples/stylelint/bud.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ export default async (bud: Bud) => {
bud.stylelint
.setFailOnError(bud.isProduction)
.setFailOnWarning(false)
.setFix(true)
.setFix(false)
}
16 changes: 6 additions & 10 deletions sources/@repo/constants/index.d.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
export declare const root: string
/**
* Absolute path from repo relative path
*/
export declare const path: (...path: Array<string>) => string

export declare const paths: {
root: string
config: string
sources: string
tests: string
storage: string
fixtures: string
}

/**
* bud repository configuration
*/
export declare const projectConfig: Record<string, any>
15 changes: 13 additions & 2 deletions sources/@repo/markdown-kit/releases/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import {path} from '@repo/constants'
import {Filesystem} from '@roots/bud-support/filesystem'

import {type release, releases} from './data.js'
import {body, path} from './release.js'
import {body} from './release.js'

const fs = new Filesystem()

const write = async (release: release) =>
await fs.write(path(release), body(release))
await fs.write(
path(
`sources`,
`@repo`,
`docs`,
`generated`,
`releases`,
`${release.semver}.mdx`,
),
body(release),
)

await Promise.all(releases.map(write))
14 changes: 0 additions & 14 deletions sources/@repo/markdown-kit/releases/release.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
import {join} from 'path'

import {paths} from '@repo/constants'

import type {release} from './data.js'

import {releases} from './data.js'
Expand Down Expand Up @@ -48,13 +44,3 @@ ${release.intro}
${updateNotice(release)}
${release.body}
`

export const path = (release: release) =>
join(
paths.sources,
`@repo`,
`docs`,
`generated`,
`releases`,
`${release.semver}.mdx`,
)
43 changes: 35 additions & 8 deletions sources/@repo/yarn-plugin-bud/bundles/@yarnpkg/plugin-bud.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion sources/@repo/yarn-plugin-bud/sources/command/_eslint.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export class Eslint extends Command {
public async execute() {
await this.cli
.run([
`eslint`,
`node`,
path(`node_modules`, `.bin`, `eslint`),
path(`examples/**/*.{ts,tsx,js,jsx}`),
path(`sources/**/src/**/*.{ts,tsx,js,jsx}`),
path(`tests/**/*.{ts,tsx,js,jsx}`),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import {path} from '@repo/constants'
import {CommandClass, Option} from 'clipanion'
import {globby} from 'globby'

Expand Down Expand Up @@ -29,7 +30,12 @@ export class PackageCheck extends Command {
[...dirs, `sources/create-bud-app`].flatMap(
async dir =>
await this.cli
.run([`package-check`, `--cwd`, dir])
.run([
`node`,
path(`node_modules`, `.bin`, `package-check`),
`--cwd`,
dir,
])
.then(this.throwIfError)
.catch(this.catch),
),
Expand Down
4 changes: 2 additions & 2 deletions sources/@repo/yarn-plugin-bud/sources/command/_pm2.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import {path} from '@repo/constants'
import {CommandClass, Option} from 'clipanion'
import {noop} from 'lodash'

import {Command} from './base.command'

Expand All @@ -22,7 +23,6 @@ export class Pm2 extends Command {
path(`node_modules`, `.bin`, `pm2`),
...this.passthrough,
])
.then(this.throwIfError)
.catch(this.catch)
.catch(noop)
}
}
16 changes: 12 additions & 4 deletions sources/@repo/yarn-plugin-bud/sources/command/_prettier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,23 @@ export class Prettier extends Command {
examples: [[`prettier usage info`, `yarn @bud prettier --help`]],
}

public passthrough = Option.Proxy({name: `pm2 options`})
public passthrough = Option.Proxy({name: `prettier options`})

public async execute() {
if (!this.passthrough.length) {
this.passthrough = [
`--ignore-unknown`,
`--no-error-on-unmatched-pattern`,
`--write`,
]
}

await this.cli
.run([
`prettier`,
`node`,
path(`node_modules/.bin/prettier`),
path(`sources/@roots/*/src/**/*`),
`--config`,
path(`config/prettier.config.cjs`),
`--config=${path(`config`, `prettier.config.js`)}`,
`--ignore-unknown`,
`--no-error-on-unmatched-pattern`,
`--write`,
Expand Down
3 changes: 2 additions & 1 deletion sources/@repo/yarn-plugin-bud/sources/command/_syncpack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export class Syncpack extends Command {
public async execute() {
await this.cli
.run([
`syncpack`,
`node`,
path(`node_modules`, `.bin`, `syncpack`),
`list-mismatches`,
`--config`,
path(`config/syncpack.config.cjs`),
Expand Down
2 changes: 0 additions & 2 deletions sources/@repo/yarn-plugin-bud/sources/command/lint.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
import {path} from '@repo/constants'
import {CommandClass} from 'clipanion'
import {globby} from 'globby'

import {Command} from './base.command'

Expand Down
14 changes: 7 additions & 7 deletions sources/@repo/yarn-plugin-bud/sources/command/registry.start.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/* eslint-disable no-console */
import {path} from '@repo/constants'
import {CommandClass} from 'clipanion'
import {noop} from 'lodash'

import {Command} from './base.command'

Expand All @@ -19,8 +20,8 @@ export class RegistryStart extends Command {
}

public async execute() {
try {
await this.cli.run([
await this.cli
.run([
`@bud`,
`pm2`,
`start`,
Expand All @@ -31,10 +32,9 @@ export class RegistryStart extends Command {
`--config`,
path(`config`, `verdaccio`, `config.yaml`),
])
} catch {}

try {
await this.cli.run([`@bud`, `pm2`, `save`])
} catch {}
.catch(noop)
.finally(async () => {
await this.cli.run([`@bud`, `pm2`, `save`]).catch(noop)
})
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {CommandClass} from 'clipanion'
import {noop} from 'lodash'

import {Command} from './base.command'

Expand All @@ -17,9 +18,7 @@ export class RegistryStop extends Command {
}

public async execute() {
try {
await this.cli.run([`@bud`, `pm2`, `stop`, `verdaccio`])
await this.cli.run([`@bud`, `pm2`, `delete`, `verdaccio`])
} catch (e) {}
await this.cli.run([`@bud`, `pm2`, `stop`, `verdaccio`]).catch(noop)
await this.cli.run([`@bud`, `pm2`, `delete`, `verdaccio`]).catch(noop)
}
}
Loading
Loading