Skip to content

[admin] Switch from .xlsx to .csv files for snippet mapping#1089

Merged
AlexJerabek merged 7 commits into
mainfrom
AlexJ-CSV
May 5, 2026
Merged

[admin] Switch from .xlsx to .csv files for snippet mapping#1089
AlexJerabek merged 7 commits into
mainfrom
AlexJ-CSV

Conversation

@AlexJerabek
Copy link
Copy Markdown
Collaborator

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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/*.xlsx inputs with snippet-extractor-metadata/*.csv and update the extractor to parse CSV.
  • Remove exceljs and lodash dependencies and refactor affected config/build utilities to use native equivalents.
  • Adjust TypeScript compiler module settings and normalize the Outlook default snippet template’s api_set to 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.

Comment thread config/build.documentation.ts Outdated
@AlexJerabek AlexJerabek removed the request for review from ElizabethSamuel-MSFT May 4, 2026 22:58
AlexJerabek and others added 3 commits May 5, 2026 09:48
…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>
@AlexJerabek AlexJerabek merged commit 39603de into main May 5, 2026
3 checks passed
@AlexJerabek AlexJerabek deleted the AlexJ-CSV branch May 5, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants