godaddy / gasket Goto Github PK
View Code? Open in Web Editor NEWFramework Maker for JavaScript Applications
Home Page: https://gasket.dev
License: MIT License
Framework Maker for JavaScript Applications
Home Page: https://gasket.dev
License: MIT License
Based on our latest testing, it seems like getInitialProps is more suitable for server-side rendering to load locale files than GSSP is. GSSP is called for client-routing too, which is unnecessary since locale files should only be fetched once. Let's bring back getInitialProps as an option, possibly again as part of the HOC.
Package(s): @gasket/intl
Branch: canary
A common issue we encounter with Gasket apps has to do with controlling which middlewares run when. For example, an app with mixed API and UI routes may receive undesired calls to Hydra for API-based requests, or requests for static resources may unexpectedly incur calls to Hivemind. The tools our developers have for avoiding these are rudimentary; we have a single RegExp which can be used to skip all plugin-injected middlewares for some URL patterns, but there's no granularity beyond that.
If we have the ability to classify requests and assign middlewares only to certain categories, this would give us more control over which middlewares run for which requests. For example, we would only want to run the UXP middlewares for UI routes, the Auth middlewares for UI and API routes but neither of them for proxied requests. We could call these categories "stacks." Our first step would be to identify a set of stacks that would indicate which types of processing will be required to fulfill the request. A given request may be assigned multiple stacks. This list of possibilities may look something like this:
authorized
ui
api
asset
proxy
stacks
lifecycleThe https plugin could now inject a handler in front of the handling provided by @gasket/plugin-express
or @gasket/plugin-fastify
. This handler would invoke gasket.execWaterfall('stacks', new Set(), { req, res })
; Anything hooking stacks
could add to or remove from that Set
of strings. Once stacks
finishes running, the resulting Set
would identify which middlewares should be applied. This could now be attached to the request or response objects, like maybe res.locals.stacks
.
Although end-users could create their own lifecycle hook for stacks
to customize default behaviors we could consider also allowing customization via gasket.config.js
.
Inside of the middleware
lifecycle we could now allow each returned middleware to be tagged with the stacks that it should be applied to.
One way this could work is to allow a [Middleware, string[]]
tuple to be used in any place where a middleware function is allowed, where that array of strings indicates the applicable stacks. An empty Array would be a special case indicating that it applies to all requests, and for the sake of backwards compatibility anything not specifying stacks would also be applied to all requests. Tuples would be compact but may not be intuitively obvious in meaning, so another option is to allow an object, which would also open us up for future extensibility, something like { handler: MiddlewareFn, stacks: string[] }
Plugins implementing the middleware like @gasket/plugin-express
could now wrap middlewares indicating stacks in a higher-order middleware to suppress them if a set of stacks is not present:
function runForStacks(stacks: Array<string>, handler: Handler): Handler {
return (req, res, next) =>
!res.locals.stacks?.size || stacks.some(category => res.locals.stacks.has(category))
? handler(req, res, next)
: next();
}
}
running npx gasket local
fails to run http/https servers. This is due to it attempting to run on port 80 which is a privileged port.
npm i -g @gasket/cli
gasket create *app-name* --presets @gasket/nextjs
npx gasket local
expects to work out of the box on a basic setup/install with out needing to modify http/https
Manjaro Linux (Arch based OS) local environment
We should have opt-in support for serving static locale files with server layer (express, fastify)? It maybe we helpful for existing apps to migrate to using the public dir with NextJS.
This option could be called serveStatic
. If it is true in the config, set the endpoint to the defaultPath
. We might also want allow the option to be set to a string and use that as the static endpoint. (i.e. serveStatic: '/locales'
). This would be helpful if an app's default locale happens to differ from the static path.
Package(s): @gasket/plugin-intl
The gasket.logger
can be useful to add logging to requests and middleware but currently requires developers to do extra work to make it available to these areas of their apps. We should provide a common way to access the configured Gasket Logger by attaching it to res.locals.gasketLogger
automatically by @gasket/plugin-log.
Package(s): @gasket/plugin-log
AC:
Currently, we use LocaleRequired in our component, HOC, and hook to load translated/localized files. The current name can yield a bit of confusion, since you are not loading a locale, but rather a localized message file. Technically, locale is required, which determines which version of the translated file to load, but the purpose of the components is to specify which translated file.
So, instead of withLocaleRequired
, should we change these to be withTranslation
, or withLocalizedFile
, or withLocaleMessages
?
Package(s): @gasket/react-intl
The out of date marked
dependency is in gasket-plugin-docsify
which depends on [email protected]
. This version is the latest available today. The module is actively worked on, so lets update to 5.x
as soon as its available.
➜ gasket-plugin-docsify git:(master) ✗ npm ls marked
@gasket/[email protected] /path/to/gasket/packages/gasket-plugin-docsify
└─┬ [email protected]
└── [email protected]
As a bit of cleanup, and incase teams/apps ever want to use it, we should rename the useGasketIntl
React hook to follow our component names as useLocaleRequired
and export it from the package. The locale statuses should also be static properties that apps and compare the hook results against.
Package(s): @gasket/react-intl
useLocaleRequired
Package(s): @gasket/*
Consolidate and remove .gitignore
files under packages where possible.
Also, let's switch to setting includes in the package.json files
property, vs setting excludes via .npmignore
files.
Package(s): @gasket/*
.gitignore
files under packages/*
.npmignore
filesfiles
propertyNext 10 has been released. We should make it the default for new Gasket apps under v6, and make sure our packages are updated to support it.
https://nextjs.org/blog/next-10
Package(s): @gasket/plugin-nextjs, @gasket/react-intl
Review our existing code and write up tickets for todos and deprecation that would be valuable to get in for the next major release.
Rename @gasket/intl to @gasket/react-intl in order to clarify the intended purpose of this package and to differentiate from future locale loader packages for frameworks other than React.
Package(s): @gasket/intl, @gasket/plugin-intl
We need to drop Enzyme from our scaffolded tests. Enzyme has not been kept up for React 17 and the recommended library is now React Testing Library.
Packages: @gasket/plugin-mocha, @gasket/plugin-jest
AC:
For some teams, it is preferable to store app app code under a /src
directory.
Currently, special directories need to be at the root of the repo. We should tune
this up to also allowing placing these under the /src
.
Package(s): @gasket/cli, @gasket/plugin-lifecycle, *
/src
directoryWe need to removing name convention fallback code to avoid unwanted tech debt.
Package(s): @gasket/resolve, @gasket/engine, @gasket/cli
There is a lot of inline documentation in the Gasket CLI code, specifically for on create context, that should be more easily readable. Let's render these jsdocs to markdown as we do in other packages.
Package(s): @gasket/cli
We should be creating new apps against Webpack 5. Also, tune any of our existing plugins (namely, UXP plugin) to work with this as well in their next major version branch.
Package(s): @gasket/plugin-webpack, @godaddy/gasket-plugin-uxp
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates are currently rate-limited. Click on a checkbox below to force their creation now.
@docusaurus/core
, @docusaurus/preset-classic
)These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.
eslint-config-next
, next
).github/workflows/ci.yml
actions/checkout v3
actions/setup-node v3
package.json
docsify-cli ^4.4.2
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jsdom ^20.0.0
lerna ^6.0.3
nx ^15.0.13
rimraf ^3.0.2
npm >=8.0.0
packages/create-gasket-app/package.json
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-assets/package.json
@babel/core ^7.16.10
@babel/node ^7.12.10
@babel/preset-env ^7.12.10
@babel/preset-react ^7.12.10
@svgr/core ^6.2.0
babel-plugin-add-module-exports ^1.0.2
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
mkdirp ^1.0.4
react ^18.0.0
recursive-readdir ^2.2.2
rimraf ^3.0.2
packages/gasket-cli/package.json
@oclif/command ^1.8.16
@oclif/config ^1.18.2
@oclif/core ^1.2.0
@oclif/parser ^3.8.6
@oclif/plugin-help ^5.1.10
@oclif/plugin-not-found ^2.2.4
@oclif/plugin-warn-if-update-available ^2.0.4
concat-stream ^2.0.0
cross-spawn ^7.0.1
deepmerge ^4.2.2
getopts ^2.3.0
glob ^8.0.0
handlebars ^4.7.6
inquirer 6.5.2
json5 ^2.1.0
mkdirp ^1.0.4
ora ^3.4.0
pump ^3.0.0
semver ^7.3.4
tar-fs ^2.0.0
untildify ^4.0.0
@oclif/dev-cli ^1.13.31
@oclif/test ^2.0.0
assume ^2.3.0
assume-sinon ^1.1.0
chai ^4.2.0
cross-env ^7.0.3
diagnostics ^2.0.2
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
fancy-test ^2.0.0
fetch-mock ^9.0.0
mocha ^10.0.0
npm-run-all ^4.1.3
nyc ^15.1.0
proxyquire ^2.1.3
rimraf ^3.0.2
sinon ^14.0.0
std-mocks ^1.0.1
node >= 8.0.0
packages/gasket-data/package.json
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
setup-env ^2.0.0
packages/gasket-engine/package.json
debug ^4.3.1
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-fetch/package.json
abort-controller ^3.0.0
node-fetch ^2.6.7
@babel/core ^7.16.10
@babel/plugin-transform-runtime ^7.12.10
@babel/preset-env ^7.12.10
@babel/register ^7.12.10
core-js ^3.6.5
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
jsdom ^20.0.0
regenerator-runtime ^0.13.7
setup-env ^2.0.0
whatwg-fetch 3.3.1
packages/gasket-helper-intl/package.json
lodash.merge ^4.6.0
@godaddy/dmd ^1.0.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
jsdoc-to-markdown ^7.1.0
setup-env ^2.0.0
packages/gasket-log/package.json
diagnostics ^2.0.2
kuler ^2.0.0
triple-beam ^1.3.0
winston ^3.2.1
@babel/cli ^7.12.10
@babel/core ^7.16.10
@babel/plugin-proposal-class-properties ^7.3.0
@babel/preset-env ^7.12.10
@babel/register ^7.12.10
babel-eslint ^10.1.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-babel ^5.3.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-nextjs/package.json
htmlescape ^1.1.1
@babel/cli ^7.12.10
@babel/core ^7.16.10
@babel/eslint-parser ^7.19.1
@babel/register ^7.12.10
@testing-library/react ^13.4.0
assume ^2.3.0
assume-sinon ^1.1.0
decache ^4.6.1
eslint ^8.7.0
eslint-config-godaddy-react ^9.0.0
eslint-plugin-json ^3.1.0
eslint-plugin-jsx-a11y ^6.2.1
eslint-plugin-mocha ^10.0.3
eslint-plugin-react ^7.22.0
eslint-plugin-unicorn ^44.0.0
jsdom ^20.0.0
mocha ^10.0.0
mock-require ^3.0.3
next ^12.0.8
nyc ^15.1.0
react ^18.0.0
react-dom ^18.0.0
setup-env ^2.0.0
sinon ^14.0.0
next >=10.2.0 < 13
packages/gasket-plugin-analyze/package.json
@types/webpack-bundle-analyzer ^4.4.1
deepmerge ^4.2.2
webpack-bundle-analyzer ^4.5.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-command/package.json
@godaddy/dmd ^1.0.0
@oclif/command ^1.8.16
@oclif/config ^1.18.2
@oclif/errors ^1.3.5
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
jsdoc-to-markdown ^7.1.0
@oclif/config ^1.13.0
@oclif/errors ^1.1.2
packages/gasket-plugin-config/package.json
lodash.defaultsdeep ^4.6.1
lodash.merge ^4.6.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
sinon ^14.0.0
packages/gasket-plugin-cypress/package.json
@babel/core ^7.16.10
@testing-library/react ^13.4.0
cypress ^12.3.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
react ^18.0.0
react-dom ^18.0.0
start-server-and-test ^1.14.0
packages/gasket-plugin-docs-graphs/package.json
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-docs/package.json
glob ^8.0.0
lodash.defaultsdeep ^4.6.1
markdown-table ^1.1.3
mkdirp ^1.0.4
rimraf ^3.0.2
@godaddy/dmd ^1.0.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
jsdoc-to-markdown ^7.1.0
packages/gasket-plugin-docsify/package.json
glob ^8.0.0
handlebars ^4.7.6
lodash.defaultsdeep ^4.6.1
mkdirp ^1.0.4
cross-env ^7.0.3
docsify ^4.10.2
docsify-cli ^4.4.2
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-docusaurus/package.json
@docusaurus/core 2.4.0
@docusaurus/preset-classic 2.4.0
lodash.defaultsdeep ^4.6.1
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-elastic-apm/package.json
elastic-apm-node ^3.26.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
nyc ^15.1.0
packages/gasket-plugin-express/package.json
@types/express ^4.17.13
compression ^1.7.2
cookie-parser ^1.4.3
diagnostics ^2.0.2
glob ^8.0.0
http2-express-bridge ^1.0.7
assume ^2.3.0
assume-sinon ^1.1.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
express ^4.16.3
jest ^29.3.1
mocha ^10.0.0
nyc ^15.1.0
proxyquire ^2.1.3
sinon ^14.0.0
express ^4.16.3
packages/gasket-plugin-fastify/package.json
compression ^1.7.2
cookie-parser ^1.4.3
diagnostics ^2.0.2
middie ^5.4.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
fastify ^3.3.0
jest ^29.3.1
fastify ^3.0.0
packages/gasket-plugin-git/package.json
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-https/package.json
@godaddy/terminus ^4.2.0
@types/node ^18.0.0
create-servers ^3.2.0
diagnostics ^2.0.2
errs ^0.3.2
one-time ^1.0.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-intl/package.json
@hapi/accept ^6.0.0
fs-extra ^10.0.0
intl ^1.2.5
loader-utils ^3.0.0
lodash.merge ^4.6.0
semver ^7.3.4
serve-static ^1.14.1
url-join ^4.0.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
react-intl ^6.0.0
setup-env ^2.0.0
webpack ^5.21.2
packages/gasket-plugin-jest/package.json
@testing-library/jest-dom ^5.16.1
@testing-library/react ^13.4.0
babel-eslint ^10.1.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-jsx-a11y ^6.2.1
eslint-plugin-mocha ^10.0.3
eslint-plugin-react ^7.22.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
jest-environment-jsdom ^29.4.2
react ^18.0.0
react-dom ^18.0.0
packages/gasket-plugin-lifecycle/package.json
diagnostics ^2.0.2
lodash.camelcase ^4.3.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-lint/package.json
semver ^7.3.4
assume ^2.3.0
assume-sinon ^1.1.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-config-next ^12.1.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
mocha ^10.0.0
nyc ^15.1.0
proxyquire ^2.1.3
sinon ^14.0.0
packages/gasket-plugin-log/package.json
assume ^2.3.0
assume-sinon ^1.1.0
babel-eslint ^10.1.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-babel ^5.3.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
mocha ^10.0.0
nyc ^15.1.0
proxyquire ^2.1.3
setup-env ^2.0.0
sinon ^14.0.0
packages/gasket-plugin-manifest/package.json
deepmerge ^4.2.2
escape-string-regexp ^1.0.5
mkdirp ^1.0.4
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-metadata/package.json
lodash.clonedeep ^4.5.0
lodash.isfunction ^3.0.9
lodash.isobject ^3.0.2
@godaddy/dmd ^1.0.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
jsdoc-to-markdown ^7.1.0
packages/gasket-plugin-metrics/package.json
git-shizzle ^0.1.0
git-url-parse ^13.1.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-mocha/package.json
@babel/core ^7.16.10
@babel/plugin-transform-runtime ^7.12.10
@babel/preset-env ^7.12.10
@babel/preset-react ^7.12.10
@babel/register ^7.12.10
@testing-library/react ^13.4.0
babel-eslint ^10.1.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-json ^3.1.0
eslint-plugin-react ^7.22.0
eslint-plugin-unicorn ^44.0.0
global-jsdom ^8.4.0
jsdom ^20.0.0
react ^18.0.0
react-dom ^18.0.0
packages/gasket-plugin-morgan/package.json
morgan ^1.10.0
split ^1.0.1
@types/morgan ^1.9.3
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
express ^4.16.3
packages/gasket-plugin-nextjs/package.json
fastify ^4.1.0
@babel/preset-react ^7.12.10
babel-eslint ^10.1.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-config-godaddy-react ^9.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
lodash.merge ^4.6.0
next ^12.0.8
next-redux-wrapper ^8.0.0
prop-types ^15.7.2
react ^18.0.0
react-dom ^18.0.0
next >=10.2.0 < 13
react ^16 || ^17 || ^18
react-dom ^16 || ^17 || ^18
packages/gasket-plugin-redux/package.json
acorn ^8.8.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
react ^18.0.0
react-dom ^18.0.0
react-redux ^8.0.0
redux ^4.0.5
webpack ^5.21.2
packages/gasket-plugin-service-worker/package.json
@types/lru-cache ^5.1.1
@types/uglify-js ^3.13.1
deepmerge ^4.2.2
lru-cache ^5.1.1
mkdirp ^1.0.4
uglify-js ^3.5.3
webpack-inject-plugin ^1.5.4
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-start/package.json
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-plugin-swagger/package.json
@fastify/swagger ^6.0.0
@types/swagger-ui-express ^4.1.3
express ^4.16.3
swagger-jsdoc ^4.0.0
swagger-ui-express ^4.1.4
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
fastify ^3.0.0
jest ^29.3.1
packages/gasket-plugin-webpack/package.json
webpack-chain ^6.0.0
webpack-merge ^4.2.1
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
mock-require ^3.0.3
webpack ^5.21.2
packages/gasket-plugin-workbox/package.json
@types/workbox-build ^5.0.1
deepmerge ^4.2.2
serve-static ^1.14.1
workbox-build ^4.1.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
packages/gasket-preset-api/package.json
packages/gasket-preset-nextjs/package.json
packages/gasket-preset-pwa/package.json
packages/gasket-react-intl/package.json
@babel/runtime ^7.12.5
hoist-non-react-statics ^3.0.0
just-extend ^6.2.0
prop-types ^15.7.2
@babel/cli ^7.12.10
@babel/core ^7.16.10
@babel/plugin-proposal-object-rest-spread ^7.0.0
@babel/plugin-transform-runtime ^7.12.10
@babel/preset-env ^7.12.10
@babel/preset-react ^7.12.10
@babel/register ^7.12.10
@testing-library/react ^13.4.0
assume ^2.3.0
assume-sinon ^1.1.0
babel-core ^7.0.0-bridge.0
babel-eslint ^10.1.0
babel-plugin-root-import ^6.0.0
eslint ^8.7.0
eslint-config-godaddy-react ^9.0.0
eslint-plugin-json ^3.1.0
eslint-plugin-jsx-a11y ^6.2.1
eslint-plugin-mocha ^10.0.3
eslint-plugin-react ^7.22.0
eslint-plugin-unicorn ^44.0.0
intl ^1.2.5
jsdom ^20.0.0
mocha ^10.0.0
nyc ^15.1.0
proxyquire ^2.1.3
react ^18.0.0
react-dom ^18.0.0
react-intl ^6.0.0
react-redux ^8.0.0
setup-env ^2.0.0
sinon ^14.0.0
react-intl <7.0.0
packages/gasket-redux/package.json
@babel/runtime ^7.12.5
redux-logger ^3.0.6
redux-thunk ^2.2.0
@babel/cli ^7.12.10
@babel/core ^7.16.10
@babel/plugin-proposal-object-rest-spread ^7.0.0
@babel/plugin-transform-runtime ^7.12.10
@babel/preset-env ^7.12.10
babel-core ^7.0.0-bridge.0
babel-eslint ^10.1.0
babel-jest ^29.0.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-jsx-a11y ^6.2.1
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
redux ^4.0.5
redux ^3.7.2 || ^4.0.1
packages/gasket-resolve/package.json
diagnostics ^2.0.2
lodash.defaultsdeep ^4.6.1
semver ^7.3.4
@godaddy/dmd ^1.0.0
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-mocha ^10.0.3
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
jsdoc-to-markdown ^7.1.0
packages/gasket-typescript-tests/package.json
@types/express ^4.17.13
@types/jest ^29.0.0
eslint ^8.7.0
eslint-config-godaddy-typescript ^4.0.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
redux ^4.0.5
ts-jest ^29.0.0
typescript ^4.5.2
packages/gasket-utils/package.json
concat-stream ^2.0.0
cross-spawn ^7.0.1
lodash.defaultsdeep ^4.6.1
@godaddy/dmd ^1.0.0
abort-controller ^3.0.0
cross-env ^7.0.3
eslint ^8.7.0
eslint-config-godaddy ^7.0.0
eslint-plugin-jest ^27.2.1
eslint-plugin-json ^3.1.0
eslint-plugin-unicorn ^44.0.0
jest ^29.3.1
jsdoc-to-markdown ^7.1.0
scripts/generate-docs-index/package.json
copy-dir ^1.2.0
eslint ^8.7.0
eslint-plugin-unicorn ^44.0.0
Overall guide for apps using v5 to reference in order to get to the v6 version of plugins.
Package(s): @gasket/docs
Just as we show tables of the available lifecycles, commands, and such for a gasket app in the index generated from gasket docs, let's also include a table describing the available config options.
Links to docs for create-gasket-app
are missing from the Gasket docs index.
This is because there is no metadata set for the package.
Package(s): @gasket/*
We use promisify
for several things that now already have promise support. Let's do a code cleanup pass for these.
fs
-> fs.promises
[email protected]
-> mkdirp@^1.x
mkdirp
dependency across packagespromisify
where possibleIn order to fully support static site creation, we need to allow the web manifest to be generated to a file at build-time. Retaining support for request-time generating should continue to be supported.
package(s): @gasket/plugin-manifest
And investigate a good approach to define or expose the prompt function types interface.
Currently, some lifecycles in the graph docs do not accurately show when they
are executed. We need to allow for non-commands to be displayed as root events.
There will likely be a pass required on some metadata for plugins accordingly.
Package(s): @gasket/*
In order to fully support static site creation, we need to allow service workers to be generated to a file at build-time. Retaining support for request-time generating should continue to be supported.
package(s): @gasket/plugin-server-worker, @gasket/plugin-workbox
We need to add support for HTTP/2 in Gasket apps. Ideally, this can just be a
configuration property in the gasket.config.js
. Alternatively, if required
then a new http2 plugin.
Package(s): @gasket/plugin-https?, create-servers?
Currently, the @gasket/plugin-intl allows configuring a supported locales
array, for the purpose of passing along to Next.js for i18n routing of static pages. A suitable requested feature is to also use this for other non-Next static pages. In the @gasket/helper-intl, we should fallback back to the defaultLocale
when supported locales
are specified and the requested locale is not included.
Package(s): @gasket/helper-intl
AC:
locales
is configured, but requested locale is not included, load path for defaultLocale
.There are a few ways to shave this yak – this proposal is just one:
@gasket/preset-https
in packages/gasket-preset-https
with plugins:
@gasket/plugin-config
@gasket/plugin-docs
@gasket/plugin-docsify
@gasket/plugin-express
@gasket/plugin-https
@gasket/plugin-lint
@gasket/plugin-log
@gasket/preset-nextjs
to depend on this preset.@gasket/preset-https
– perhaps tabs or pills to switch?Package(s): @gasket/cli
AC:
gasket.config.js
There have been asks to use gasket create
or an equivalent command for scaffolding non-app packages.
Package(s): @gasket/
After an early investigation with built-in i18n routing from Next, our Gasket Intl package is pretty close to just work with it. Our solution for supporting GSSP and GSP is similar, so let's tune things up for it.
Package(s): @gasket/intl, @gasket/plugin-intl
Branch: canary
intl.locales
and intl.defaultLocale
should be pass to nextConfig.We should do an iteration on the Preset authoring guide and add some guidance for testing during development, such as a using the hidden --preset-path flag with the create command.
The smart method of webpack-merge has been deprecated. We should move away from it in the webpack plugin. Reference the webpack-merge docs and changelog for details and suggested alternatives.
Package(s): @gasket/plugin-webpack
AC:
Stretch:
TypeScript enthusiasts like me want as much of our code to be written in TypeScript as possible. As a user of @gasket/preset-nextjs
, I enjoy the fact that the next.js integration gives me the ability to author some of my code in TypeScript (React components for example), but it's frustrating that any code compatible with SSR (/store.js
) or pure gasket artifacts /lifecycles
cannot be authored in TypeScript without some hackery or degradation in developer experience (DX).
There are many technical challenges to supporting TypeScript source code in gasket applications:
@gasket/plugin-lifecycles
, which lists the files in a /lifecycles
directory and dynamically loads that code, and @gasket/plugin-redux
which needs to discover a redux store factory.Another tangential thing that developers may desire is the ability to automatically restart gasket servers when code changes. This avoids those confusing moments where you're tearing your hair out wondering why the code is not behaving as written because you forgot to restart.
Although TypeScript outside of next.js-built components is not officially supported, some approaches have been employed to support it within some projects, falling into two broad categories. Here are the challenges with these workarounds:
Running tsc
before invoking the gasket CLI causes generated .js
files to be placed alongside .ts
files so that they're discoverable by Gasket. This works, but:
.js
and .ts
files in their source files..tsx
files to provoke server restarts.Another workaround involves registering a module loader for .ts
files, using techniques like @babel/register
or ts-node/register
early in the source code of a gasket app, such as in gasket.config.js
. This has some challenges:
babel
or typescript
to be deployed alongside an app's dependencies since they are now used at runtime instead of just build time.@gasket/plugin-lifecycle
, needs to know to look for other file extensions like .ts
.extensions
that is an array of which file extensions gasket plugins should look for when dynamically loading source files (or can we read this from Module
?). This should have a reasonable default for typical node development.@gasket/plugin-lifecycle
, to use this extensions
config value.@gasket/plugin-start
or a new @gasket/plugin-clean
plugin:
clean
command to gasketclean
package.json script that invokes gasket clean
@godaddy/gasket-plugin-intl
@gasket/plugin-nodemon
package which:
create
lifecycle and generates:
nodemon
nodemon.json
with useful defaultslocal
package.json script which invokes gasket local
via nodemon
nodemonConfig
lifecycle event during create
to enable plugins to modify the generated config@gasket/plugin-typescript
package, which:
configure
lifecycle, injecting .ts
(and maybe .tsx?) as an extension.create
lifecycle after @gasket/plugin-nodemon
and generates:
typescript
ts-node
@types/foo
dependencies for any packages with known external type definitions. These will be read by invoking a new tsTypeDefinitionPackages
lifecycle, enabling any plugin to register their own type definitions.tsconfig.json
so it's picked up by the next.js babel compiler), one for server code.gitignore
modificationslocal
package.json script where ts-node
is used to execute gasket
or nodemon --exec ts-node
if it's already wrapped by nodemon
.nodemonConfig
lifecycle and adds watching of .ts
files, except those that are likely to be client-onlybuild
lifecycle, invoking tsc
with the server config file if the gasket command isn't local
clean
lifecycle, deleting generated .js
filesIf one runs the following:
npm i -g @gasket/cli
gasket create myapp -p @gasket/preset-nextjs
cd myapp
npx gasket build
DEBUG=express* npx gasket local
We quickly see the express debug output:
express:application set "x-powered-by" to true +0ms
express:application set "etag" to 'weak' +1ms
express:application set "etag fn" to [Function: generateETag] +0ms
express:application set "env" to 'development' +1ms
express:application set "query parser" to 'extended' +0ms
express:application set "query parser fn" to [Function: parseExtendedQueryString] +0ms
express:application set "subdomain offset" to 2 +0ms
express:application set "trust proxy" to false +0ms
express:application set "trust proxy fn" to [Function: trustNone] +1ms
express:application booting in development mode +0ms
express:application set "view" to [Function: View] +0ms
express:application set "views" to './myapp/views' +0ms
express:application set "jsonp callback name" to 'callback' +0ms
express:router use '/' query +0ms
express:router:layer new '/' +0ms
express:router use '/' expressInit +1ms
express:router:layer new '/' +0ms
express:router use '/' cookieParser +0ms
express:router:layer new '/' +0ms
express:router use '/' compression +0ms
express:router:layer new '/' +0ms
express:router use '/' middleware +5ms
express:router:layer new '/' +1ms
express:application set "buildId" to 'A-9cIUPb32ud1LBi1mROp' +40ms
express:router:route new '*' +2ms
express:router:layer new '*' +0ms
// ...
// ... etc
// ...
Today we do a good job of documenting the possible graph of Hooks, and Lifecycles that will be executed for a given Command:
However, when we consider the plugin & preset authoring experience it's not as much about understanding the entire graph of possibilities but mapping out and debugging a single walk of that graph for a given gasket app process. This can be challenging today and a full understanding of the order of operations is often based on intuition, not hard data.
I propose we add similar debug output to @gasket/engine
so that when one runs:
DEBUG=gasket* npx gasket start
They would get the walk of the graph of all hooks when starting at gasket/plugin-start
above and moving from left to right in the traversal order that happens at runtime.
We need a way for app config to be made available in the browser, when Redux is not used. Today, teams can set config under a Redux property which will make it available in the Redux store.
For this change, we should introduce a new special property (public
) which will add its values to res.locals.gasketData.config
, and thus be made available in the browser under with @gasket/data as gasketData.config
.
Package(s): @gasket/plugin-config
We need to expose an allPlugins
getter method from create context for listing all plugins including those from presets. This will be useful for condition checks during the prompt
and create
lifecycles.
We do a check like this here, but we should expose a simpler helper which lifecycle hooks can also utilize.
Package(s): @gasket/cli
AC:
We need to allow plugins to add files/directories to the .gitignore
to generate the file cleanly and flexible.
Package(s): @gasket/
.gitignore
fileThere may be some cases where refs are need for components wrapped with the HOCs, as such these refs should be forward by the HOCs.
NOTE: While addhoc forwards refs, and was investigated for these HOCs, it does not allow for the wrapping code access to the components own properties, necessary for these.
Package(s): @gasket/react-intl
We should go ahead and drop next-routes support. It is buggy with built-in routing, and it was removed from our docs already in #215.
Package(s): @gasket/plugin-nextjs
Version: major v6
In the CLI and some of our plugins we are looking up and loading .js files. We need to expand this list to also include newer .mjs and .cjs files. ESM will support will require (pun not intended) a larger separate refactor to use import statements.
Package(s): @gasket/cli, @gasket/plugin-lifecycle, @gasket/plugin-lint, *
We should avoid using the first
and last
timing properties with our Gasket plugins. These can cause timing confusion with custom plugins for end users. Because this would more than likely result in a breaking change with timings, this should be handled in our next major version.
We need a streamlined approach for locales to be preloaded to the response in order to be accessible by the server for endpoints or document rendering. This could be something like req.withLocaleRequire('/locales')
with a selector method to pick a message key such as req.selectLocaleMessage('hello')
Also, this data should be normalized with LocalesProps as in in the Next.js loaders in @gasket/react-intl
See this code comment
Package(s): @gasket/plugin-intl
In order to allow plugins to add flags to commands, we need a new getCommandFlags
lifecycle.
Plugins can use this command to add custom flags that they want to listen for. By default
new flags will be added for all commands. The getCommandFlags
lifecycle should allow plugins to also limit
which commands should be effected.
As a first custom, we should update @gasket/plugin-metrics to use the new lifecycle to add the record
flag
and drop it (from the command plugin).
Package(s): @gasket/plugin-command
record
flagThe vast majority of times that lifecycles are hooked, it is for app-level one-offs. Let's do a pass on our doc examples to demonstrate this format, rather than in plugin hooks.
There may be some lifecycle examples where plugin are the suitable example to show, so use discretion in these changes.
Package(s): @gasket/*
Move away from window.gasketData
and use the new @gasket/data package.
Package(s): @gasket/react-intl
gasketData.intl
from @gasket/dataA declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.