Skip to content
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
148 changes: 143 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"ip": "^2.0.1",
"jasmine": "^6.3.0",
"jquery": "3.7.1",
"js-yaml": "^4.2.0",
"js-yaml": "^5.1.0",
"karma": "^6.4.4",
"karma-browserstack-launcher": "1.4.0",
"karma-chrome-launcher": "^3.2.0",
Expand Down
4 changes: 2 additions & 2 deletions site/src/libs/config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'node:fs'
import yaml from 'js-yaml'
import { load as yamlLoad } from 'js-yaml'
import { z } from 'zod'
import { zPrefixedVersionSemver, zVersionMajorMinor, zVersionSemver } from './validation'

Expand Down Expand Up @@ -70,7 +70,7 @@ export function getConfig(): Config {

try {
// Load the config from the `config.yml` file.
const rawConfig = yaml.load(fs.readFileSync('./config.yml', 'utf8'))
const rawConfig = yamlLoad(fs.readFileSync('./config.yml', 'utf8'))

// Parse the config using the config schema to validate its content and get back a fully typed config object.
config = configSchema.parse(rawConfig)
Expand Down
4 changes: 2 additions & 2 deletions site/src/libs/data.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'node:fs'
import yaml from 'js-yaml'
import { load as yamlLoad } from 'js-yaml'
import { z } from 'zod'
import {
zHexColor,
Expand Down Expand Up @@ -124,7 +124,7 @@ export function getData<TType extends DataType>(type: TType): z.infer<(typeof da

try {
// Load the data from the yml file.
const rawData = yaml.load(fs.readFileSync(dataPath, 'utf8'))
const rawData = yamlLoad(fs.readFileSync(dataPath, 'utf8'))

// Parse the data using the data schema to validate its content and get back a fully typed data object.
const parsedData = dataDefinitions[type].parse(rawData)
Expand Down