Skip to content

Commit

Permalink
Use new namespace for manifest operations
Browse files Browse the repository at this point in the history
  • Loading branch information
millerds committed Aug 4, 2021
1 parent 8727acd commit 21cb060
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 69 deletions.
93 changes: 32 additions & 61 deletions package-lock.json

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

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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 21cb060

Please sign in to comment.