Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

HARP-15180 Upgrading yeoman because it has a transitive dependency (axios) which is out of date #2202

Merged
merged 2 commits into from
May 25, 2021
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
5 changes: 3 additions & 2 deletions @here/generator-harp.gl/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,14 @@
],
"dependencies": {
"mkdirp": "^1.0.4",
"yeoman-generator": "^4.10.1"
"yeoman-generator": "^5.2.0"
},
"devDependencies": {
"chai": "^4.2.0",
"fs.extra": "^1.3.2",
"mocha": "^8.2.1",
"yeoman-test": "^2.6.0"
"yeoman-environment": "^3.4.1",
"yeoman-test": "^6.1.0"
},
"publishConfig": {
"access": "public"
Expand Down
27 changes: 12 additions & 15 deletions @here/generator-harp.gl/test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,8 @@ const fs = require("fs");
const fsExtra = require("fs.extra");
const path = require("path");
const yeomanTestHelpers = require("yeoman-test");
const {
assert
} = require("chai");
const {
spawnSync
} = require('child_process');
const { assert } = require("chai");
const { spawnSync } = require("child_process");

/*

Expand All @@ -17,43 +13,44 @@ const {

*/
describe("harp.gl:app", function () {

this.timeout(300000);

let helperDirectory;
let runContext;

before(async function () {
helperDirectory = await yeomanTestHelpers.run(path.join(__dirname, '../generators/app'))
runContext = await yeomanTestHelpers
.run(path.join(__dirname, "../generators/app"))
.inTmpDir(function (dir) {
if (process.env.USE_NPMRC) {
const targetPath = path.join(dir, ".npmrc");
fs.copyFileSync(process.env.USE_NPMRC, targetPath);
}
})
.withPrompts({
'access_token': 'test_token'
language: "typescript",
nzjony marked this conversation as resolved.
Show resolved Hide resolved
apikey: "test_token"
});

assert.isString(helperDirectory);
assert.isNotNull(runContext);
});

it("webpack", async function () {
const installStatus = spawnSync("npm", ["install"], {
cwd: helperDirectory
cwd: runContext.cwd
});
assert.strictEqual(installStatus.status, 0, installStatus.output);

const buildStatus = spawnSync("npm", ["run", "build"], {
cwd: helperDirectory
cwd: runContext.cwd
});
assert.strictEqual(buildStatus.status, 0, buildStatus.output);
});

after(function () {
if (process.env.KEEP_TEMP_DIR) {
console.log("Keeping", helperDirectory);
console.log("Keeping", runContext.cwd);
} else {
fsExtra.rmrfSync(helperDirectory);
fsExtra.rmrfSync(runContext.cwd);
}
});
});
Loading