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

Update deps 2025-02 #1381

Merged
merged 73 commits into from
Feb 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
62fed09
Update dependencies for repo root
nygrenh Feb 3, 2025
891ce4d
npm audit for repo root
nygrenh Feb 3, 2025
b6f03f8
Update dependencies for system-tests
nygrenh Feb 3, 2025
e39ff6f
Update dependencies for cms
nygrenh Feb 3, 2025
33ffcf4
Update dependencies for course-material
nygrenh Feb 3, 2025
e955aaa
Update dependencies for example-exercise
nygrenh Feb 3, 2025
ffe3a2b
Update dependencies for main-frontend
nygrenh Feb 3, 2025
90f1722
Update dependencies for quizzes
nygrenh Feb 3, 2025
b9e34e5
Update dependencies for tmc
nygrenh Feb 3, 2025
3e69316
Update dependencies for shared-module
nygrenh Feb 3, 2025
2f01573
Cargo upgrade
nygrenh Feb 3, 2025
71b1203
Cargo update
nygrenh Feb 3, 2025
0a40068
Update deps for shared module common
nygrenh Feb 3, 2025
b063be8
Update lockfiles to v3 format
nygrenh Feb 3, 2025
26b1ca5
Rand library updates
nygrenh Feb 3, 2025
8062a80
Address crate updates
nygrenh Feb 3, 2025
1eebc2b
Update rust version
nygrenh Feb 3, 2025
0c2a433
Clippy fixes
nygrenh Feb 3, 2025
0374666
Fix extract gutenberg atribute types script
nygrenh Feb 5, 2025
b311f39
Eslint new config format, fixes
nygrenh Feb 5, 2025
d4d4c78
WIP
nygrenh Feb 7, 2025
08caa55
WIP
nygrenh Feb 7, 2025
e22ccdc
WIP
nygrenh Feb 7, 2025
2cbb95a
WIP
nygrenh Feb 7, 2025
a7c1ae4
WIP
nygrenh Feb 7, 2025
b26984d
WIP
nygrenh Feb 10, 2025
b99c64d
WIP
nygrenh Feb 10, 2025
2933adc
WIP
nygrenh Feb 10, 2025
95c1f8a
WIP
nygrenh Feb 10, 2025
c31bf71
Ts-expect-error
nygrenh Feb 10, 2025
1a4974c
Update ignores
nygrenh Feb 11, 2025
4f84cff
WIP
nygrenh Feb 11, 2025
e5ca43f
WIP
nygrenh Feb 11, 2025
a5b4ed7
WIP
nygrenh Feb 11, 2025
6cc56de
WIP
nygrenh Feb 11, 2025
28446a1
WIP
nygrenh Feb 11, 2025
f250fca
WIP
nygrenh Feb 11, 2025
7ec1f6f
WIP
nygrenh Feb 11, 2025
5942cbb
WIP
nygrenh Feb 11, 2025
0ce1915
WIP
nygrenh Feb 11, 2025
262456a
Formatting, convert lint staged configs to use es module syntax
nygrenh Feb 12, 2025
3775134
Fixes
nygrenh Feb 12, 2025
13c4658
System test fixes
nygrenh Feb 12, 2025
785187b
System test fixes
nygrenh Feb 12, 2025
680c3e7
System test fixes
nygrenh Feb 12, 2025
57d00f7
System test fixes
nygrenh Feb 13, 2025
44a3f26
Generate stuff
nygrenh Feb 13, 2025
1af7e2e
Merge remote-tracking branch 'origin/master' into update-deps-2025-02
nygrenh Feb 13, 2025
8930f36
Test fixes
nygrenh Feb 13, 2025
3931f45
Update gutenberg deps cleaning
nygrenh Feb 14, 2025
2f88110
Next.js updates
nygrenh Feb 14, 2025
e98d983
Update dependencies for repo root
nygrenh Feb 14, 2025
ce1263e
Update dependencies for system-tests
nygrenh Feb 14, 2025
c365afc
Update dependencies for cms
nygrenh Feb 14, 2025
538721a
Update dependencies for course-material
nygrenh Feb 14, 2025
d2babc1
Update dependencies for example-exercise
nygrenh Feb 14, 2025
05fea93
Update dependencies for main-frontend
nygrenh Feb 14, 2025
84a90e8
Update dependencies for quizzes
nygrenh Feb 14, 2025
2daa05d
Update dependencies for tmc
nygrenh Feb 14, 2025
e4c5f4d
Uninstall some unused packages
nygrenh Feb 14, 2025
617c027
Update dependencies for shared-module/common
nygrenh Feb 14, 2025
9955c9b
npm audit for shared-module/common
nygrenh Feb 14, 2025
e419e02
Cargo upgrade
nygrenh Feb 14, 2025
dc18511
Cargo update
nygrenh Feb 14, 2025
4353da0
Replace ts-node with tsx
nygrenh Feb 14, 2025
d43d658
Use the repo eslint in bin/download-tmc-langs
nygrenh Feb 14, 2025
b42b672
Update gutenberg types
nygrenh Feb 14, 2025
5ecdaed
Restore azure_core version
nygrenh Feb 14, 2025
3aefa8d
Cargo upgrade
nygrenh Feb 14, 2025
3c37928
Cargo update
nygrenh Feb 14, 2025
8ceaa2c
Ignore rust version requirements when upgrading rust deps
nygrenh Feb 14, 2025
fe4c520
Rust derive_more fix
nygrenh Feb 14, 2025
c671f6e
Fixes
nygrenh Feb 14, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
9 changes: 0 additions & 9 deletions .eslintignore

This file was deleted.

276 changes: 0 additions & 276 deletions .eslintrc.js

This file was deleted.

27 changes: 17 additions & 10 deletions .husky/ensure-dependencies-up-to-date.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import path from "path"
import { exec as execOriginal, spawn } from "child_process"
import { mkdir, readFile, writeFile } from "fs/promises"
import path from "path"
import { fileURLToPath } from "url"
import { promisify } from "util"
import { readFile, writeFile, mkdir } from "fs/promises"

const exec = promisify(execOriginal)

const currentDir = __dirname
const currentDir = path.dirname(fileURLToPath(import.meta.url))
const projectRoot = path.resolve(currentDir, "..")
const savedCommitHashesPath = `${projectRoot}/.husky/_/saved-hashes`

Expand All @@ -16,11 +17,15 @@ async function main(): Promise<void> {
console.log(`> npm ci`)
await runCommandWithVisibleOutput("npm", ["ci"])
})
await detectChange("shared-module/src", "shared-module", async () => {
console.log("Installing the shared module again.")
console.log(`> npm run postinstall`)
await runCommandWithVisibleOutput("npm", ["run", "postinstall"])
})
await detectChange(
"shared-module/packages/common/src/locales",
"shared-module-common-locales",
async () => {
console.log("Installing the shared module again.")
console.log(`> npm run postinstall`)
await runCommandWithVisibleOutput("npm", ["run", "postinstall"])
},
)
}

async function detectChange(
Expand All @@ -33,15 +38,17 @@ async function detectChange(
if (hash === savedHash) {
return
}
console.log(`Detected a change in '${relativePath}'. (Saved hash: '${savedHash}', New hash: '${hash}')`)
console.log(
`Detected a change in '${relativePath}'. (Saved hash: '${savedHash}', New hash: '${hash}')`,
)
await onChangeDetected()
await writeFile(`${savedCommitHashesPath}/${key}`, hash)
}

async function getSavedCommitHash(key: string): Promise<string | null> {
try {
return await readFile(`${savedCommitHashesPath}/${key}`, "utf-8")
} catch (e) {
} catch (_e) {
// Happens usually when we have not written yet
return null
}
Expand Down
11 changes: 4 additions & 7 deletions .husky/lint-staged.branch-ready.config.js
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
// Runs when you run bin/git-run-branch-ready-checks.
// These checks are slower and more likely to fail than the precommit checks.
// See lint-staged.precommit.config.js for precommit checks.
module.exports = {
export default {
"*.{js,jsx,ts,tsx}": ["eslint --cache --fix", "stylelint --fix lax"],
"services/example-exercise/src/**/*.{js,jsx,ts,tsx}": () =>
"npx tsc -p services/example-exercise/ --noEmit",
"services/cms/src/**/*.{js,jsx,ts,tsx}": () =>
"npx tsc -p services/cms/ --noEmit",
"services/cms/src/**/*.{js,jsx,ts,tsx}": () => "npx tsc -p services/cms/ --noEmit",
"services/main-frontend/src/**/*.{js,jsx,ts,tsx}": () =>
"npx tsc -p services/main-frontend/ --noEmit",
"services/course-material/src/**/*.{js,jsx,ts,tsx}": () =>
"npx tsc -p services/course-material/ --noEmit",
"services/quizzes/src/**/*.{js,jsx,ts,tsx}": () =>
"npx tsc -p services/quizzes/ --noEmit",
"services/tmc/src/**/*.{js,jsx,ts,tsx}": () =>
"npx tsc -p services/tmc/ --noEmit",
"services/quizzes/src/**/*.{js,jsx,ts,tsx}": () => "npx tsc -p services/quizzes/ --noEmit",
"services/tmc/src/**/*.{js,jsx,ts,tsx}": () => "npx tsc -p services/tmc/ --noEmit",
"*.{md,json,scss,css}": "prettier --write",
"*.rs": () => [
"cargo fmt --manifest-path services/headless-lms/Cargo.toml --all -- --files-with-diff",
Expand Down
6 changes: 2 additions & 4 deletions .husky/lint-staged.precommit.config.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
// Runs on precommit.
// Focuses on tests that are fast to run don't fail often. For other checks, see bin/git-run-branch-ready-checks and lint-staged.branch-ready.config.js
module.exports = {
export default {
"*.{js,jsx,ts,tsx}": ["eslint --cache --fix", "stylelint --fix lax"],
"*.{md,json,scss,css}": "prettier --write",
"*.rs": () => [
"cargo fmt --manifest-path services/headless-lms/Cargo.toml --all -- --files-with-diff",
],
"system-tests/src/**/*.{js,jsx,ts,tsx}": () => [
`./bin/check-no-test-only-in-system-tests`,
],
"system-tests/src/**/*.{js,jsx,ts,tsx}": () => [`./bin/check-no-test-only-in-system-tests`],
"shared-module/packages/common/src/locales/**/*.json": () => ["./bin/translations-sort"],
}
2 changes: 1 addition & 1 deletion .husky/post-checkout
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/sh
npx ts-node .husky/ensure-dependencies-up-to-date.ts
npx tsx .husky/ensure-dependencies-up-to-date.ts
2 changes: 1 addition & 1 deletion .husky/post-merge
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/sh
# Runs after git pull
npx ts-node .husky/ensure-dependencies-up-to-date.ts
npx tsx .husky/ensure-dependencies-up-to-date.ts
Loading
Loading