Skip to content

Revamp the project - #542

Merged
sergioramos merged 20 commits into
masterfrom
revamp
Jul 12, 2025
Merged

Revamp the project#542
sergioramos merged 20 commits into
masterfrom
revamp

Conversation

@sergioramos

@sergioramos sergioramos commented Jul 9, 2025

Copy link
Copy Markdown
Owner
  • update serverless ^2 to osls ^3:
    • fix internal API imports for osls v3 compatibility (zip-service, package-service)
    • update all test fixtures to use frameworkVersion: '3'
    • remove deprecated serverless-plugin-ncc support and related dependencies
    • clean up benchmark logic to compare only tree-shake vs default
  • migrate from eslint + prettier to biome
    • add default biome.json configuration
    • update lint-staged to use biome commands
    • upgrade to husky^9
    • remove .eslintignore and .prettierignore files
    • update GitHub Actions workflow to use biome
  • ci: upgrade all GitHub Actions to latest versions
    • actions/checkout@v3@v4
    • actions/setup-node@v3.2.0@v4
    • remove actions/cache@v3.0.2 (replaced by native caching)
    • wagoid/commitlint-github-action@v4.1.12@v6
    • biomejs/setup-biome@v2.5.0@v2
    • rlespinasse/github-slug-action@4.2.4@v5
    • ridedott/release-me-action@v3.6.39@v3
    • JS-DevTools/npm-publish@v1@v3
  • upgrade @commitlint/* to ^19
  • upgrade @vercel/nft to ^0.29
  • upgrade to typescript^5
  • upgrade to archiver^7
  • migrate project from CommonJS to ES modules

credits to @atkhalsa who already did some of this on #423

fixes #403

@sergioramos sergioramos changed the title Upgrade to osls (serverless v3 fork) and remove NCC support Revamp the project Jul 9, 2025
- update serverless `^2` to osls `^3`
- fix internal API imports for osls v3 compatibility (`zip-service`, `package-service`)
- update all test fixtures to use `frameworkVersion: '3'`
- remove deprecated serverless-plugin-ncc support and related dependencies
- clean up benchmark logic to compare only `tree-shake` vs default
@sergioramos
sergioramos force-pushed the revamp branch 3 times, most recently from 2f5ae3c to a32f134 Compare July 9, 2025 22:50
- add default `biome.json` configuration
- update `lint-staged` to use `biome` commands
- upgrade to `husky^9`
- remove `.eslintignore` and `.prettierignore` files
- update GitHub Actions workflow to use `biome`
- `actions/checkout@v3` → `@v4`
- `actions/setup-node@v3.2.0` → `@v4`
- remove `actions/cache@v3.0.2` (replaced by native caching)
- `wagoid/commitlint-github-action@v4.1.12` → `@v6`
- `biomejs/setup-biome@v2.5.0` → `@v2`
- `rlespinasse/github-slug-action@4.2.4` → `@v5`
- `ridedott/release-me-action@v3.6.39` → `@v3`
- `JS-DevTools/npm-publish@v1` → `@v3`
Converts the entire codebase from CommonJS to ES modules for modern Node.js compatibility.

Core changes:
- Add `"type": "module"` and `"exports"` field to package.json
- Convert all `require()` statements to `import`/`export` syntax
- Replace `__dirname`/`__filename` with `import.meta` equivalents
- Implement hybrid module system for serverless framework compatibility

Technical implementation:
- Use `createRequire()` for problematic CommonJS dependencies (`apr-*`, `@vercel/nft`)
- Maintain runtime detection for optional dependencies (`typescript`, `@yarnpkg/pnpify`)
- Replace deprecated `fs.exists` with custom async implementation
- Update all test fixtures to ES modules while keeping serverless.js as CommonJS
- Fix identifier collisions and import path resolution issues
- replace `ava` with native Node.js `node --test`
- use native snapshot testing with `t.assert.snapshot()`
- remove custom snapshot logic and files
- replace deprecated `fs.rmdir` with `fs.rm`
@sergioramos
sergioramos merged commit d3551ff into master Jul 12, 2025
@sergioramos
sergioramos deleted the revamp branch July 12, 2025 02:03
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.

Serveless 3 doesn't work with this plugin

1 participant