Skip to content
Draft
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
3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
registry=https://registry.npmjs.org/
registry=https://office.pkgs.visualstudio.com/_packaging/OfficeDev/npm/registry/
always-auth=true
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,13 @@ The [Excel Custom Functions](https://github.com/OfficeDev/Excel-Custom-Functions

* [Node.js](https://nodejs.org)

## npm registry auth
Run the following command to get the authenticator for the first time:

`npm install --global @microsoft/artifacts-npm-credprovider --registry https://pkgs.dev.azure.com/artifacts-public/23934c1b-a3b5-4b70-9dd3-d1bef4cc72a0/_packaging/AzureArtifacts/npm/registry/`

Run `artifacts-npm-credprovider` to authenticate for the npm registry.

## Getting started

In a command prompt, run:
Expand Down
2,274 changes: 1,315 additions & 959 deletions package-lock.json

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"update-packages": "npm run exec -- npm update --dev"
},
"devDependencies": {
"@microsoft/eslint-plugin-sdl": "^1.0.1",
"@types/node": "^22.10.10",
"eslint": "^9.0.0",
"lerna": "^9.0.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/office-addin-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"concurrently": "^9.0.0",
"eslint": "^9.0.0",
"eslint-plugin-office-addins": "^4.0.10",
"eslint-plugin-prettier": "^3.4.0",
"eslint-plugin-prettier": "^5.1.3",
"mocha": "^11.0.1",
"office-addin-prettier-config": "^2.0.5",
"office-addin-usage-data": "^2.1.1",
Expand Down
6 changes: 2 additions & 4 deletions packages/office-addin-debugging/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import officeAddins from "eslint-plugin-office-addins";
import tsParser from "@typescript-eslint/parser";
import sdl from "@microsoft/eslint-plugin-sdl";

export default [
...officeAddins.configs.recommended,
...sdl.configs.recommended,
{
plugins: {
"office-addins": officeAddins,
Expand All @@ -13,8 +11,8 @@ export default [
parser: tsParser,
parserOptions: {
projectService: true,
tsconfigRootDir: "__dirname"
}
tsconfigRootDir: "__dirname",
},
},
},
];
4 changes: 1 addition & 3 deletions packages/office-addin-debugging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"Office"
],
"dependencies": {
"adm-zip": "0.5.12",
"adm-zip": "^0.6.0",
"commander": "^13.0.0",
"node-fetch": "^2.6.1",
"office-addin-cli": "^2.0.10",
Expand All @@ -34,8 +34,6 @@
"office-addin-usage-data": "^2.1.1"
},
"devDependencies": {
"@microsoft/eslint-plugin-sdl": "^1.0.1",
"@types/adm-zip": "^0.5.5",
"@types/express": "^5.0.0",
"@types/mocha": "^10.0.6",
"@types/node": "^14.17.2",
Expand Down
6 changes: 2 additions & 4 deletions packages/office-addin-dev-settings/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import officeAddins from "eslint-plugin-office-addins";
import tsParser from "@typescript-eslint/parser";
import sdl from "@microsoft/eslint-plugin-sdl";

export default [
...officeAddins.configs.recommended,
...sdl.configs.recommended,
{
plugins: {
"office-addins": officeAddins,
Expand All @@ -13,8 +11,8 @@ export default [
parser: tsParser,
parserOptions: {
projectService: true,
tsconfigRootDir: "__dirname"
}
tsconfigRootDir: "__dirname",
},
},
},
];
4 changes: 1 addition & 3 deletions packages/office-addin-dev-settings/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"Office Add-in"
],
"dependencies": {
"adm-zip": "0.5.12",
"adm-zip": "^0.6.0",
"commander": "^13.0.0",
"fs-extra": "^11.2.0",
"inquirer": "^12.10.0",
Expand All @@ -37,8 +37,6 @@
"@microsoft/m365agentstoolkit-cli": "^1.1.11"
},
"devDependencies": {
"@microsoft/eslint-plugin-sdl": "^1.0.1",
"@types/adm-zip": "^0.5.5",
"@types/fs-extra": "^11.0.4",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.27",
Expand Down
3 changes: 1 addition & 2 deletions packages/office-addin-manifest/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
],
"dependencies": {
"@microsoft/app-manifest": "^1.0.2",
"adm-zip": "0.5.16",
"adm-zip": "0.6.0",
"chalk": "^2.4.2",
"commander": "^13.0.0",
"fs-extra": "^7.0.1",
Expand All @@ -33,7 +33,6 @@
"xml2js": "^0.5.0"
},
"devDependencies": {
"@types/adm-zip": "^0.5.0",
"@types/fs-extra": "^9.0.13",
"@types/mocha": "^10.0.6",
"@types/node": "^14.17.2",
Expand Down
10 changes: 5 additions & 5 deletions packages/office-addin-manifest/src/export.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ async function saveZip(zip: AdmZip, outputPath: string): Promise<void> {
outputPath = path.resolve(outputPath);

fsExtra.ensureDirSync(path.dirname(outputPath));
const result: Boolean = await zip.writeZipPromise(outputPath);
if (result) {
console.log(`Manifest package saved to ${outputPath}`);
} else {
throw new Error(`Error writting zip file to ${outputPath}`);
try {
await zip.writeZipPromise(outputPath);
} catch {
throw new Error(`Error writing zip file to ${outputPath}`);
}
console.log(`Manifest package saved to ${outputPath}`);
}
6 changes: 2 additions & 4 deletions packages/office-addin-node-debugger/eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import officeAddins from "eslint-plugin-office-addins";
import tsParser from "@typescript-eslint/parser";
import sdl from "@microsoft/eslint-plugin-sdl";

export default [
...officeAddins.configs.recommended,
...sdl.configs.recommended,
{
plugins: {
"office-addins": officeAddins,
Expand All @@ -13,8 +11,8 @@ export default [
parser: tsParser,
parserOptions: {
projectService: true,
tsconfigRootDir: "__dirname"
}
tsconfigRootDir: "__dirname",
},
},
},
];
1 change: 0 additions & 1 deletion packages/office-addin-node-debugger/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
"ws": "^7.4.6"
},
"devDependencies": {
"@microsoft/eslint-plugin-sdl": "^1.0.1",
"@types/node": "^14.17.2",
"@types/node-fetch": "^2.5.10",
"@types/ws": "^5.1.2",
Expand Down
3 changes: 1 addition & 2 deletions packages/office-addin-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"office-js"
],
"dependencies": {
"adm-zip": "0.5.12",
"adm-zip": "^0.6.0",
"commander": "^13.0.0",
"fs-extra": "^7.0.1",
"inquirer": "^12.10.0",
Expand All @@ -27,7 +27,6 @@
"office-addin-usage-data": "^2.1.1"
},
"devDependencies": {
"@types/adm-zip": "^0.5.0",
"@types/fs-extra": "^9.0.13",
"@types/mocha": "^10.0.6",
"@types/node": "^18.0.0",
Expand Down
9 changes: 5 additions & 4 deletions packages/office-addin-project/src/convert.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,12 @@ async function backupProject(backupPath: string) {
});

fsExtra.ensureDirSync(path.dirname(outputPath));
if (await zip.writeZipPromise(outputPath)) {
console.log(`A backup of your project was created to ${outputPath}`);
} else {
throw new Error(`Error writting zip file to ${outputPath}`);
try {
await zip.writeZipPromise(outputPath);
} catch {
throw new Error(`Error writing zip file to ${outputPath}`);
}
console.log(`A backup of your project was created to ${outputPath}`);
}

async function restoreBackup(backupPath: string) {
Expand Down
2 changes: 1 addition & 1 deletion packages/office-addin-usage-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"concurrently": "^9.0.0",
"eslint": "^9.0.0",
"eslint-plugin-office-addins": "^4.0.10",
"eslint-plugin-prettier": "^5.2.1",
"eslint-plugin-prettier": "^5.1.3",
"mocha": "^11.0.1",
"office-addin-prettier-config": "^2.0.5",
"rimraf": "^6.0.1",
Expand Down