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

Move Node.js package.json to platform/node #2343

Merged
merged 17 commits into from
Jul 10, 2024

Conversation

louwers
Copy link
Collaborator

@louwers louwers commented Apr 29, 2024

I want to split the package.json for the Node.js package and the package.json used to define the dependencies for the various scripts used. Will probably fail.

@acalcutt What do you think about this?

I probably need to update a few other paths.

Closes #1334

@louwers louwers added the node label Apr 29, 2024
@louwers louwers requested a review from acalcutt April 29, 2024 20:11
Copy link

github-actions bot commented Apr 29, 2024

Bloaty Results (iOS) 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results-ios/pr-2343-compared-to-main.txt

Copy link

github-actions bot commented Apr 29, 2024

Bloaty Results 🐋

Compared to main

    FILE SIZE        VM SIZE    
 --------------  -------------- 
  [ = ]       0  [ = ]       0    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2343-compared-to-main.txt

Compared to d387090 (legacy)

    FILE SIZE        VM SIZE    
 --------------  -------------- 
   +21% +24.7Mi  +411% +24.6Mi    TOTAL

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/bloaty-results/pr-2343-compared-to-legacy.txt

Copy link

github-actions bot commented Apr 29, 2024

Benchmark Results ⚡

Benchmark                                                     Time             CPU      Time Old      Time New       CPU Old       CPU New
------------------------------------------------------------------------------------------------------------------------------------------
OVERALL_GEOMEAN                                            +0.0069         +0.0067             0             0             0             0

Full report: https://maplibre-native.s3.eu-central-1.amazonaws.com/benchmark-results/pr-2343-compared-to-main.txt

@louwers louwers marked this pull request as ready for review April 29, 2024 22:32
platform/node/index.js Outdated Show resolved Hide resolved
@acalcutt
Copy link
Collaborator

acalcutt commented May 1, 2024

I added some changes to merge into this in your repo
louwers#12

This fixes the node-release workflow so it will work with these changes

@louwers
Copy link
Collaborator Author

louwers commented May 2, 2024

@acalcutt Awesome!

Copy link
Collaborator

@acalcutt acalcutt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seemed to work fine to me in my test fork. I would have to cherry pick this into the opengl-2 to keep it in line with this.

One thing to note is I think this makes it harder to make a package that can build on it's own, like my attempt in #535 . From my testing there though, this package is kind of heavy to build on the fly anyway so I'm not sure that is a good approach.

For package.json, I wonder if the dev dependencies can be trimmed down any... I doubt all those are used by the package.

@acalcutt
Copy link
Collaborator

acalcutt commented May 2, 2024

One thing I just noticed is how does the ci pass if there is no new package-lock.json?

Edit: Oh I see, the

      - name: npm ci
        run: npm ci --ignore-scripts

is actually part of the maplibre-native build, so it is not in the node directory.

@acalcutt
Copy link
Collaborator

acalcutt commented May 2, 2024

The only other thing I see is maybe there should be a package-lock.json in 'platform/node'. I had that in my directory when testing the release. I think it is needed because the publish step does a 'npm ci --ignore-scripts', which would check that file.

@birkskyum
Copy link
Member

Great idea. Alternatively to a package lock inside the node, we could add a pnpm-workspace.yml and use pnpm in ci as well

@louwers louwers enabled auto-merge (squash) July 10, 2024 12:30
@louwers louwers merged commit 41ff7c3 into maplibre:main Jul 10, 2024
23 checks passed
acalcutt added a commit that referenced this pull request Jul 12, 2024
Co-authored-by: Andrew Calcutt <acalcutt@techidiots.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Separate package.json for script dependencies
3 participants