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.
Files changed (40) hide show
  1. package/README.md +28 -39
  2. package/dist/.build-commit +1 -1
  3. package/dist/bin/next +2 -2
  4. package/dist/build/index.js +3 -3
  5. package/dist/build/swc/index.js +1 -1
  6. package/dist/build/webpack-config.js +3 -3
  7. package/dist/client/app-bootstrap.js +1 -1
  8. package/dist/client/index.js +1 -1
  9. package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js +1 -1
  10. package/dist/compiled/next-server/pages-api-turbo.runtime.dev.js.map +1 -1
  11. package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js +1 -1
  12. package/dist/compiled/next-server/pages-api-turbo.runtime.prod.js.map +1 -1
  13. package/dist/compiled/next-server/pages-api.runtime.prod.js +1 -1
  14. package/dist/compiled/next-server/pages-api.runtime.prod.js.map +1 -1
  15. package/dist/compiled/next-server/pages-turbo.runtime.dev.js +1 -1
  16. package/dist/compiled/next-server/pages-turbo.runtime.dev.js.map +1 -1
  17. package/dist/compiled/next-server/pages-turbo.runtime.prod.js +1 -1
  18. package/dist/compiled/next-server/pages-turbo.runtime.prod.js.map +1 -1
  19. package/dist/compiled/next-server/pages.runtime.prod.js +1 -1
  20. package/dist/compiled/next-server/pages.runtime.prod.js.map +1 -1
  21. package/dist/compiled/next-server/server.runtime.prod.js +1 -1
  22. package/dist/esm/build/index.js +3 -3
  23. package/dist/esm/build/swc/index.js +1 -1
  24. package/dist/esm/build/webpack-config.js +3 -3
  25. package/dist/esm/client/app-bootstrap.js +1 -1
  26. package/dist/esm/client/index.js +1 -1
  27. package/dist/esm/server/dev/hot-reloader-turbopack.js +1 -1
  28. package/dist/esm/server/dev/hot-reloader-webpack.js +1 -1
  29. package/dist/esm/server/lib/app-info-log.js +1 -1
  30. package/dist/esm/server/lib/start-server.js +1 -1
  31. package/dist/esm/shared/lib/errors/canary-only-config-error.js +1 -1
  32. package/dist/server/dev/hot-reloader-turbopack.js +1 -1
  33. package/dist/server/dev/hot-reloader-webpack.js +1 -1
  34. package/dist/server/lib/app-info-log.js +1 -1
  35. package/dist/server/lib/start-server.js +1 -1
  36. package/dist/shared/lib/errors/canary-only-config-error.js +1 -1
  37. package/dist/telemetry/anonymous-meta.js +1 -1
  38. package/dist/telemetry/events/session-stopped.js +2 -2
  39. package/dist/telemetry/events/version.js +2 -2
  40. package/package.json +7 -3
package/README.md CHANGED
@@ -1,49 +1,38 @@
1
- <div align="center">
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
- <a href="https://vercel.com"><img alt="Vercel logo" src="https://img.shields.io/badge/MADE%20BY%20Vercel-000000.svg?style=for-the-badge&logo=Vercel&labelColor=000"></a>
11
- <a href="https://www.npmjs.com/package/next"><img alt="NPM version" src="https://img.shields.io/npm/v/next.svg?style=for-the-badge&labelColor=000000"></a>
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
- </div>
6
+ ## What's new
16
7
 
17
- ## Getting Started
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
- Used by some of the world's largest companies, Next.js enables you to create full-stack web applications by extending the latest React features, and integrating powerful Rust-based JavaScript tooling for the fastest builds.
12
+ ## Install
20
13
 
21
- - Visit our [Learn Next.js](https://nextjs.org/learn) course to get started with Next.js.
22
- - Visit the [Next.js Showcase](https://nextjs.org/showcase) to see more sites built with Next.js.
14
+ ```bash
15
+ npm i next-hybrid
16
+ ```
23
17
 
24
- ## Documentation
18
+ ## Example
25
19
 
26
- Visit [https://nextjs.org/docs](https://nextjs.org/docs) to view the full documentation.
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
- ## Community
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
- The Next.js community can be found on [GitHub Discussions](https://github.com/vercel/next.js/discussions) where you can ask questions, voice ideas, and share your projects with other people.
36
+ ## Repository
31
37
 
32
- To chat with other community members you can join the Next.js [Discord](https://nextjs.org/discord) server.
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
@@ -1 +1 @@
1
- 5cee85938433557dbfd3b3bf90dec6c1df561747
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.0"}`, '-v, --version', 'Outputs the Next.js version.');
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.0" || 'unknown';
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);
@@ -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.0"
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.0");
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.0",
2563
+ nextVersion: "16.1.1-hybrid.1",
2564
2564
  tracingRoot: outputFileTracingRoot,
2565
2565
  hasNodeMiddleware,
2566
2566
  hasInstrumentationHook,
@@ -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.0";
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.0",
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.0"}|${configVars}`,
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.0"}|${configVars}`
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.0";
18
+ const version = "16.1.1-hybrid.1";
19
19
  window.next = {
20
20
  version,
21
21
  appDir: true
@@ -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.0";
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);