Skip to content

Commit

Permalink
fix: sku to v14.0.2 (#786)
Browse files Browse the repository at this point in the history
* fix: sku to v14.0.2

* Sku upgrade

* 14.0.3

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Aaron Moat <[email protected]>
  • Loading branch information
renovate[bot] and AaronMoat authored Feb 10, 2025
1 parent b0046e9 commit 7f066b6
Show file tree
Hide file tree
Showing 11 changed files with 352 additions and 464 deletions.
22 changes: 9 additions & 13 deletions .changeset/changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const gitHubChangelogFunctions = {
await Promise.all(
changesets.map(async (cs) => {
if (cs.commit) {
let { links } = await getInfo({
const { links } = await getInfo({
repo: options.repo,
commit: cs.commit,
});
Expand Down Expand Up @@ -102,18 +102,14 @@ const gitHubChangelogFunctions = {

const replacedChangelog = changeset.summary
.replace(/^\s*(?:pr|pull|pull\s+request):\s*#?(\d+)/im, (_, pr) => {
let num = Number(pr);
const num = Number(pr);
if (!isNaN(num)) prFromSummary = num;
return '';
})
.replace(/^\s*commit:\s*([^\s]+)/im, (_, commit) => {
commitFromSummary = commit;
return '';
})
.replace(/^\s*(?:author|user):\s*@?([^\s]+)/gim, (_, user) => {
usersFromSummary.push(user);
return '';
})
.trim();

const [firstLine, ...futureLines] = replacedChangelog
Expand All @@ -122,30 +118,29 @@ const gitHubChangelogFunctions = {

const links = await (async () => {
if (prFromSummary !== undefined) {
let { links } = await getInfoFromPullRequest({
let { links: prLinks } = await getInfoFromPullRequest({
repo: options.repo,
pull: prFromSummary,
});
if (commitFromSummary) {
links = {
...links,
prLinks = {
...prLinks,
commit: `[\`${commitFromSummary}\`](https://github.com/${options.repo}/commit/${commitFromSummary})`,
};
}
return links;
return prLinks;
}
const commitToFetchFrom = commitFromSummary || changeset.commit;
if (commitToFetchFrom) {
let { links } = await getInfo({
const { links: commitLinks } = await getInfo({
repo: options.repo,
commit: commitToFetchFrom,
});
return links;
return commitLinks;
}
return {
commit: null,
pull: null,
user: null,
};
})();

Expand All @@ -163,6 +158,7 @@ const gitHubChangelogFunctions = {
if (process.env.GITHUB_TOKEN) {
module.exports = gitHubChangelogFunctions;
} else {
// eslint-disable-next-line no-console
console.warn(
`Defaulting to Git-based versioning.
Enable GitHub-based versioning by setting the GITHUB_TOKEN environment variable.
Expand Down
5 changes: 5 additions & 0 deletions .changeset/clever-pots-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'scoobie': patch
---

Remove `sku` as a peer dependency
15 changes: 0 additions & 15 deletions .eslintignore

This file was deleted.

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ npm-debug.log

# managed by sku
.eslintcache
.eslintrc
.prettierrc
coverage/
dist/
eslint.config.mjs
report/
tsconfig.json
# end managed by sku
Expand Down
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ dist-storybook-tmp/

# managed by sku
.eslintcache
.eslintrc
.prettierrc
coverage/
dist/
eslint.config.mjs
pnpm-lock.yaml
report/
tsconfig.json
Expand Down
2 changes: 1 addition & 1 deletion .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { babel, webpackFinal } from 'sku/config/storybook';
import type { StorybookConfig } from '@storybook/react-webpack5';
import { babel, webpackFinal } from 'sku/config/storybook';

export default {
stories: ['../src/**/*.stories.tsx'],
Expand Down
13 changes: 7 additions & 6 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import 'braid-design-system/reset';

import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import { Helmet, HelmetProvider } from 'react-helmet-async';
import { robotoHref, robotoMonoHref } from '../typography';
import type { Preview } from '@storybook/react';
import { ScoobieLink } from '../src/components/ScoobieLink';
import { BraidProvider, Card, PageBlock } from 'braid-design-system';
import seekJobs from 'braid-design-system/themes/seekJobs';
import docs from 'braid-design-system/themes/docs';
import seekJobs from 'braid-design-system/themes/seekJobs';
import wireframe from 'braid-design-system/themes/wireframe';
import React from 'react';
import { Helmet, HelmetProvider } from 'react-helmet-async';
import { BrowserRouter } from 'react-router-dom';

import { ScoobieLink } from '../src/components/ScoobieLink';
import { robotoHref, robotoMonoHref } from '../typography';

const THEMES = { docs, seekJobs, wireframe };

Expand Down
5 changes: 2 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"react-dom": "18.3.1",
"react-helmet-async": "2.0.5",
"react-router-dom": "7.1.3",
"sku": "13.4.1",
"sku": "14.0.3",
"storybook": "8.5.1",
"webpack": "5.97.1"
},
Expand All @@ -44,8 +44,7 @@
"peerDependencies": {
"braid-design-system": ">= 31.21.0",
"react": ">= 17 < 19",
"react-router-dom": ">= 5.3.0",
"sku": ">= 13.0.0 < 14"
"react-router-dom": ">= 5.3.0"
},
"repository": {
"type": "git",
Expand Down
51 changes: 25 additions & 26 deletions sku.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,44 +4,43 @@ const config: SkuConfig = {
rootResolution: false,
srcPaths: ['./src', './styles'],

dangerouslySetESLintConfig: (skuConfig) => ({
dangerouslySetESLintConfig: (skuConfig) => [
...skuConfig,
overrides: [
...(skuConfig.overrides ?? []),
{
files: [
// sku configuration
'./sku.config.ts',
// External type declarations
'*.d.ts',
// Storybook stories
'*.docs.tsx',
'*.stories.tsx',
],
rules: {
'import/no-default-export': 'off',
},
{
rules: {
// https://basarat.gitbook.io/typescript/main-1/defaultisbad
'import-x/no-default-export': 'error',
'import-x/order': ['error'],
},
],
rules: {
...skuConfig.rules,
// https://basarat.gitbook.io/typescript/main-1/defaultisbad
'import/no-default-export': 'error',
'sort-imports': ['error', { ignoreDeclarationSort: true }],
},
settings: {
react: {
version: 'detect',
{
files: [
'.storybook/*.{ts,tsx}',
'*.d.ts',
'*.docs.tsx',
'**/*.stories.tsx',
'eslint.config.mjs',
'sku.config.ts',
],
rules: {
'import-x/no-default-export': 'off',
},
},
}),
],

dangerouslySetTSConfig: (tsConfig) => ({
...tsConfig,
include: [
'**/*', // Implicit default value if `include` is not set and `files` is not set
'.storybook/*', // 👈 Add this line
],
}),

eslintIgnore: [
'**/dist-storybook-tmp/',
'**/typography.ts',
'**/dist-storybook/',
],
};

export default config;
2 changes: 1 addition & 1 deletion src/components/Blockquote.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import type { StackChildrenProps } from '../private/types';

import * as styles from './Blockquote.css';

interface Props extends StackChildrenProps {}
type Props = StackChildrenProps;

export const Blockquote = ({ children }: Props) => (
<Box className={styles.quoteBlock} padding="medium">
Expand Down
Loading

0 comments on commit 7f066b6

Please sign in to comment.