Skip to content

Conversation

@sam-mfb
Copy link
Owner

@sam-mfb sam-mfb commented May 2, 2025

Workflow Automation:

  • Added .github/workflows/npm-publish.yml to automate publishing to npm upon creating a new release. This workflow includes steps for building, testing, and publishing the package using pnpm.
  • Added .github/workflows/test.yml to run tests on push and pull_request events for the main branch. It uses a matrix strategy to test against Node.js versions 18.x and 20.x.

Documentation Enhancements:

  • Updated README.md to include detailed installation instructions for global usage via npm or pnpm, and clarified usage instructions for both host and container environments. [1] [2]
  • Added a new "Development" section in README.md explaining the publishing process to npm using GitHub Actions.

Package Configuration:

  • Updated package.json to include bin entries for global commands (gcf-server and gcf-client), added keywords, and improved metadata (e.g., repository URL, bugs URL).
  • Introduced a prepublishOnly script in package.json to ensure the package is built, linted, and tested before publishing.

Dependency Updates:

  • Updated development dependencies (@types/jest, @types/node, prettier, typescript, etc.) in pnpm-lock.yaml to their latest versions for improved compatibility and performance. [1] [2] [3]
  • Removed outdated or unused dependencies from pnpm-lock.yaml to reduce clutter and ensure a clean dependency tree. [1] [2]

Build Improvements:

  • Added add-shebang.js to prepend a shebang (#!/usr/bin/env node) to the built scripts and make them executable for global npm installations.
  • Updated the build script in package.json to include the add-shebang.js step after building with Webpack.

@sam-mfb sam-mfb requested a review from Copilot May 2, 2025 12:33
@sam-mfb sam-mfb linked an issue May 2, 2025 that may be closed by this pull request
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 automates the release process by adding GitHub Actions workflows for testing and publishing to npm, while also improving documentation and build scripts.

  • Introduces workflows for testing (test.yml) and npm publishing (npm-publish.yml) to streamline CI/CD.
  • Enhances the README with clear instructions for both global installations and manual downloads.
  • Adds a shebang-prepended script (add-shebang.js) to ensure built scripts are executable for global npm usage.

Reviewed Changes

Copilot reviewed 7 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/server/index.ts Updates the git credential helper command to use a global binary.
add-shebang.js Implements shebang injection and adjusts file permissions in build.
README.md Improves installation instructions and updates helper command usage.
.github/workflows/test.yml Adds a testing workflow to run on push/pull_request events on main.
.github/workflows/npm-publish.yml Introduces a workflow for publishing releases to npm using pnpm.
Files not reviewed (2)
  • package.json: Language not supported
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (2)

README.md:72

  • [nitpick] Consider providing a more explicit path or guidance for '/path/to/gcf-client.js' to help users correctly configure the credential helper when not using global installation.
helper = "!f() { /path/to/gcf-client.js $*; }; f"

src/server/index.ts:113

  • Ensure that 'gcf-client' is available in the system PATH or otherwise accessible, as replacing the direct node call may lead to runtime issues if the binary is not correctly installed.
configOutput(`     helper = "!f() { gcf-client $*; }; f"\n`)

@sam-mfb sam-mfb merged commit e48fe85 into main May 2, 2025
2 checks passed
@sam-mfb sam-mfb deleted the release_1.2 branch May 2, 2025 12:44
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.

New release with dep updates

2 participants