-
Notifications
You must be signed in to change notification settings - Fork 49
Add esm support #177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add esm support #177
Conversation
- Update .gitignore to include esm/ directory - Modify buildpackage.js to clean and compile TypeScript for both bin and esm directories - Add generateExports.js to dynamically update package.json exports - Remove rename Context.d.ts file to Context.ts - Update package.json to include new scripts and dependencies - Create tsconfig.esm.json for ESM module compilation
Merge changes form master
@microsoft-github-policy-service agree |
This pull request introduces significant improvements to the build process and module packaging for the project, focusing on better support for ESM (ECMAScript Modules) output and more robust package exports. The changes include updates to the build script to generate both CommonJS and ESM outputs, automated generation of the
exportsfield inpackage.json, and dependency updates. These enhancements will make the package easier to consume in both Node.js and modern JavaScript environments.Build and packaging improvements:
buildpackage.jsto clean bothbin/andesm/directories, compile TypeScript for both CommonJS and ESM targets, move ESM output tobin/esm, and create an ESM-specificpackage.json. Also updated minification logic to skip ESM files. [1] [2] [3]generateExports.jsto automatically generate theexportsfield inpackage.jsonbased on the structure of thesrc/directory, ensuring correct module resolution for both ESM and CommonJS consumers.tsconfig.esm.jsonto configure TypeScript compilation for ESM output.Project configuration and dependency updates:
"type": "module"inpackage.jsonand added new npm scripts for preparing and generating exports. Also addedazure-devops-extension-sdkas a dependency. [1] [2]Code style consistency:
src/Boards/BoardsClient.tsto useimport * as Boardsfor consistency with ESM.