A Next.js App or page decorator, React context object, and React hook to access Node.js HTTP server context when rendering components.
MIT License
Bot releases are hidden (Show)
^18.17.0 || >=20.4.0
.test-director
.fetch
API available in modern Node.js and removed the dev dependency node-fetch
.next
peer dependency to 12 - 14
.package.json
field repository
to conform to new npm requirements.eslint-plugin-optimal-modules
.actions/checkout
to v4.actions/setup-node
to v4.startNext
.cjsDefaultImport
.Published by jaydenseric almost 2 years ago
next
peer dependency to 12 - 13
.cjsDefaultImport
to normalize the default import value from the CJS module next/app.js
that has a default
property, preserving the type for the various ways TypeScript may be configured.startNext
.Published by jaydenseric about 2 years ago
node:
URL scheme for Node.js builtin module imports in tests.fsPathRemove
with the function rm
from the Node.js builtin module node:fs/promises
.Published by jaydenseric over 2 years ago
^14.17.0 || ^16.0.0 || >= 18.0.0
.react
peer dependency to 16.14 - 18
.jsdoc-md
dev dependency and the package docs-update
and docs-check
scripts, replacing the readme “API” section with a manually written “Exports” section.types
script.@testing-library/react-hooks
dev dependency and rewrote React hook tests using react-test-renderer
and a custom React component ReactHookTest
.withServerContext
returns.actions/checkout
to v3.actions/setup-node
to v3..mjs
file extension for Next.js pages in test fixtures.not IE > 0
from the Browserslist query.license.md
MIT License file.Published by jaydenseric almost 3 years ago
^12.22.0 || ^14.17.0 || >= 16.0.0
.next
peer dependency to ^12.0.0
.files
and exports
fields../package
from the package exports
field; the full package.json
filename must be used in a require
path./public/
..mjs
files instead of CJS in .js
files, accessible via import
but not require
.React.createElement
instead of the the new React JSX runtime.assertBundleSize
function to assert module bundle size in tests:
ok
assertions instead of strictEqual
where possible.singleQuote
to the default, false
.Published by jaydenseric over 3 years ago
next
peer dependency to 9.0.3 - 11
.eslint-config-next
dev dependency for next
v11.Published by jaydenseric over 3 years ago
^12.20 || >= 14.13
.> 0.5%, not OperaMini all, not IE > 0, not dead
.react
peer dependency to 16.14 - 17
.package.json
exports
field public subpath folder mapping (deprecated by Node.js) with a subpath pattern. Deep require
paths within next-server-context/public/
must now include the .js
file extension.test:api
script to test the API, using ESM in .mjs
files and new dev dependencies:
actions/checkout
to v2.actions/setup-node
to v2.CI
environment variable as it’s set by default.jsdoc-md
v10+ automatically generates a Prettier formatted readme.test:jsdoc
script that checks the readme API docs are up to date with the source JSDoc.esbuild
and gzip-size
, removing size-limit
related dev dependencies, config, and scripts..js
file extension in internal require
paths.withServerContext
.npm-debug.log
from the .gitignore
file as npm v4.2.0+ doesn’t create it in the current working directory.changelog.md
is no longer published.Published by jaydenseric almost 4 years ago
engines.node
field to ^10.17.0 || ^12.0.0 || >= 13.7.0
.exports
field with conditional exports to support native ESM in Node.js and keep internal code private, whilst avoiding the dual package hazard. Published files have been reorganized, so previously undocumented deep imports will need to be rewritten according to the newly documented paths.module
field.next
peer dependency to 9.0.3 - 10
.react
peer dependency to 16.8 - 17
.object-assign
dependency and related size-limit
config.keywords
field.npm install-test
command.babel-plugin-transform-require-extensions
dev dependency.prepare:mjs
and prepare:js
package scripts with a prepare:babel
script..json
instead of .js
config.browserslist
field..js
files are parsed as scripts.semi
to the default, true
.useServerContext
examples.import
and require
the public API.displayName
for React components to be eliminated in production builds.Published by jaydenseric over 4 years ago
Initial release.