Skip to content

Convert to proper npm library package (resolves #118)#145

Open
Frostfire25 wants to merge 1 commit intomicrosoft:mainfrom
Frostfire25:alexandere-elguezabal/npm-library-packaging
Open

Convert to proper npm library package (resolves #118)#145
Frostfire25 wants to merge 1 commit intomicrosoft:mainfrom
Frostfire25:alexandere-elguezabal/npm-library-packaging

Conversation

@Frostfire25
Copy link
Contributor

  • Fix .npmignore: remove /dist exclusion so compiled output ships with package
  • Add files whitelist in package.json for explicit publish control
  • Rename package to @microsoft/fluentui-editable-grid with public access
  • Widen peerDependencies to support React 17, 18, and 19
  • Replace Windows-only build scripts with cross-platform cross-env/rimraf/mkdirp
  • Add CI workflow (build + verify on Node 16/18/20)
  • Add publish workflow (npm publish on GitHub Release)

@Frostfire25 Frostfire25 force-pushed the alexandere-elguezabal/npm-library-packaging branch from 92533fc to fb3b523 Compare March 18, 2026 01:09
@Frostfire25 Frostfire25 self-assigned this Mar 18, 2026
@Frostfire25 Frostfire25 requested a review from Copilot March 18, 2026 01:11
@Frostfire25 Frostfire25 added the dependencies Pull requests that update a dependency file label Mar 18, 2026
@Frostfire25 Frostfire25 force-pushed the alexandere-elguezabal/npm-library-packaging branch from fb3b523 to eca91df Compare March 18, 2026 01:13
Copy link

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 project to behave like a publishable npm library package (scoped name, explicit publish contents, cross-platform build scripts) and adds GitHub Actions workflows for CI and npm publishing.

Changes:

  • Update package.json for scoped/public publishing, explicit files whitelist, wider React peer dependency range, and cross-platform build scripts.
  • Ensure dist/ is publishable by adjusting .npmignore.
  • Add CI workflow (Node 16/18/20) and release-based publish workflow to npm.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
package.json Scoped package name, publish config/files whitelist, peerDependency range updates, and cross-platform build tooling/scripts.
.npmignore Allows dist/ to be included in published package.
.gitignore Adds package-lock.json to ignored files.
.github/workflows/ci.yml New CI workflow to build/verify output and inspect packed contents.
.github/workflows/publish.yml New release-triggered workflow to build/verify and publish to npm.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +55 to 61
"cross-env": "^7.0.3",
"immer": ">=9.0.6",
"just-scripts": "^0.27.0",
"just-stack-react": "^1.0.0",
"marked": ">=4.0.10",
"mkdirp": "^3.0.1",
"nth-check": ">=2.0.1",
Comment on lines +20 to +24
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
Comment on lines +19 to +23
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org

echo "✅ dist/ output verified"

- name: Publish to npm
run: npm publish --provenance --access public
- Fix .npmignore: remove /dist exclusion so compiled output ships with package
- Add files whitelist in package.json for explicit publish control
- Rename package to @microsoft/fluentui-editable-grid with public access
- Widen peerDependencies to support React 17, 18, and 19
- Replace Windows-only build scripts with cross-platform cross-env/rimraf/mkdirp
- Add CI workflow (build + verify on Node 16/18/20)
- Add publish workflow (npm publish on GitHub Release)
- Remove package-lock.json from version control (library best practice)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@Frostfire25 Frostfire25 force-pushed the alexandere-elguezabal/npm-library-packaging branch from eca91df to 4704e8e Compare March 18, 2026 01:17
@Frostfire25
Copy link
Contributor Author

@copilot open a new pull request to apply changes based on the comments in this thread

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants