next-hybrid 16.1.1-hybrid.0 → 16.1.1-hybrid.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -39
- package/dist/.build-commit +1 -1
- package/dist/bin/next +2 -2
- package/dist/build/index.js +3 -3
- package/dist/build/swc/index.js +1 -1
- package/dist/build/webpack-config.js +3 -3
- package/dist/client/app-bootstrap.js +1 -1
- package/dist/client/index.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-api.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.dev.js.map +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages-turbo.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js +1 -1
- package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
- package/dist/compiled/next-server/server.runtime.prod.js +1 -1
- package/dist/esm/build/index.js +3 -3
- package/dist/esm/build/swc/index.js +1 -1
- package/dist/esm/build/webpack-config.js +3 -3
- package/dist/esm/client/app-bootstrap.js +1 -1
- package/dist/esm/client/index.js +1 -1
- package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/esm/server/lib/app-info-log.js +1 -1
- package/dist/esm/server/lib/start-server.js +1 -1
- package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
- package/dist/server/dev/hot-reloader-turbopack.js +1 -1
- package/dist/server/dev/hot-reloader-webpack.js +1 -1
- package/dist/server/lib/app-info-log.js +1 -1
- package/dist/server/lib/start-server.js +1 -1
- package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
- package/dist/telemetry/anonymous-meta.js +1 -1
- package/dist/telemetry/events/session-stopped.js +2 -2
- package/dist/telemetry/events/version.js +2 -2
- package/package.json +7 -3
package/README.md
CHANGED
|
@@ -1,49 +1,38 @@
|
|
|
1
|
-
|
|
2
|
-
<a href="https://nextjs.org">
|
|
3
|
-
<picture>
|
|
4
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_dark_background.png">
|
|
5
|
-
<img alt="Next.js logo" src="https://assets.vercel.com/image/upload/v1662130559/nextjs/Icon_light_background.png" height="128">
|
|
6
|
-
</picture>
|
|
7
|
-
</a>
|
|
8
|
-
<h1>Next.js</h1>
|
|
1
|
+
# next-hybrid
|
|
9
2
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
<a href="https://github.com/vercel/next.js/blob/canary/license.md"><img alt="License" src="https://img.shields.io/npm/l/next.svg?style=for-the-badge&labelColor=000000"></a>
|
|
13
|
-
<a href="https://github.com/vercel/next.js/discussions"><img alt="Join the community on GitHub" src="https://img.shields.io/badge/Join%20the%20community-blueviolet.svg?style=for-the-badge&logo=Next.js&labelColor=000000&logoWidth=20"></a>
|
|
3
|
+
Hybrid routing build of Next.js with support for hybrid route segments in the
|
|
4
|
+
App Router (for example `/house-in-[city]`).
|
|
14
5
|
|
|
15
|
-
|
|
6
|
+
## What's new
|
|
16
7
|
|
|
17
|
-
|
|
8
|
+
- Hybrid segments combine static and dynamic parts in a single segment.
|
|
9
|
+
- Routing priority remains: static > hybrid > dynamic > catch-all.
|
|
10
|
+
- Works with the App Router layouts and params API.
|
|
18
11
|
|
|
19
|
-
|
|
12
|
+
## Install
|
|
20
13
|
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
```bash
|
|
15
|
+
npm i next-hybrid
|
|
16
|
+
```
|
|
23
17
|
|
|
24
|
-
##
|
|
18
|
+
## Example
|
|
25
19
|
|
|
26
|
-
|
|
20
|
+
```txt
|
|
21
|
+
/house-in-nyc -> static
|
|
22
|
+
/house-in-[city] -> hybrid
|
|
23
|
+
/[slug] -> dynamic
|
|
24
|
+
/[...slug] -> catch-all
|
|
25
|
+
/[[...slug]] -> optional catch-all
|
|
26
|
+
```
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
```tsx
|
|
29
|
+
// app/house-in-[city]/page.tsx
|
|
30
|
+
export default async function Page({ params }) {
|
|
31
|
+
const { city } = await params
|
|
32
|
+
return <h1>Houses in {city}</h1>
|
|
33
|
+
}
|
|
34
|
+
```
|
|
29
35
|
|
|
30
|
-
|
|
36
|
+
## Repository
|
|
31
37
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
Do note that our [Code of Conduct](https://github.com/vercel/next.js/blob/canary/CODE_OF_CONDUCT.md) applies to all Next.js community channels. Users are **highly encouraged** to read and adhere to it to avoid repercussions.
|
|
35
|
-
|
|
36
|
-
## Contributing
|
|
37
|
-
|
|
38
|
-
Contributions to Next.js are welcome and highly appreciated. However, before you jump right into it, we would like you to review our [Contribution Guidelines](/contributing.md) to make sure you have a smooth experience contributing to Next.js.
|
|
39
|
-
|
|
40
|
-
### Good First Issues:
|
|
41
|
-
|
|
42
|
-
We have a list of **[good first issues](https://github.com/vercel/next.js/labels/good%20first%20issue)** that contain bugs that have a relatively limited scope. This is a great place for newcomers and beginners alike to get started, gain experience, and get familiar with our contribution process.
|
|
43
|
-
|
|
44
|
-
---
|
|
45
|
-
## Security
|
|
46
|
-
|
|
47
|
-
If you believe you have found a security vulnerability in Next.js, we encourage you to **_responsibly disclose this and NOT open a public issue_**.
|
|
48
|
-
|
|
49
|
-
To participate in our Open Source Software Bug Bounty program, please email [responsible.disclosure@vercel.com](mailto:responsible.disclosure@vercel.com). We will add you to the program and provide further instructions for submitting your report.
|
|
38
|
+
https://github.com/pablofdezr/next.js
|
package/dist/.build-commit
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
9e975af5f56dcb45638b21b80887dcb77000d244
|
package/dist/bin/next
CHANGED
|
@@ -85,7 +85,7 @@ const program = new NextRootCommand();
|
|
|
85
85
|
program.name('next').description('The Next.js CLI allows you to develop, build, start your application, and more.').configureHelp({
|
|
86
86
|
formatHelp: (cmd, helper)=>(0, _formatclihelpoutput.formatCliHelpOutput)(cmd, helper),
|
|
87
87
|
subcommandTerm: (cmd)=>`${cmd.name()} ${cmd.usage()}`
|
|
88
|
-
}).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"16.1.1-hybrid.
|
|
88
|
+
}).helpCommand(false).helpOption('-h, --help', 'Displays this message.').version(`Next.js v${"16.1.1-hybrid.1"}`, '-v, --version', 'Outputs the Next.js version.');
|
|
89
89
|
program.command('build').description('Creates an optimized production build of your application. The output displays information about each route.').argument('[directory]', `A directory on which to build the application. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).option('--experimental-analyze', 'Analyze bundle output. Only compatible with Turbopack.').option('-d, --debug', 'Enables a more verbose build output.').option('--debug-prerender', 'Enables debug mode for prerendering. Not for production use!').option('--no-mangling', 'Disables mangling.').option('--profile', 'Enables production profiling for React.').option('--experimental-app-only', 'Builds only App Router routes.').option('--turbo', 'Builds using Turbopack.').option('--turbopack', 'Builds using Turbopack.').option('--webpack', 'Builds using webpack.').addOption(new _commander.Option('--experimental-build-mode [mode]', 'Uses an experimental build mode.').choices([
|
|
90
90
|
'compile',
|
|
91
91
|
'generate',
|
|
@@ -163,7 +163,7 @@ program.command('telemetry').description(`Allows you to enable or disable Next.j
|
|
|
163
163
|
program.command('typegen').description('Generate TypeScript definitions for routes, pages, and layouts without running a full build.').argument('[directory]', `A directory on which to generate types. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).action((directory, options)=>// ensure process exits after typegen completes so open handles/connections
|
|
164
164
|
// don't cause process to hang
|
|
165
165
|
import('../cli/next-typegen.js').then((mod)=>mod.nextTypegen(options, directory).then(()=>process.exit(0)))).usage('[directory] [options]');
|
|
166
|
-
const nextVersion = "16.1.1-hybrid.
|
|
166
|
+
const nextVersion = "16.1.1-hybrid.1" || 'unknown';
|
|
167
167
|
program.command('upgrade').description('Upgrade Next.js apps to desired versions with a single command.').argument('[directory]', `A Next.js project directory to upgrade. ${(0, _picocolors.italic)('If no directory is provided, the current directory will be used.')}`).usage('[directory] [options]').option('--revision <revision>', 'Specify the target Next.js version using an NPM dist tag (e.g. "latest", "canary", "rc", "beta") or an exact version number (e.g. "15.0.0").', nextVersion.includes('-canary.') ? 'canary' : nextVersion.includes('-rc.') ? 'rc' : nextVersion.includes('-beta.') ? 'beta' : 'latest').option('--verbose', 'Verbose output', false).action(async (directory, options)=>{
|
|
168
168
|
const mod = await import('../cli/next-upgrade.js');
|
|
169
169
|
mod.spawnNextUpgrade(directory, options);
|
package/dist/build/index.js
CHANGED
|
@@ -380,7 +380,7 @@ async function build(dir, experimentalAnalyze = false, reactProductionProfiling
|
|
|
380
380
|
try {
|
|
381
381
|
const nextBuildSpan = (0, _trace.trace)('next-build', undefined, {
|
|
382
382
|
buildMode: experimentalBuildMode,
|
|
383
|
-
version: "16.1.1-hybrid.
|
|
383
|
+
version: "16.1.1-hybrid.1"
|
|
384
384
|
});
|
|
385
385
|
_buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
|
|
386
386
|
_buildcontext.NextBuildContext.dir = dir;
|
|
@@ -878,7 +878,7 @@ async function build(dir, experimentalAnalyze = false, reactProductionProfiling
|
|
|
878
878
|
// Files outside of the distDir can be "type": "module"
|
|
879
879
|
await writeFileUtf8(_path.default.join(distDir, 'package.json'), '{"type": "commonjs"}');
|
|
880
880
|
// These are written to distDir, so they need to come after creating and cleaning distDr.
|
|
881
|
-
await (0, _builddiagnostics.recordFrameworkVersion)("16.1.1-hybrid.
|
|
881
|
+
await (0, _builddiagnostics.recordFrameworkVersion)("16.1.1-hybrid.1");
|
|
882
882
|
await (0, _builddiagnostics.updateBuildDiagnostics)({
|
|
883
883
|
buildStage: 'start'
|
|
884
884
|
});
|
|
@@ -2560,7 +2560,7 @@ async function build(dir, experimentalAnalyze = false, reactProductionProfiling
|
|
|
2560
2560
|
configOutDir: _path.default.join(dir, configOutDir),
|
|
2561
2561
|
staticPages,
|
|
2562
2562
|
serverPropsPages,
|
|
2563
|
-
nextVersion: "16.1.1-hybrid.
|
|
2563
|
+
nextVersion: "16.1.1-hybrid.1",
|
|
2564
2564
|
tracingRoot: outputFileTracingRoot,
|
|
2565
2565
|
hasNodeMiddleware,
|
|
2566
2566
|
hasInstrumentationHook,
|
package/dist/build/swc/index.js
CHANGED
|
@@ -130,7 +130,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
130
130
|
}
|
|
131
131
|
return newObj;
|
|
132
132
|
}
|
|
133
|
-
const nextVersion = "16.1.1-hybrid.
|
|
133
|
+
const nextVersion = "16.1.1-hybrid.1";
|
|
134
134
|
const ArchName = (0, _os.arch)();
|
|
135
135
|
const PlatformName = (0, _os.platform)();
|
|
136
136
|
function infoLog(...args) {
|
|
@@ -1725,7 +1725,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1725
1725
|
isClient && new _copyfileplugin.CopyFilePlugin({
|
|
1726
1726
|
// file path to build output of `@next/polyfill-nomodule`
|
|
1727
1727
|
filePath: require.resolve('./polyfills/polyfill-nomodule'),
|
|
1728
|
-
cacheKey: "16.1.1-hybrid.
|
|
1728
|
+
cacheKey: "16.1.1-hybrid.1",
|
|
1729
1729
|
name: `static/chunks/polyfills${dev ? '' : '-[hash]'}.js`,
|
|
1730
1730
|
minimize: false,
|
|
1731
1731
|
info: {
|
|
@@ -1919,7 +1919,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1919
1919
|
// - Next.js location on disk (some loaders use absolute paths and some resolve options depend on absolute paths)
|
|
1920
1920
|
// - Next.js version
|
|
1921
1921
|
// - next.config.js keys that affect compilation
|
|
1922
|
-
version: `${__dirname}|${"16.1.1-hybrid.
|
|
1922
|
+
version: `${__dirname}|${"16.1.1-hybrid.1"}|${configVars}`,
|
|
1923
1923
|
cacheDirectory: _path.default.join(distDir, 'cache', 'webpack'),
|
|
1924
1924
|
// For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
|
|
1925
1925
|
// So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
|
|
@@ -1975,7 +1975,7 @@ async function getBaseWebpackConfig(dir, { buildId, encryptionKey, config, compi
|
|
|
1975
1975
|
type: 'filesystem',
|
|
1976
1976
|
directory: cache.cacheDirectory
|
|
1977
1977
|
},
|
|
1978
|
-
version: `${__dirname}|${"16.1.1-hybrid.
|
|
1978
|
+
version: `${__dirname}|${"16.1.1-hybrid.1"}|${configVars}`
|
|
1979
1979
|
};
|
|
1980
1980
|
}
|
|
1981
1981
|
if (process.env.NEXT_WEBPACK_LOGGING) {
|
|
@@ -15,7 +15,7 @@ Object.defineProperty(exports, "appBootstrap", {
|
|
|
15
15
|
});
|
|
16
16
|
const _assetprefix = require("./asset-prefix");
|
|
17
17
|
const _setattributesfromprops = require("./set-attributes-from-props");
|
|
18
|
-
const version = "16.1.1-hybrid.
|
|
18
|
+
const version = "16.1.1-hybrid.1";
|
|
19
19
|
window.next = {
|
|
20
20
|
version,
|
|
21
21
|
appDir: true
|
package/dist/client/index.js
CHANGED
|
@@ -60,7 +60,7 @@ const _hooksclientcontextsharedruntime = require("../shared/lib/hooks-client-con
|
|
|
60
60
|
const _onrecoverableerror = require("./react-client-callbacks/on-recoverable-error");
|
|
61
61
|
const _tracer = /*#__PURE__*/ _interop_require_default._(require("./tracing/tracer"));
|
|
62
62
|
const _isnextroutererror = require("./components/is-next-router-error");
|
|
63
|
-
const version = "16.1.1-hybrid.
|
|
63
|
+
const version = "16.1.1-hybrid.1";
|
|
64
64
|
let router;
|
|
65
65
|
const emitter = (0, _mitt.default)();
|
|
66
66
|
const looseToArray = (input)=>[].slice.call(input);
|