Skip to content
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

feat(externals): improved output package.json #1607

Merged
merged 2 commits into from
Aug 20, 2023
Merged

Conversation

pi0
Copy link
Member

@pi0 pi0 commented Aug 20, 2023

πŸ”— Linked issue

resolves #1598

related to #1367

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

This PR improves the contents of generated .output/server/package.json with using dependencies field for written packages information and also a generated name/version based on user's package.json and added type: "module" field as is our assumption. Also adds aliased packages as dependencies.

Example: (with disabled experimental.bundleRuntimeDependencies flag)

{
  "name": "nitropack-prod",
  "version": "2.5.2",
  "type": "module",
  "private": true,
  "dependencies": {
    "cookie-es": "1.0.0",
    "defu": "6.1.2",
    "destr": "2.0.1",
    "h3-nightly": "1.8.1-1692089733.8af0474",
    "hookable": "5.5.3",
    "iron-webcrypto": "0.8.0",
    "klona": "2.0.6",
    "node-fetch-native": "1.2.0",
    "ofetch": "1.1.1",
    "ohash": "1.1.3",
    "pathe": "1.1.1",
    "radix3": "1.0.1",
    "scule": "1.0.0",
    "ufo": "1.2.0",
    "uncrypto": "0.1.3",
    "unctx": "2.3.1",
    "unenv": "1.7.1",
    "unstorage": "1.9.0"
  }
}

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Merging #1607 (efc0492) into main (bc9644e) will decrease coverage by 0.02%.
The diff coverage is 100.00%.

❗ Current head efc0492 differs from pull request most recent head c6e9bea. Consider uploading reports for the commit c6e9bea to get more accurate results

@@            Coverage Diff             @@
##             main    #1607      +/-   ##
==========================================
- Coverage   76.26%   76.24%   -0.02%     
==========================================
  Files          76       76              
  Lines        7802     7797       -5     
  Branches      779      783       +4     
==========================================
- Hits         5950     5945       -5     
  Misses       1850     1850              
  Partials        2        2              
Files Changed Coverage Ξ”
src/rollup/plugins/externals.ts 93.08% <100.00%> (-0.07%) ⬇️

@pi0 pi0 merged commit 1d651e5 into main Aug 20, 2023
6 checks passed
@pi0 pi0 deleted the feat/improve-gen-pkg branch August 20, 2023 21:17
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.

Use version from root/workspace for .output/package.json
1 participant