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

chore: migrate more to ESM #5298

Merged
merged 12 commits into from
Dec 13, 2022
Merged

chore: migrate more to ESM #5298

merged 12 commits into from
Dec 13, 2022

Conversation

danez
Copy link
Contributor

@danez danez commented Dec 6, 2022

We are getting close

I know this is huge, but it will soon be done.

@github-actions
Copy link

github-actions bot commented Dec 6, 2022

📊 Benchmark results

Comparing with e65f97c

Package size: 254 MB

(no change)

^                                          254 MB  254 MB  254 MB  254 MB  254 MB  254 MB  254 MB  254 MB 
│  247 MB  247 MB  247 MB  247 MB  247 MB   ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐  
│   ┌──┐    ┌──┐    ┌──┐    ┌──┐    ┌──┐    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
│   |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |  |    |▒▒|  
└───┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴────┴──┴──>
    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

@danez danez force-pushed the esm4 branch 2 times, most recently from 0ae4a17 to 220bd13 Compare December 6, 2022 20:35
@danez danez self-assigned this Dec 7, 2022
@@ -357,7 +357,6 @@
"serialize-javascript": "^6.0.0",
"sinon": "^14.0.0",
"strip-ansi": "^6.0.0",
"supertest": "^6.1.6",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

was only used in one test, instead I now used simply got to do the query.

})

t.is(ntlFunction.url, functionUrl)
})
Copy link
Contributor Author

Choose a reason for hiding this comment

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

moved to a unit test

@danez danez marked this pull request as ready for review December 7, 2022 21:50
@danez danez requested a review from a team December 7, 2022 21:50
@danez danez requested a review from a team as a code owner December 9, 2022 14:30
}
}
}
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed retry logic as it was only introduced to fix tests. If this is still a problem, we need to mock this file.
We probably should mock this anyway, as tests should not write global config file.

}

// Memoise config result so that we only load it once
module.exports = memoizeOne(getGlobalConfig)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

memoizeOne removed as it was completely unneccessary. We never call getGlobalConfig() with any arguments so it would anyway only cache it once.

@@ -305,7 +303,6 @@
"netlify-redirector": "^0.3.1",
"node-fetch": "^2.6.0",
"node-version-alias": "^1.0.1",
"omit.js": "^2.0.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Used destructuring instead of omit.js

-x = omit(config.build, ['publish', 'publishOrigin']) }
+// eslint-disable-next-line no-unused-vars
+const { publish, publishOrigin, ...x } = config.build

@danez danez mentioned this pull request Dec 12, 2022
1 task
@danez danez added the automerge Add to Kodiak auto merge queue label Dec 13, 2022
@kodiakhq kodiakhq bot merged commit 35123df into main Dec 13, 2022
@kodiakhq kodiakhq bot deleted the esm4 branch December 13, 2022 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge Add to Kodiak auto merge queue
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants