[admin] Switch from .xlsx to .csv files for snippet mapping#1089
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the snippet-to-API mapping workflow by replacing Excel .xlsx metadata files with plain-text .csv equivalents, and updates the build tooling to consume CSVs (removing the need for exceljs). It also drops lodash usage in the build/config scripts by replacing it with native JS/TS implementations.
Changes:
- Replace
snippet-extractor-metadata/*.xlsxinputs withsnippet-extractor-metadata/*.csvand update the extractor to parse CSV. - Remove
exceljsandlodashdependencies and refactor affected config/build utilities to use native equivalents. - Adjust TypeScript compiler module settings and normalize the Outlook default snippet template’s
api_setto an empty object.
Reviewed changes
Copilot reviewed 11 out of 17 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.json | Switch TS module/moduleResolution to node16. |
| package.json | Remove exceljs/lodash; add overrides for uuid. |
| package-lock.json | Reflect dependency removals and updated uuid resolution. |
| snippet-extractor-metadata/word.csv | Add Word snippet mapping as CSV. |
| snippet-extractor-metadata/powerpoint.csv | Add PowerPoint snippet mapping as CSV. |
| snippet-extractor-metadata/outlook.csv | Add Outlook snippet mapping as CSV. |
| snippet-extractor-metadata/excel.csv | Add Excel snippet mapping as CSV. |
| samples/outlook/default.yaml | Change api_set from null to {}. |
| config/status.ts | Remove lodash helpers in favor of native checks. |
| config/snippet.helpers.ts | Replace lodash forIn with Object.keys iteration. |
| config/helpers.ts | Remove lodash checks; tighten types (e.g., Dictionary.get). |
| config/build.ts | Remove lodash utilities; add local startCase/grouping/sorting; use structuredClone. |
| config/build.documentation.ts | Replace ExcelJS .xlsx reading with CSV parsing and header mapping. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…ifest office-addin-mock@3.0.8 depends on office-addin-manifest@2.1.4, which pulls @microsoft/app-manifest@1.0.5 that requires strip-bom@^5.0.0 (ESM-only). Jest's CommonJS runtime cannot require() ESM modules, causing the runtime test suites to fail with 'Unexpected token export'. Fix by: - Pinning office-addin-manifest to 2.1.2 as a direct devDependency - Adding overrides.strip-bom=4.0.0 to force CJS-compatible strip-bom everywhere Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The Azure Monitor OpenTelemetry exporter (a transitive dep of office-addin-usage-data) starts a background statsbeat timer. When it fires during Jest teardown, it calls dynamic import() inside Node's VM context. Node 24 now throws ERR_VM_DYNAMIC_IMPORT_CALLBACK_MISSING_FLAG in this case. Fix: set APPLICATION_INSIGHTS_NO_STATSBEAT=1 at the top of jest.config.js so the statsbeat timer never starts during test runs. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
ElizabethSamuel-MSFT
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The .xlsx files that stored the mapping of snippet to API were prone to merge conflicts and impossible to review through the GitHub UI. This PR switches those files to be .csv. They can still be opened and edited in Excel, but the extra Excel features aren't really useful here.