Skip to content

Commit

Permalink
Merge branch 'develop' into 240213-apply-token-detection-controller
Browse files Browse the repository at this point in the history
  • Loading branch information
MajorLift committed Mar 13, 2024
2 parents d038ff9 + 1f2eb4a commit 127ca1d
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 23 deletions.
8 changes: 3 additions & 5 deletions development/lib/build-type.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const {
never,
literal,
} = require('superstruct');
const yaml = require('js-yaml');
const yaml = require('yaml');
const { uniqWith } = require('lodash');

const BUILDS_YML_PATH = path.resolve('./builds.yml');
Expand Down Expand Up @@ -135,9 +135,7 @@ function loadBuildTypesConfig() {
if (cachedBuildTypes !== null) {
return cachedBuildTypes;
}
const buildsData = yaml.load(fs.readFileSync(BUILDS_YML_PATH, 'utf8'), {
json: true,
});
const buildsData = yaml.parse(fs.readFileSync(BUILDS_YML_PATH, 'utf8'));
const [err, result] = validate(buildsData, BuildTypesStruct, {
coerce: true,
});
Expand All @@ -147,7 +145,7 @@ function loadBuildTypesConfig() {
});
}
cachedBuildTypes = result;
return buildsData;
return cachedBuildTypes;
}

/**
Expand Down
50 changes: 36 additions & 14 deletions lavamoat/build-system/policy.json
Original file line number Diff line number Diff line change
Expand Up @@ -2362,17 +2362,6 @@
"depcheck>cosmiconfig>parse-json>error-ex>is-arrayish": true
}
},
"depcheck>cosmiconfig>yaml": {
"globals": {
"Buffer": true,
"YAML_SILENCE_DEPRECATION_WARNINGS": true,
"YAML_SILENCE_WARNINGS": true,
"atob": true,
"btoa": true,
"console.warn": true,
"process": true
}
},
"depcheck>is-core-module": {
"globals": {
"process.versions": true
Expand Down Expand Up @@ -3749,8 +3738,8 @@
"process.env.NODE_ENV": true
},
"packages": {
"depcheck>cosmiconfig>yaml": true,
"gulp-postcss>postcss-load-config>lilconfig": true,
"gulp-postcss>postcss-load-config>yaml": true,
"ts-node": true
}
},
Expand All @@ -3771,6 +3760,17 @@
"process.cwd": true
}
},
"gulp-postcss>postcss-load-config>yaml": {
"globals": {
"Buffer": true,
"YAML_SILENCE_DEPRECATION_WARNINGS": true,
"YAML_SILENCE_WARNINGS": true,
"atob": true,
"btoa": true,
"console.warn": true,
"process": true
}
},
"gulp-sass": {
"builtin": {
"path.basename": true,
Expand Down Expand Up @@ -7896,9 +7896,20 @@
},
"packages": {
"depcheck>cosmiconfig>parse-json": true,
"depcheck>cosmiconfig>yaml": true,
"eslint>import-fresh": true,
"globby>dir-glob>path-type": true
"globby>dir-glob>path-type": true,
"stylelint>cosmiconfig>yaml": true
}
},
"stylelint>cosmiconfig>yaml": {
"globals": {
"Buffer": true,
"YAML_SILENCE_DEPRECATION_WARNINGS": true,
"YAML_SILENCE_WARNINGS": true,
"atob": true,
"btoa": true,
"console.warn": true,
"process": true
}
},
"stylelint>execall": {
Expand Down Expand Up @@ -8867,6 +8878,17 @@
"Buffer.isBuffer": true
}
},
"yaml": {
"globals": {
"Buffer": true,
"atob": true,
"btoa": true,
"console.dir": true,
"console.log": true,
"console.warn": true,
"process": true
}
},
"yargs": {
"builtin": {
"assert": true,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,6 @@
"jest": "^29.1.2",
"jest-canvas-mock": "^2.3.1",
"jest-environment-jsdom": "^29.1.2",
"js-yaml": "^4.1.0",
"jsdom": "^16.7.0",
"koa": "^2.7.0",
"lavamoat": "^8.0.2",
Expand Down Expand Up @@ -587,6 +586,7 @@
"watchify": "^4.0.0",
"webextension-polyfill": "^0.8.0",
"webpack": "^5.75.0",
"yaml": "^2.4.1",
"yargs": "^17.0.1"
},
"engines": {
Expand Down
4 changes: 2 additions & 2 deletions test/merge-coverage.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ const yargs = require('yargs/yargs');
const { hideBin } = require('yargs/helpers');
// Temporarily commented out as we can't rely on the commented yaml file
// Can be restored when the codecov checks are restored
// const yaml = require('js-yaml');
// const yaml = require('yaml');
const codecovTargets = require('../coverage-targets');

// Temporarily commented out as we can't rely on the commented yaml file
// Can be restored when the codecov checks are restored. In the meantime
// the important parts of the yaml file are copied below in normal js object
// format.
// const codecovConfig = yaml.load(fs.readFileSync('codecov.yml', 'utf8'));
// const codecovConfig = yaml.parse(fs.readFileSync('codecov.yml', 'utf8'));

const codecovConfig = {
coverage: {
Expand Down
11 changes: 10 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24903,7 +24903,6 @@ __metadata:
jest-canvas-mock: "npm:^2.3.1"
jest-environment-jsdom: "npm:^29.1.2"
jest-junit: "npm:^14.0.1"
js-yaml: "npm:^4.1.0"
jsdom: "npm:^16.7.0"
json-rpc-engine: "npm:^6.1.0"
json-rpc-middleware-stream: "npm:^5.0.1"
Expand Down Expand Up @@ -25005,6 +25004,7 @@ __metadata:
web3-stream-provider: "npm:^4.0.0"
webextension-polyfill: "npm:^0.8.0"
webpack: "npm:^5.75.0"
yaml: "npm:^2.4.1"
yargs: "npm:^17.0.1"
zxcvbn: "npm:^4.4.2"
languageName: unknown
Expand Down Expand Up @@ -35873,6 +35873,15 @@ __metadata:
languageName: node
linkType: hard

"yaml@npm:^2.4.1":
version: 2.4.1
resolution: "yaml@npm:2.4.1"
bin:
yaml: bin.mjs
checksum: 2c54fd69ef59126758ae710f9756405a7d41abcbb61aca894250d0e81e76057c14dc9bb00a9528f72f99b8f24077f694a6f7fd09cdd6711fcec2eebfbb5df409
languageName: node
linkType: hard

"yargs-parser@npm:20.2.4":
version: 20.2.4
resolution: "yargs-parser@npm:20.2.4"
Expand Down

0 comments on commit 127ca1d

Please sign in to comment.