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: Optionally load gatsby datastore in lambdas #376

Merged
merged 81 commits into from
May 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
0fab055
feat: optionally load Gatsby datastore into lambdas after deploy
ericapisani May 3, 2022
f346098
chore: add logging to determine code path
ericapisani May 3, 2022
a83bdcb
fix: dataMetadata.json file wasn't being included in function bundle
ericapisani May 4, 2022
4c24d04
fix: await promise returned from prepareFilesystem
ericapisani May 4, 2022
3c05f6d
fix: address 'handler is not a function' err
ericapisani May 4, 2022
ee57456
fix: move prepareFilesystem check within returned handler
ericapisani May 4, 2022
67cf703
chore: add logging
ericapisani May 4, 2022
0533728
fix: downloadUrl is incorrect
ericapisani May 4, 2022
519fc7d
fix: round 2 on the url
ericapisani May 4, 2022
ac14738
fix: only copy file that we're interested in for mvp
ericapisani May 4, 2022
f463794
fix: create directory to copy file into before streaming
ericapisani May 4, 2022
b52d296
fix: specify the full filepath
ericapisani May 4, 2022
05e83d7
style: lint fixes
ericapisani May 4, 2022
513bd90
feat: add pre-warm requests to lambda endpoints
ericapisani May 5, 2022
f9294f3
fix: use https instead of fetch for request
ericapisani May 5, 2022
4447e40
fix: mistake with the func path
ericapisani May 5, 2022
5e6d75b
test: not seeing prewarm behaviour, add logs
ericapisani May 5, 2022
045dba2
style: lint fixes
ericapisani May 5, 2022
d6ce34e
refactor: rename e2e test folder
ericapisani May 5, 2022
9351d19
test: update test command in package.json
ericapisani May 5, 2022
ad095d3
refactor: more organizing
ericapisani May 5, 2022
7a29511
test: add tests for downloadFile helper method
ericapisani May 6, 2022
102f65e
style: lint
ericapisani May 6, 2022
f1b2333
Merge branch 'main' into ep/optionally-load-gatsby-datastore-in-lambdas
ericapisani May 6, 2022
d57fe21
Merge branch 'main' into ep/optionally-load-gatsby-datastore-in-lambdas
ericapisani May 13, 2022
e5ffd9a
chore: add tsconfig.json
ericapisani May 13, 2022
952ebbc
chore: cleanup
ericapisani May 13, 2022
b4c4061
test: add createDatastoreMetadataFile test
ericapisani May 13, 2022
9246d01
chore(test): rename file
ericapisani May 13, 2022
a0116ec
test: add onSuccess test
ericapisani May 13, 2022
5d29717
chore: make changes flagged by linter
ericapisani May 13, 2022
54d9696
style: lint
ericapisani May 13, 2022
95834b5
fix: explicitly check env var is 'true'
ericapisani May 18, 2022
c9302ac
test: add coverage for onBuild method
ericapisani May 18, 2022
451f5b6
style: lint changes
ericapisani May 18, 2022
29ea4d8
style: lint fixes
ericapisani May 18, 2022
af180ce
refactor: revert reorg of test files
ericapisani May 18, 2022
4d6a8d5
refactor: remove README.md from .gitignore
ericapisani May 18, 2022
4a0154a
fix: check value in case it's set to 'false'
ericapisani May 18, 2022
38e1fae
test: add mutateConfig coverage
ericapisani May 19, 2022
957d76a
test: revert accidental change to jest config
ericapisani May 19, 2022
f4534d4
test: add test for prepareFilesystem
ericapisani May 19, 2022
a323bbe
feat: add timeout to pre-warm requests
ericapisani May 19, 2022
81519d3
style: lint
ericapisani May 19, 2022
8485275
Merge branch 'main' into ep/optionally-load-gatsby-datastore-in-lambdas
ericapisani May 20, 2022
6ad698b
test: update tests after merge
ericapisani May 20, 2022
cff56de
style: lint
ericapisani May 20, 2022
64dbdc8
ci: add gatsby to global install step
ericapisani May 20, 2022
d0db5c1
ci: forgot to add gatsby dependency to ubuntu tests
ericapisani May 20, 2022
2d8f992
test: remove gatsby install
ericapisani May 20, 2022
128789b
ci: revert change
ericapisani May 20, 2022
4c78d66
Apply suggestions from code review
ericapisani May 20, 2022
b27f96a
fix: address some code review comments
ericapisani May 20, 2022
12ba97d
Merge branch 'ep/optionally-load-gatsby-datastore-in-lambdas' of gith…
ericapisani May 20, 2022
f235ea0
fix: address some code review comments
ericapisani May 20, 2022
548981c
fix: address cr comments
ericapisani May 20, 2022
b5454ee
fix: don't generate unique id for datastore every build
ericapisani May 20, 2022
7ecdced
refactor: isEnvSet
ericapisani May 20, 2022
977dedd
ci: install demo/ deps
ericapisani May 20, 2022
8cafe74
ci: fix silly mistake
ericapisani May 20, 2022
25cffbd
test: increase timeout
ericapisani May 20, 2022
b01a7ed
test: use netlify-cli to build project
ericapisani May 20, 2022
5d58725
ci: add install command back in
ericapisani May 20, 2022
92348bd
fix: hard code env var check
ericapisani May 20, 2022
d8a8314
style: lint
ericapisani May 20, 2022
b997dcf
fix: address cr comments
ericapisani May 24, 2022
a1ef476
fix: regenerate package-lock to fix conflicts
ericapisani May 24, 2022
5de6617
fix: regenerate package-lock
ericapisani May 24, 2022
b3806ac
chore: update @netlify/build resolution
ericapisani May 24, 2022
15bdac6
chore: run npm update on plugin/
ericapisani May 24, 2022
913f346
Merge branch 'main' into ep/optionally-load-gatsby-datastore-in-lambdas
ericapisani May 24, 2022
75e8cc0
chore: check in working version of plugin lockfile
ericapisani May 24, 2022
11fba51
chore: lockfile
ericapisani May 24, 2022
aeb2b0d
chore: add lockfile back in
ericapisani May 24, 2022
5bba88b
chore: update lint rules
ericapisani May 24, 2022
e765637
chore: pin eslint-config-node
ericapisani May 24, 2022
b95fd27
test: add axios to invalidate the github test cache
ericapisani May 24, 2022
5862098
chore: increase node version
ericapisani May 24, 2022
e98ca3c
refactor: attempt to read metadata file first
ericapisani May 25, 2022
eeace8c
chore(deps): move execa to devDep in plugin
ericapisani May 25, 2022
4c26a82
style: lint
ericapisani May 25, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
const { overrides } = require('@netlify/eslint-config-node')

module.exports = {
extends: '@netlify/eslint-config-node',
extends: ['@netlify/eslint-config-node'],
rules: {
// For now
'func-style': 'off',
Expand Down Expand Up @@ -37,12 +37,26 @@ module.exports = {
'import/no-unresolved': 'off',
'node/no-unpublished-require': 'off',
'node/no-missing-require': 'off',
'node/no-missing-import': 'off',
'max-lines': 'off',
complexity: 'off',
'max-statements': 'off',
'node/prefer-global/process': 'off',
'unicorn/filename-case': 'off',
},
},
{
files: ['plugin/test/**/*'],
rules: {
'node/no-unpublished-import': 'off',
'max-lines': 'off',
'node/no-unpublished-require': 'off',
'node/no-missing-require': 'off',
'node/no-missing-import': 'off',
'@typescript-eslint/no-var-requires': 'off',
'node/global-require': 'off',
'node/prefer-global/process': 'off',
},
},
],
}
2 changes: 1 addition & 1 deletion demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,6 @@
},
"license": "MIT",
"engines": {
"node": ">=14.15.0"
"node": ">=14.17.0"
}
}
6 changes: 6 additions & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
/** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */
module.exports = {
preset: 'ts-jest',
verbose: true,
testMatch: ['<rootDir>/plugin/test/unit/**/*.spec.ts'],
}
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
base="demo/"

[build.environment]
NODE_VERSION = "12.13.0"
NODE_VERSION = "14.17.0"
Loading