Skip to content

Commit

Permalink
Merge branch 'main' into LEMS-2622-update-point-copy
Browse files Browse the repository at this point in the history
  • Loading branch information
anakaren-rojas committed Dec 3, 2024
2 parents a620826 + 83b1bea commit 59b0d2f
Show file tree
Hide file tree
Showing 123 changed files with 2,387 additions and 3,820 deletions.
8 changes: 8 additions & 0 deletions .changeset/chilled-donuts-serve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@khanacademy/perseus-dev-ui": patch
"@khanacademy/math-input": patch
"@khanacademy/perseus": patch
"@khanacademy/perseus-editor": patch
---

Upgrade Storybook to v8.x
5 changes: 0 additions & 5 deletions .changeset/chilled-turtles-drive.md

This file was deleted.

6 changes: 6 additions & 0 deletions .changeset/hot-chairs-sell.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@khanacademy/perseus": minor
"@khanacademy/perseus-editor": minor
---

Add labels to Dropdown widget
5 changes: 5 additions & 0 deletions .changeset/khaki-keys-approve.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus-editor": patch
---

Removing usage of createReactClass from several component files.
5 changes: 0 additions & 5 deletions .changeset/lazy-geckos-suffer.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/rotten-peaches-move.md

This file was deleted.

5 changes: 5 additions & 0 deletions .changeset/strong-flies-thank.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": major
---

Remove PerseusExampleWidgetOptions, PerseusSimpleMarkdownTesterWidgetOptions, and PerseusExampleWidgetOptions types - widgets no longer exist
5 changes: 5 additions & 0 deletions .changeset/strong-rocks-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus": patch
---

Remove some uses of findDOMNode
5 changes: 5 additions & 0 deletions .changeset/yellow-carrots-obey.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@khanacademy/perseus-dev-ui": patch
---

Upgrade Storybook to v8.x
5 changes: 0 additions & 5 deletions .changeset/yellow-ducks-march.md

This file was deleted.

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
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,17 @@ updates:
allow:
- dependency-name: "@khanacademy/eslint-config"
- dependency-name: "@khanacademy/eslint-plugin"
- dependency-name: "@khanacademy/wonder-blocks-*"
- dependency-name: "@khanacademy/wonder-stuff-*"
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-*"
17 changes: 0 additions & 17 deletions .storybook/main.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import turbosnap from "vite-plugin-turbosnap";
import viteConfig from "../dev/vite.config";
import {mergeConfig} from "vite";

Expand Down Expand Up @@ -54,24 +53,8 @@ const config: StorybookConfig = {
},
// Fix from: https://github.com/storybookjs/storybook/issues/25256#issuecomment-1866441206
assetsInclude: ["/sb-preview/runtime.js"],
plugins:
configType === "PRODUCTION"
? [
turbosnap({
// This should be the base path of your storybook. In monorepos, you may only need process.cwd().
rootDir: config.root ?? process.cwd(),
}),
]
: [],
});
},

typescript: {
reactDocgen: "react-docgen",
},
docs: {
autodocs: true,
},
staticDirs: ["../static"],
};

Expand Down
4 changes: 4 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ const preview: Preview = {
})),
},
},
tags: [
//👇 Enables auto-generated documentation for all stories
"autodocs",
],
};

export default preview;
1 change: 0 additions & 1 deletion config/test/test-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ if (typeof window !== "undefined") {
// Override the window.location implementation to mock out assign()
// We need to access window.location.assign to verify that we're
// redirecting to the right place.
/* eslint-disable no-restricted-syntax */
const oldLocation = window.location;
// @ts-expect-error - TS2790 - The operand of a 'delete' operator must be optional.
delete window.location;
Expand Down
9 changes: 9 additions & 0 deletions dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @khanacademy/perseus-dev-ui

## 4.0.1

### Patch Changes

- Updated dependencies [[`88ba71bef`](https://github.com/Khan/perseus/commit/88ba71bef0cdd75fa0c8b467dcea2cccc637d034)]:
- @khanacademy/kas@0.4.2
- @khanacademy/simple-markdown@0.13.6
- @khanacademy/pure-markdown@0.3.13

## 4.0.0

### Major Changes
Expand Down
11 changes: 6 additions & 5 deletions dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Perseus dev UI",
"author": "Khan Academy",
"license": "MIT",
"version": "4.0.0",
"version": "4.0.1",
"private": true,
"repository": {
"type": "git",
Expand All @@ -14,13 +14,13 @@
"dev": "vite"
},
"dependencies": {
"@khanacademy/kas": "^0.4.1",
"@khanacademy/kas": "^0.4.2",
"@khanacademy/kmath": "^0.1.16",
"@khanacademy/math-input": "^21.1.5",
"@khanacademy/perseus-core": "1.5.3",
"@khanacademy/perseus-linter": "^1.2.4",
"@khanacademy/pure-markdown": "^0.3.12",
"@khanacademy/simple-markdown": "^0.13.5",
"@khanacademy/pure-markdown": "^0.3.13",
"@khanacademy/simple-markdown": "^0.13.6",
"@khanacademy/wonder-blocks-banner": "3.1.7",
"@khanacademy/wonder-blocks-icon": "4.1.3",
"@khanacademy/wonder-blocks-icon-button": "5.3.4",
Expand All @@ -34,6 +34,7 @@
"@phosphor-icons/core": "^2.0.2"
},
"devDependencies": {
"vite": "^5.1.0"
"vite": "^5.1.0",
"@vitejs/plugin-react": "^4.3.3"
}
}
2 changes: 2 additions & 0 deletions dev/vite.config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import fs from "node:fs";
import {resolve, dirname, join} from "node:path";

import react from "@vitejs/plugin-react";
import glob from "fast-glob";
import {defineConfig} from "vite";

Expand All @@ -20,6 +21,7 @@ export default defineConfig({
// Dev/Storybook environment.
"process.env.STORYBOOK": JSON.stringify(true),
},
plugins: [react({jsxRuntime: "automatic"})],
resolve: {
alias: {
hubble: resolve(__dirname, "../vendor/hubble/hubble.js"),
Expand Down
25 changes: 12 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"engines": {
"node": ">=20"
},
"dependencies": {
"devDependencies": {
"@babel/core": "^7.23.2",
"@babel/eslint-parser": "^7.22.15",
"@babel/eslint-plugin": "^7.22.10",
Expand All @@ -40,14 +40,14 @@
"@rollup/plugin-node-resolve": "^13.2.1",
"@rollup/plugin-replace": "^4.0.0",
"@sheerun/mutationobserver-shim": "^0.3.3",
"@storybook/addon-a11y": "^7.6.17",
"@storybook/addon-actions": "^7.6.17",
"@storybook/addon-controls": "^7.6.17",
"@storybook/addon-essentials": "^7.6.17",
"@storybook/addon-links": "^7.6.17",
"@storybook/addon-viewport": "^7.6.17",
"@storybook/react": "^7.6.17",
"@storybook/react-vite": "^7.6.17",
"@storybook/addon-a11y": "^8.4.5",
"@storybook/addon-actions": "^8.4.5",
"@storybook/addon-controls": "^8.4.5",
"@storybook/addon-essentials": "^8.4.5",
"@storybook/addon-links": "^8.4.5",
"@storybook/addon-viewport": "^8.4.5",
"@storybook/react": "^8.4.5",
"@storybook/react-vite": "^8.4.5",
"@swc-node/register": "^1.6.6",
"@swc/core": "^1.3.68",
"@testing-library/dom": "^10.3.1",
Expand Down Expand Up @@ -117,13 +117,12 @@
"rollup-plugin-preserve-shebangs": "^0.2.0",
"rollup-plugin-styles": "^4.0.0",
"sloc": "^0.2.1",
"storybook": "^7.6.17",
"storybook": "^8.4.5",
"style-loader": "^3.3.3",
"tiny-invariant": "^1.3.1",
"typescript": "^5.4.2",
"typescript": "5.7.2",
"typescript-coverage-report": "^0.7.0",
"vite-plugin-istanbul": "^5.0.0",
"vite-plugin-turbosnap": "^1.0.3",
"winston": "^3.7.2"
},
"scripts": {
Expand All @@ -143,7 +142,7 @@
"test": "jest",
"storybook": "storybook dev -p 6006",
"start": "storybook dev -p 6006",
"build-storybook": "storybook build",
"build-storybook": "storybook build --stats-json",
"cypress": "cypress open --component",
"cypress:ci": "cross-env cypress run --component",
"format": "prettier --write .",
Expand Down
6 changes: 6 additions & 0 deletions packages/kas/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# @khanacademy/kas

## 0.4.2

### Patch Changes

- [#1920](https://github.com/Khan/perseus/pull/1920) [`88ba71bef`](https://github.com/Khan/perseus/commit/88ba71bef0cdd75fa0c8b467dcea2cccc637d034) Thanks [@handeyeco](https://github.com/handeyeco)! - Fix some file-wide error suppressions

## 0.4.1

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/kas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "A lightweight JavaScript CAS for comparing expressions and equations.",
"author": "Khan Academy",
"license": "MIT",
"version": "0.4.1",
"version": "0.4.2",
"publishConfig": {
"access": "public"
},
Expand Down
3 changes: 1 addition & 2 deletions packages/kas/src/nodes.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* eslint-disable prettier/prettier */
/* eslint-disable import/order */
/* TODO(charlie): fix these lint errors (http://eslint.org/docs/rules): */
/* eslint-disable indent, no-undef, no-var, one-var, no-dupe-keys, no-new-func, no-redeclare, @typescript-eslint/no-unused-vars, comma-dangle, max-len, prefer-spread, space-infix-ops, space-unary-ops */
/* eslint-disable indent, no-undef, no-var, no-dupe-keys, no-new-func, no-redeclare, comma-dangle, max-len, prefer-spread, space-infix-ops, space-unary-ops */
import _ from "underscore";

import {unitParser} from "./__genfiles__/unitparser";
Expand Down Expand Up @@ -1414,7 +1414,6 @@ export class Mul extends Seq {
rational = rational.addHint("fraction");
}

var result;
if (num.n < 0 && right.n < 0) {
rational.d = -rational.d;
return left.replace(num, [NumNeg, rational]);
Expand Down
Loading

0 comments on commit 59b0d2f

Please sign in to comment.