-
Notifications
You must be signed in to change notification settings - Fork 351
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feature/numeric-dx-refactor] Merge branch 'main' into feature/numeri…
…c-dx-refactor
- Loading branch information
Showing
310 changed files
with
26,317 additions
and
19,832 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
"perseus-build-settings": minor | ||
"@khanacademy/perseus-dev-ui": minor | ||
"@khanacademy/kas": minor | ||
"@khanacademy/keypad-context": minor | ||
"@khanacademy/kmath": minor | ||
"@khanacademy/math-input": minor | ||
"@khanacademy/perseus": minor | ||
"@khanacademy/perseus-core": minor | ||
"@khanacademy/perseus-editor": minor | ||
"@khanacademy/perseus-linter": minor | ||
"@khanacademy/perseus-score": minor | ||
"@khanacademy/pure-markdown": minor | ||
"@khanacademy/simple-markdown": minor | ||
--- | ||
|
||
Tooling: | ||
|
||
- Switching to `pnpm`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
"@khanacademy/kas": patch | ||
"@khanacademy/kmath": patch | ||
"@khanacademy/math-input": patch | ||
"@khanacademy/perseus": patch | ||
"@khanacademy/perseus-core": patch | ||
"@khanacademy/perseus-editor": patch | ||
"@khanacademy/perseus-linter": patch | ||
"@khanacademy/perseus-score": patch | ||
"@khanacademy/pure-markdown": patch | ||
"@khanacademy/simple-markdown": patch | ||
--- | ||
|
||
Minor change to how each package embeds it's package version in itself (slightly larger bundle size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@khanacademy/perseus": patch | ||
"@khanacademy/perseus-core": patch | ||
--- | ||
|
||
Internal: test that Interactive Graph widgets can render with answerless data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/perseus-linter": minor | ||
--- | ||
|
||
Add linter rule to catch images added to content without a URL |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@khanacademy/perseus": patch | ||
"@khanacademy/perseus-core": patch | ||
--- | ||
|
||
Add tests for answerless Dropdown support |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@khanacademy/perseus-editor": minor | ||
--- | ||
|
||
Export the ContentPreview component from perseus-editor |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,11 +35,17 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
run_install: false | ||
|
||
- name: Force Node version | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: yarn | ||
# Note that we don't specify 'cache: pnpm' here because we | ||
# don't install node_modules in this workflow/job! | ||
|
||
- name: Get changed files | ||
uses: Khan/actions@get-changed-files-v2 | ||
|
@@ -60,7 +66,7 @@ jobs: | |
ssh-private-key: ${{ secrets.KHAN_ACTIONS_BOT_SSH_PRIVATE_KEY }} | ||
|
||
- name: Verify changeset entries | ||
uses: Khan/[email protected] | ||
uses: Khan/actions@check-for-changeset-v1 | ||
with: | ||
changed_files: ${{ steps.match.outputs.filtered }} | ||
|
||
|
@@ -86,55 +92,55 @@ jobs: | |
|
||
- name: Check formatting | ||
run: | | ||
yarn -s prettier --check . | ||
pnpm prettier --check . | ||
- id: js-files | ||
name: Find .js(x)/.ts(x) changed files | ||
uses: Khan/actions@filter-files-v1 | ||
with: | ||
changed-files: ${{ steps.changed.outputs.files }} | ||
extensions: ".js,.jsx,.ts,.tsx" | ||
files: "yarn.lock" | ||
files: "pnpm-lock.yaml" | ||
|
||
- id: eslint-reset | ||
uses: Khan/actions@filter-files-v1 | ||
name: Files that would trigger a full eslint run | ||
with: | ||
changed-files: ${{ steps.changed.outputs.files }} | ||
files: ".eslintrc.js,package.json,yarn.lock,.eslintignore" | ||
files: ".eslintrc.js,package.json,pnpm-lock.yaml,.eslintignore" | ||
|
||
# Linting / type checking | ||
- name: Eslint | ||
uses: Khan/actions@full-or-limited-v0 | ||
with: | ||
full-trigger: ${{ steps.eslint-reset.outputs.filtered }} | ||
full: yarn lint packages | ||
full: pnpm lint packages | ||
limited-trigger: ${{ steps.js-files.outputs.filtered }} | ||
limited: yarn lint {} | ||
limited: pnpm lint {} | ||
|
||
- name: Typecheck | ||
if: (success() || failure()) && steps.js-files.outputs.filtered != '[]' | ||
run: yarn typecheck | ||
run: pnpm typecheck | ||
|
||
- name: Build types | ||
if: (success() || failure()) && steps.js-files.outputs.filtered != '[]' | ||
run: yarn build:types | ||
run: pnpm build:types | ||
|
||
# Run tests for our target matrix | ||
- id: jest-reset | ||
uses: Khan/actions@filter-files-v1 | ||
name: Files that would trigger a full jest run | ||
with: | ||
changed-files: ${{ steps.changed.outputs.files }} | ||
files: "jest.config.js,package.json,yarn.lock,test.config.js,test.transform.js" | ||
files: "jest.config.js,package.json,pnpm-lock.yaml,test.config.js,test.transform.js" | ||
|
||
- name: Jest | ||
uses: Khan/actions@full-or-limited-v0 | ||
with: | ||
full-trigger: ${{ steps.jest-reset.outputs.filtered }} | ||
full: yarn jest | ||
full: pnpm jest | ||
limited-trigger: ${{ steps.js-files.outputs.filtered }} | ||
limited: yarn jest --passWithNoTests --findRelatedTests {} | ||
limited: pnpm jest --passWithNoTests --findRelatedTests {} | ||
|
||
# We use STOPSHIP internally to mark code that's not safe to go live yet. | ||
# We use an if block because we want to return the exact inverse of what | ||
|
@@ -153,13 +159,32 @@ jobs: | |
- name: Checking out latest commit | ||
uses: actions/checkout@v4 | ||
|
||
# MUST be before we install node_modules as that depends on finding | ||
# Cypress binaries in this cache! | ||
- uses: actions/cache@v4 | ||
with: | ||
path: ~/.cache/Cypress | ||
# Generate a new cache whenever the lock file changes | ||
key: ${{ runner.os }}-cypress-${{ hashFiles('**/pnpm-lock.yaml') }} | ||
# If source files changed, rebuild from a prior cache. | ||
restore-keys: | | ||
${{ runner.os }}-cypress- | ||
- name: Install & cache node_modules | ||
uses: ./.github/actions/shared-node-cache | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
# We _should_ have a valid Cypress binary in place at this point, | ||
# but we _could_ have had a cache miss on `~/.cache/Cypress` but a | ||
# cache hit on `node_modules` leaving us in a state where the | ||
# Cypress binary isn't available. This step ensures that the | ||
# Cypress binary is in place | ||
- name: Install Cypress | ||
run: pnpm exec cypress install | ||
|
||
- name: Run tests | ||
run: yarn cypress:ci | ||
run: pnpm cypress:ci | ||
|
||
- name: Upload Screenshots | ||
uses: actions/upload-artifact@v4 | ||
|
@@ -219,6 +244,7 @@ jobs: | |
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: "0" | ||
|
||
- name: Ensure main branch is available | ||
run: | | ||
REF=$(git rev-parse HEAD) | ||
|
@@ -301,7 +327,7 @@ jobs: | |
Example: | ||
```sh | ||
yarn add @khanacademy/perseus@${{ | ||
pnpm add @khanacademy/perseus@${{ | ||
steps.publish-snapshot.outputs.npm_snapshot_tag }} | ||
``` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -48,7 +48,7 @@ jobs: | |
|
||
- name: Build Storybook | ||
# Generate a static version of storybook inside "storybook-static/" | ||
run: yarn build-storybook | ||
run: pnpm build-storybook | ||
|
||
- name: Deploy to GitHub pages | ||
uses: JamesIves/[email protected] | ||
|
@@ -62,7 +62,7 @@ jobs: | |
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
publish: yarn publish:ci | ||
publish: pnpm publish:ci | ||
env: | ||
# We use a Personal Access Token here rather than the GITHUB_TOKEN | ||
# so that it will trigger our other actions. The token has to be on | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,8 @@ | |
.nvmrc | ||
.prettierignore | ||
LICENSE | ||
yarn.lock | ||
pnpm-lock.yaml | ||
pnpm-workspace.yaml | ||
|
||
coverage/ | ||
docs/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.