Skip to content

Replace various old packages#162

Merged
GrahamCampbell merged 8 commits intomainfrom
replace-old-packages
Apr 23, 2026
Merged

Replace various old packages#162
GrahamCampbell merged 8 commits intomainfrom
replace-old-packages

Conversation

@GrahamCampbell
Copy link
Copy Markdown
Contributor

No description provided.

Copy link
Copy Markdown

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 modernizes the codebase by replacing several legacy third-party utilities (UUID generation, prompting, globbing, HTTP downloading, YAML AST parsing, and request queueing) with Node.js built-ins and lighter-weight dependencies, with accompanying unit/integration test updates to lock in behavior.

Changes:

  • Replace uuid usages with node:crypto’s randomUUID across runtime, config, and tests.
  • Replace globby with an internal lib/utils/glob wrapper backed by fast-glob, and add tests for negation patterns.
  • Replace got-based downloader with a fetch + undici implementation including redirect/auth handling, plus new unit tests.
  • Replace inquirer wrapper with a local readline/promises confirm prompt facade and expand unit tests.
  • Replace yaml-ast-parser usage with a js-yaml-based branch editing approach and add regression tests around quoted keys/sibling preservation.
  • Replace promise-queue with ext/promise/limit for AWS request concurrency limiting (with a new unit test).

Reviewed changes

Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
package.json Swaps/removes dependencies (adds fast-glob, removes uuid, globby, got, yaml-ast-parser, etc.)
lib/utils/glob.js New internal glob implementation replacing globby
lib/utils/serverless-utils/download.js Re-implements download logic using fetch + undici, adds redirect/auth allowlist support
lib/utils/serverless-utils/inquirer/index.js Replaces inquirer with a readline-based confirm prompt facade
lib/utils/yaml-ast-parser.js Replaces AST-based editing with js-yaml parsing + top-level branch replacement
lib/aws/request.js Replaces promise-queue with ext/promise/limit for concurrency limiting
lib/utils/download-template-from-repo.js Passes GitHub redirect allowlist to downloader
lib/plugins/package/lib/zip-service.js Switches globbing dependency to internal glob wrapper
lib/plugins/package/lib/package-service.js Switches globbing dependency to internal glob wrapper
lib/plugins/aws/deploy/lib/check-for-changes.js Switches globbing dependency to internal glob wrapper
lib/plugins/aws/invoke-local/index.js Replaces UUID usage with randomUUID
lib/utils/serverless-utils/config.js Replaces frameworkId generation with randomUUID
scripts/serverless.js Replaces invocationId generation with randomUUID
test/unit/lib/utils/glob.test.js Adds coverage for leading negation patterns (async + sync)
test/unit/lib/utils/serverless-utils/download.test.js Adds redirect+auth preservation test using allowlisted hostname
test/unit/lib/utils/serverless-utils/inquirer.test.js Adds confirm prompt behavior tests (defaults + re-prompt)
test/unit/lib/utils/yaml-ast-parser.test.js Adds regression tests for quoted keys and sibling preservation
test/unit/lib/utils/serverless-utils/config.test.js Adds test to ensure existing frameworkId is preserved
test/unit/lib/utils/download-template-from-repo.test.js Ensures allowlist is passed through to downloader
test/unit/lib/aws/request.test.js Adds test asserting max 2 concurrent AWS requests
test/unit/lib/plugins/create/create.test.js Updates test to stub globalThis.fetch instead of got
test/unit/lib/plugins/package/lib/zip-service.test.js Updates test to use internal glob wrapper
test/unit/lib/plugins/aws/deploy/lib/check-for-changes.test.js Updates test to use internal glob wrapper
test/unit/lib/plugins/aws/custom-resources/generate-zip.test.js Updates test to use internal glob wrapper
test/unit/commands/plugin-install.test.js Adds quoted plugins array update regression test
test/unit/commands/plugin-uninstall.test.js Adds regressions around removing last plugin entry and quoted keys
test/integration/aws/custom-deployment-bucket.test.js Replaces UUID usage with randomUUID

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

Comment thread lib/utils/glob.js Outdated
Comment thread lib/utils/serverless-utils/download.js Outdated
@GrahamCampbell GrahamCampbell marked this pull request as ready for review April 23, 2026 00:27
@GrahamCampbell GrahamCampbell merged commit 6da7092 into main Apr 23, 2026
3 checks passed
@GrahamCampbell GrahamCampbell deleted the replace-old-packages branch April 23, 2026 00:34
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.

2 participants