Skip to content

Commit

Permalink
Merge pull request #653 from millerds/fix-resolve-manifest-operations
Browse files Browse the repository at this point in the history
Fix resolve manifest operations
  • Loading branch information
millerds committed Aug 6, 2021
2 parents 3f41177 + 21cb060 commit 5ad1d19
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 71 deletions.
95 changes: 33 additions & 62 deletions package-lock.json

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

6 changes: 3 additions & 3 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "generator-office",
"version": "1.7.9",
"version": "1.7.10",
"description": "Yeoman generator for creating Microsoft Office projects using any text editor.",
"repository": {
"type": "git",
Expand Down Expand Up @@ -39,8 +39,8 @@
"dependencies": {
"chalk": "^4.0.0",
"lodash": "^4.17.21",
"office-addin-manifest": "^1.5.16",
"office-addin-usage-data": "^1.0.23",
"office-addin-manifest": "^1.6.2",
"office-addin-usage-data": "^1.3.2",
"opn": "^6.0.0",
"request": "^2.88.2",
"rimraf": "^3.0.2",
Expand Down
4 changes: 2 additions & 2 deletions src/app/index.ts
Expand Up @@ -7,7 +7,7 @@ import * as chalk from 'chalk';
import * as childProcess from "child_process";
import * as defaults from "./defaults";
import { helperMethods } from './helpers/helperMethods';
import { modifyManifestFile } from 'office-addin-manifest';
import { OfficeAddinManifest } from 'office-addin-manifest';
import projectsJsonData from './config/projectsJsonData';
import { promisify } from "util";
import * as usageData from "office-addin-usage-data";
Expand Down Expand Up @@ -339,7 +339,7 @@ module.exports = class extends yo {
await childProcessExec(cmdLine);

// modify manifest guid and DisplayName
await modifyManifestFile(`${this.destinationPath()}/manifest.xml`, 'random', `${this.project.name}`);
await OfficeAddinManifest.modifyManifestFile(`${this.destinationPath()}/manifest.xml`, 'random', `${this.project.name}`);

return resolve()
}
Expand Down
8 changes: 4 additions & 4 deletions src/test/convert-to-single-host.ts
Expand Up @@ -5,7 +5,7 @@
import * as assert from 'yeoman-assert';
import * as fs from "fs";
import * as helpers from 'yeoman-test';
import { readManifestFile } from "office-addin-manifest";
import { OfficeAddinManifest } from "office-addin-manifest";
import * as path from 'path';
import { promisify } from "util";
const hosts = ["excel", "onenote", "outlook", "powerpoint", "project", "word"];
Expand Down Expand Up @@ -77,7 +77,7 @@ describe('Office-Add-Taskpane-Ts projects', () => {

describe('Manifest.xml is updated appropriately', () => {
it('Manifest.xml is updated appropriately', async () => {
const manifestInfo = await readManifestFile(manifestFile);
const manifestInfo = await OfficeAddinManifest.readManifestFile(manifestFile);
assert.equal(manifestInfo.hosts, "Workbook");
assert.equal(manifestInfo.displayName, testProjectName);
});
Expand Down Expand Up @@ -139,7 +139,7 @@ describe('Office-Add-Taskpane-Angular-Js project', () => {

describe('Manifest.xml is updated appropriately', () => {
it('Manifest.xml is updated appropriately', async () => {
const manifestInfo = await readManifestFile(manifestFile);
const manifestInfo = await OfficeAddinManifest.readManifestFile(manifestFile);
assert.equal(manifestInfo.hosts, "Document");
});
});
Expand Down Expand Up @@ -200,7 +200,7 @@ describe('Office-Add-Taskpane-React-Ts project', () => {

describe('Manifest.xml is updated appropriately', () => {
it('Manifest.xml is updated appropriately', async () => {
const manifestInfo = await readManifestFile(manifestFile);
const manifestInfo = await OfficeAddinManifest.readManifestFile(manifestFile);
assert.equal(manifestInfo.hosts, "Presentation");
});
});
Expand Down

0 comments on commit 5ad1d19

Please sign in to comment.