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

Enable dependabot updates for WB/WS (and group them) #1863

Merged
merged 6 commits into from
Nov 27, 2024
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
5 changes: 5 additions & 0 deletions .changeset/mighty-rules-talk.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus-editor": patch
---

Switch two corner usages of deprecated @khanacademy/wonder-blocks-spacing to @khanacademy/wonder-blocks-tokens
5 changes: 5 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,11 @@ module.exports = {
"no-invalid-this": "off",
"@typescript-eslint/no-this-alias": "off",
"no-unused-expressions": "off",
"no-restricted-imports": [
"error",
"@khanacademy/wonder-blocks-color",
"@khanacademy/wonder-blocks-spacing",
],
"object-curly-spacing": "off",
semi: "off",

Expand Down
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,15 @@ updates:
allow:
- dependency-name: "@khanacademy/eslint-config"
- dependency-name: "@khanacademy/eslint-plugin"
assignees:
- "@Khan/perseus"

# Grouped updates for Wonder Blocks and Wonder Stuff releases.
# This helps us to stay in sync with the latest releases of these packages.
groups:
wonder-stuff:
patterns:
- "@khanacademy/wonder-stuff-*"
wonder-blocks:
patterns:
- "@khanacademy/wonder-blocks-*"
Comment on lines +18 to +24
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we filter out certain packages? I'm asking as we have a couple of WB deprecated packages that we usually skip when upgrading webapp (wb-color and wb-spacing).

It would be nice if we could skip them programmatically with dependabot so we never see these packages in here, as it would be noisy/counterproductive to have them included.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't have any usages of wb-color nor wb-spacing in Perseus today. I can exclude them here, but I think I'm going to add an ESLint rule to ensure it doesn't come back. :)

image
    "no-restricted-imports": [
        "error",
        "@khanacademy/wonder-blocks-color",
        "@khanacademy/wonder-blocks-spacing",
    ],

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That sounds perfect, thanks!

Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import Spacing from "@khanacademy/wonder-blocks-spacing";
import {color} from "@khanacademy/wonder-blocks-tokens";
import {color, spacing} from "@khanacademy/wonder-blocks-tokens";

import DeviceFramer from "../device-framer";

Expand All @@ -21,7 +20,7 @@ const SampleContent = () => {
color: color.offWhite,
width: "90%",
height: "300px",
padding: Spacing.medium_16,
padding: spacing.medium_16,
}}
>
The DeviceFramer controls the size of the content inside the frame.
Expand Down
4 changes: 2 additions & 2 deletions packages/perseus-editor/src/components/widget-editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import {
} from "@khanacademy/perseus";
import {useUniqueIdWithMock} from "@khanacademy/wonder-blocks-core";
import {Strut} from "@khanacademy/wonder-blocks-layout";
import Spacing from "@khanacademy/wonder-blocks-spacing";
import Switch from "@khanacademy/wonder-blocks-switch";
import {spacing} from "@khanacademy/wonder-blocks-tokens";
import * as React from "react";
import _ from "underscore";

Expand Down Expand Up @@ -241,7 +241,7 @@ function LabeledSwitch(props: {
return (
<>
<label htmlFor={id}>{label}</label>
<Strut size={Spacing.xxSmall_6} />
<Strut size={spacing.xxSmall_6} />
<Switch id={id} {...switchProps} />
</>
);
Expand Down