Skip to content
This repository has been archived by the owner on May 22, 2024. It is now read-only.

feat: add NFT bundler #713

Merged
merged 11 commits into from
Oct 13, 2021
Merged

feat: add NFT bundler #713

merged 11 commits into from
Oct 13, 2021

Conversation

eduardoboucas
Copy link
Member

- Summary

Adds Node File Tracer as a bundler option.

This is an initial implementation with some features still missing, such as support for TypeScript and ES Modules.

- Test plan

Added a new variation to the test matrix.

- A picture of a cute animal (not mandatory but encouraged)

cute-cryptokitty-666x400-c-center

@eduardoboucas eduardoboucas added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Oct 8, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Oct 8, 2021

⏱ Benchmark results

Comparing with 413e5dc

largeDepsEsbuild: 12.2s

⬇️ 11.63% decrease vs. 413e5dc

^                          14.6s                                                                          
│                           ┌──┐                                                                          
│          13.1s            |  |           12.9s                                                          
│           ┌──┐            |  |   12.8s    ┌──┐           12.5s   12.8s                   12.6s   12.2s  
│ ──────────┼──┼────────────┼──┼────┌──┐────┼──┼───11.6s────┌──┐────┌──┐───11.7s────────────┌──┐────┌──┐──
│  10.9s    |  |            |  |    |  |    |  |    ┌──┐    |  |    |  |    ┌──┐   11.1s    |  |    |▒▒|  
│   ┌──┐    |  |   10.4s    |  |    |  |    |  |    |  |    |  |    |  |    |  |    ┌──┐    |  |    |▒▒|  
│   |  |    |  |    ┌──┐    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-12    T-11    T-10    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

largeDepsZisi: 1m 6s

⬇️ 10.34% decrease vs. 413e5dc

^                         1m 22.8s                                                                        
│                           ┌──┐                                                                          
│                           |  |                                                                          
│         1m 11.5s          |  |  1m 10.7s1m 10.2s                                                        
│           ┌──┐            |  |    ┌──┐    ┌──┐          1m 4.9s 1m 7.5s                 1m 7.7s  1m 6s  
│ ──────────┼──┼────────────┼──┼────┼──┼────┼──┼────────────┌──┐────┌──┐────────────────────┌──┐────┌──┐──
│  58.2s    |  |   55.9s    |  |    |  |    |  |   57.8s    |  |    |  |   59.5s    59s     |  |    |▒▒|  
│   ┌──┐    |  |    ┌──┐    |  |    |  |    |  |    ┌──┐    |  |    |  |    ┌──┐    ┌──┐    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    T-12    T-11    T-10    T-9     T-8     T-7     T-6     T-5     T-4     T-3     T-2     T-1      T    
Legend

@@ -7,20 +7,32 @@ const { platform } = require('process')
* @returns {(name: string, matrix: M[], runner: (opts: O, t: import("ava").ExecutionContext) => any) => void}
*/
const makeTestMany = (test, matrix) => {
const filteredVariations = env.ZISI_FILTER_VARIATIONS ? env.ZISI_FILTER_VARIATIONS.split(',') : []
Copy link
Member Author

Choose a reason for hiding this comment

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

This is a convenience method for running only the variations specified in the ZISI_FILTER_VARIATIONS environment variable, if found.

const testTitle = `${title} [${name}]`

if (name.startsWith('todo:')) {
testFunction.todo(testTitle)
Copy link
Member Author

Choose a reason for hiding this comment

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

This allows us to flag a variation as needing to be implemented. For example:

testMany('some test', ['bundler_default', 'todo:bundler_esbuild'], () => {})

# Increasing the maximum number of open files. See:
# https://github.com/actions/virtual-environments/issues/268
- name: Increase open file limit
run: sudo ulimit -Sn 65536
Copy link

Choose a reason for hiding this comment

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

i think this might need to have the shell specified sudo /bin/bash -c "ulimit -l 65536". it will only work if processes are started from same shell, which i think they will be cos it's inside the same job

@eduardoboucas
Copy link
Member Author

The CI workflow on Windows hasn't completed because of https://www.githubstatus.com/incidents/81lpnf07bm1q. I ran it in a VM and it passed, so I'm force-merging this.

@eduardoboucas eduardoboucas merged commit 8e09e87 into main Oct 13, 2021
@eduardoboucas eduardoboucas deleted the feat/nft-bundler branch October 13, 2021 10:01
Skn0tt pushed a commit to netlify/build that referenced this pull request May 21, 2024
* feat: add NFT bundler

* chore: add benchmark for NFT

* chore: fix usage of `basePath` in tests

* refactor: add `basePath` to `listFunctionsFiles`

* chore: add `repositoryRoot` test

* chore: remove docs for `repositoryRoot`

This property will likely get deprecated in a future version

* feat: use `repositoryRoot` in NFT

* refactor: use `repositoryRoot` in `getSrcFiles`

* chore: increase maximum number of open files

* chore: increase open file limit in MacOS
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants