You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* initial - cache restoration
* snapshot
* cache.restore() return comment
* redirect status
* note about named wildcard paths
* don't pass named wildcards to function manifest
* fix status code resolution for redirects
* scaffold initial gatsby-adapter-netlify package and use if for dev purposes (hardcoded for now)
* build adapter package as ESM and load it as such, so we can use ESM-only utils - like @netlify/cache-utils
* no require in esm world
* add redirect headers
* start scaffolding autoinstallation of adapters
* webpack assets + unmanaged assets (start)
* static queries, app-data.json, minor refactors and initial setup for having routes sorted by specificity
* move adapter version to 1.0.0
* generalize get-latest-apis for adapters
* handle JS files in get-latest-gatsby-files
* set peerDep
* use other testing pkg
* get installation, discovery, re-using working
* update versions
* move adapter init into its own file
* add version checking
* adjust comment
* move stuff around
* feat: add headers to gatsby-config
* misc stuff
* initial engine lambda
* start headers utils
* update deps
* rewrite util
* linting
* convert to obj args
* remove todo comment
* add requiredFiles to functions manifest
* make headers default to []
* move constants to own file
* export rankRoute
* delete unneeded util
* createHeadersMatcher initial impl
* use createHeadersMatcher
* fix types
* add http status code type
* improve createHeadersMatcher and add tests
* move adapterManager init to initialize func
* adjust func args to move reporter and allow adapter options
* add "adapter" option to gatsby-config
* put netlify adapter first in the list - it will only match when env var is set, so won't change default behavior of using testing one
* kebabcase function name as function id
* export FunctionDefinition type
* req.path -> req.url
* initial functions wrapping/bundling in gatsby-adapter-netlify
* remove netlify adapter from gatsby deps, add gatsby as devDep to adapter (to access types)
* fix bundling function files containing [ ]
* unify tsconfig for adapter
* add joi testing for adapter setting
* typescript: make bootstrap work again
* generate redirect/rewrite rules, generate 2 variants of ssr-engine (odb and regular)
* move routes manifest handling into its own module
* generate _headers rules
* add sorting to routesManifest
* adjust graphql-engine bundling to not leave unreasolvable imports
* ssr lambda handling when it executes in read-only dir (use tmpdir() then)
* inject functions matchPath into function bundle and generate req.params inside of it
* serve api from path prefixed path as well
* add path prefix stripping in function wrapper
* add cache store and restore in gatsby-adapter-netlify
* adjust internal 'lambda' name to 'function'
* format lambda-handler
* misc changes
* missing rename
* compile gatsby-adapter-netlify to cjs
* add generator field
* use netlify adpter when NETLIFY or NETLIFY_LOCAL env var is defined
* use headers from config for ssg/dsg
* allow specyfing different lmdb binary than current process, use abi83 if adapters are used (it works on node14, 16 and 18)
* get-route-path tests
* manager refactoring + typo fix
* initialize adapters e2e test
* cypress: remove viewPort configs
* use next preid for netlify adapter
* remove test adapter from adapters manifest
* don't log errors when testing for user installed adapters
* update adapters manifest
* cleanup gatsby-adapter-netlify a bit, add more public adapter related types to gatsby
* e2e: update gitignore
* resolve lmdb binary from lmdb package and not hardcode the forced path
* gatsby-plugin-image add downlevelIteration
* fix persisted redux keys
* update snapshot and mocks
* fix: only run adapters during gatsby build
* resolve netlify functions runtime deps from adapter context
* improve public typings
* adding adapter to e2e test so that dev-cli copies stuff over
* update babel-preset-gatsby-package dep
* e2e: test functions and assets
* e2e: client-only WIP
* e2e: improve basics
* e2e: improve client-only
* e2e: redirects
* merge _headers and _redirects instead of overwriting it
* apply trailing slash option + pass through trailingSlash & pathPrefix
* add unit tests for manager
* improve manager tests
* update types
* improve e2e tests
* add excludeDatastoreFromEngineFunction flow
* normalize path after globbing
* mock shouldBundleDatastore
* rename adapter config types to be less confusing with gatsby-config
* keep same obfuscated path between builds
* normalize more paths
* support custom 404/500 page for serverless functions
* update snapshot
* generate relative imports in function
* skip trying to copy data to tmp if we are downloading from cdn
* improve TS types
* mock uuid
* put requiredFiles in correct place heh
* typo
* snapshot
* handle GATSBY_EXCLUDE_DATASTORE_FROM_BUNDLE env var
* improve README & update types
* code block
* handle partytown routes
* handle slices (html and slice-data)
* handle chunk-map and webpack.stats
* feat: add name to functionsManifest & displayName to Netlify
* update snapshot
* rename headers constants
* handle image-cdn and file-cdn
* update routesManifest test fixture and snapshot
* don't log unmanaged static assets anymore
* handle some TODOs
* add 'adapters' to feature list
* tmp: make peer dependency allow to use with canaries
* feat: add 'supports' to config to let adapters provide some capabilities and potentially fail builds with clear explanation instead of producing faulty deploy
* adjust some text
* apply trailingSlash to tests and other stuff, add utils
* readme and package.json update
* fix ts versions
* enable typecheck for adapters.js
* don't try to use install adapter if no version matches, install version specified in adapters.js
* allow adapter to disable prior deployment plugins
* disable gatsby-plugin-netlify when using gatsby-adapter-netlify
* fix ts
* handle non-alpha-numerc paths
* verbose log adapter package that is being installed
* only try to restore cache if payload provided
* memoize cache utils
* log adapter version
* handle body parsing in produced api functions
* properly handle cases when body parsing already happened and when there is no function handler export
* handle body parsing config in generated function
* drop unused
* remove redirects created by previous deployment plugins
* properly handle default body for status responses in api functions
* put some dev logs as verbose to limit regular terminal output
* put some dev logs as verbose to limit regular terminal output vol2
* maybe deflake function tests
* maybe precompile api functions in develop function tests
---------
Co-authored-by: Michal Piechowiak <[email protected]>
- To run individual tests, use `npm run test:%NAME` where `test:%NAME` is the script, e.g. `npm run test:netlify`
14
+
15
+
If you want to open Cypress locally as a UI, you can run the `:debug` scripts. For example, `npm run test:netlify:debug` to test the Netlify Adapter with Cypress open.
16
+
17
+
### Adding a new adapter
18
+
19
+
- Add a new Cypress config inside `cypress/configs`
20
+
- Add a new `test:` script that should run `start-server-and-test`. You can check what e.g. `test:netlify` is doing.
21
+
- Run the Cypress test suites that should work. If you want to exclude a spec, you can use Cypress' [excludeSpecPattern](https://docs.cypress.io/guides/references/configuration#excludeSpecPattern)
22
+
23
+
## External adapters
24
+
25
+
As mentioned in [Creating an Adapter](https://gatsbyjs.com/docs/how-to/previews-deploys-hosting/creating-an-adapter/#testing) you can use this test suite for your own adapter.
26
+
27
+
Copy the whole `adapters` folder, and follow [adding a new adapter](#adding-a-new-adapter).
0 commit comments