Skip to content

Commit

Permalink
Chore: update packages to latest major versions (#348)
Browse files Browse the repository at this point in the history
* Prettier 3.0 changed trailing-comma from es5 to all
* Improve :any type
* Update all dependencies to a recent major version
  • Loading branch information
DavidSouther authored Jun 6, 2024
1 parent 74e4ddb commit 99ec24a
Show file tree
Hide file tree
Showing 132 changed files with 8,057 additions and 112,315 deletions.
24 changes: 24 additions & 0 deletions .prettierconfig.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
arrowParens: "always" # default
bracketSameLine: false # default
bracketSpacing: true # default
embeddedLanguageFormatting: "auto" # default
endOfLine: "lf" # default
filepath: "" # default
htmlWhitespaceSensitivity: "css" # default
insertPragma: false # default
jsxBracketSameLine: false # default
jsxSingleQuote: false # default
parser: "" # default
printWidth: 80 # Default
proseWrap: "preserve" # default
quoteProps: "as-needed" # default
rangeEnd: Infinity # default
rangeStart: 0 # default
requirePragma: false # default
semi: true # default
singleAttributePerLine: "false" # default
singleQuote: false # default
tabWidth: 2 # default
trailingComma: "es5" # default
useTabs: false # default
vueIndentScriptAndStyle: false # default
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
projects/src/project_06/04_pong.ts
projects/src/project_06/04_pong_asm.ts
projects/src/samples/project_06/04_pong_asm.ts
web/public/pico.min.css
web/src/locales
8 changes: 4 additions & 4 deletions cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
"test": "jest"
},
"devDependencies": {
"@davidsouther/jiffies": "^2.0.6",
"@davidsouther/jiffies": "^2.2.5",
"@nand2tetris/runner": "^1.0.0",
"@nand2tetris/simulator": "^1.0.0"
},
"dependencies": {
"@types/node": "^18.11.18",
"@types/yargs": "^17.0.18",
"yargs": "^17.6.2"
"@types/node": "^20.14.2",
"@types/yargs": "^17.0.32",
"yargs": "^17.7.2"
}
}
4 changes: 2 additions & 2 deletions cli/src/grading.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,15 +50,15 @@ export async function main(folder = process.cwd(), java_ide = "") {

for (const test of tests) {
console.log(
`Test ${test.name}: ${test.pass ? `Passed` : `Failed (${test.out})`}`
`Test ${test.name}: ${test.pass ? `Passed` : `Failed (${test.out})`}`,
);
if (test.shadow) {
console.log(
`\tShadow: ${
test.shadow.code === 0
? `Passed`
: `Errored (${test.shadow.stderr.trim()})`
}`
}`,
);
} else {
console.log("\tNo shadow");
Expand Down
4 changes: 2 additions & 2 deletions cli/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ yargs(hideBin(process.argv))
(argv) => {
console.log("grade", argv.directory, "nand2tetris grader!");
main(argv.directory, argv.java_ide);
}
},
)
.command(
"run <file>",
Expand Down Expand Up @@ -68,7 +68,7 @@ yargs(hideBin(process.argv))
console.log("unknown", ext);
break;
}
}
},
)
.help()
.demandCommand(1)
Expand Down
4 changes: 2 additions & 2 deletions cli/src/testrunner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ async function loadAssignment(fs: FileSystem, file: Assignment) {
const tst = await fs
.readFile(`${file.name}.tst`)
.catch(
() => assignment[`${file.name}.tst` as keyof typeof assignment] as string
() => assignment[`${file.name}.tst` as keyof typeof assignment] as string,
);
const cmp = await fs
.readFile(`${file.name}.cmp`)
.catch(
() => assignment[`${file.name}.cmp` as keyof typeof assignment] as string
() => assignment[`${file.name}.cmp` as keyof typeof assignment] as string,
);

return { ...file, hdl, tst, cmp };
Expand Down
Loading

0 comments on commit 99ec24a

Please sign in to comment.