next 13.4.17-canary.1 → 13.4.17

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/dist/bin/next CHANGED
@@ -76,7 +76,7 @@ const args = (0, _index.default)({
76
76
  });
77
77
  // Version is inlined into the file using taskr build pipeline
78
78
  if (args["--version"]) {
79
- console.log(`Next.js v${"13.4.17-canary.1"}`);
79
+ console.log(`Next.js v${"13.4.17"}`);
80
80
  process.exit(0);
81
81
  }
82
82
  // Check if we are running `next <subcommand>` or `next`
@@ -138,7 +138,7 @@ async function build(dir, reactProductionProfiling = false, debugOutput = false,
138
138
  let hasAppDir = false;
139
139
  try {
140
140
  const nextBuildSpan = (0, _trace.trace)("next-build", undefined, {
141
- version: "13.4.17-canary.1"
141
+ version: "13.4.17"
142
142
  });
143
143
  _buildcontext.NextBuildContext.nextBuildSpan = nextBuildSpan;
144
144
  _buildcontext.NextBuildContext.dir = dir;
@@ -131,7 +131,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
131
131
  }
132
132
  return newObj;
133
133
  }
134
- const nextVersion = "13.4.17-canary.1";
134
+ const nextVersion = "13.4.17";
135
135
  const ArchName = (0, _os.arch)();
136
136
  const PlatformName = (0, _os.platform)();
137
137
  const infoLog = (...args)=>{
@@ -31,11 +31,51 @@ Object.defineProperty(exports, "__esModule", {
31
31
  const _vm = /*#__PURE__*/ _interop_require_default(require("vm"));
32
32
  const _index = require("./index");
33
33
  const _options = require("./options");
34
+ const _jestdocblock = /*#__PURE__*/ _interop_require_wildcard(require("next/dist/compiled/jest-docblock"));
34
35
  function _interop_require_default(obj) {
35
36
  return obj && obj.__esModule ? obj : {
36
37
  default: obj
37
38
  };
38
39
  }
40
+ function _getRequireWildcardCache(nodeInterop) {
41
+ if (typeof WeakMap !== "function") return null;
42
+ var cacheBabelInterop = new WeakMap();
43
+ var cacheNodeInterop = new WeakMap();
44
+ return (_getRequireWildcardCache = function(nodeInterop) {
45
+ return nodeInterop ? cacheNodeInterop : cacheBabelInterop;
46
+ })(nodeInterop);
47
+ }
48
+ function _interop_require_wildcard(obj, nodeInterop) {
49
+ if (!nodeInterop && obj && obj.__esModule) {
50
+ return obj;
51
+ }
52
+ if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
53
+ return {
54
+ default: obj
55
+ };
56
+ }
57
+ var cache = _getRequireWildcardCache(nodeInterop);
58
+ if (cache && cache.has(obj)) {
59
+ return cache.get(obj);
60
+ }
61
+ var newObj = {};
62
+ var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
63
+ for(var key in obj){
64
+ if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
65
+ var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
66
+ if (desc && (desc.get || desc.set)) {
67
+ Object.defineProperty(newObj, key, desc);
68
+ } else {
69
+ newObj[key] = obj[key];
70
+ }
71
+ }
72
+ }
73
+ newObj.default = obj;
74
+ if (cache) {
75
+ cache.set(obj, newObj);
76
+ }
77
+ return newObj;
78
+ }
39
79
  // Jest use the `vm` [Module API](https://nodejs.org/api/vm.html#vm_class_vm_module) for ESM.
40
80
  // see https://github.com/facebook/jest/issues/9430
41
81
  const isSupportEsm = "Module" in _vm.default;
@@ -46,13 +86,20 @@ function isEsm(isEsmProject, filename, jestConfig) {
46
86
  var _jestConfig_extensionsToTreatAsEsm;
47
87
  return /\.jsx?$/.test(filename) && isEsmProject || ((_jestConfig_extensionsToTreatAsEsm = jestConfig.extensionsToTreatAsEsm) == null ? void 0 : _jestConfig_extensionsToTreatAsEsm.some((ext)=>filename.endsWith(ext)));
48
88
  }
89
+ function getTestEnvironment(src, jestConfig) {
90
+ const docblockPragmas = _jestdocblock.parse(_jestdocblock.extract(src));
91
+ const pragma = docblockPragmas["jest-environment"];
92
+ const environment = (Array.isArray(pragma) ? pragma[0] : pragma) ?? jestConfig.testEnvironment;
93
+ return environment;
94
+ }
49
95
  const createTransformer = (inputOptions)=>{
50
96
  return {
51
97
  process (src, filename, jestOptions) {
52
98
  const jestConfig = getJestConfig(jestOptions);
99
+ const testEnvironment = getTestEnvironment(src, jestConfig);
53
100
  const swcTransformOpts = (0, _options.getJestSWCOptions)({
54
- // Always target server when compiling during test, to pass server-only validations and allow testing pages with metadatas
55
- isServer: true,
101
+ // When target is node it's similar to the server option set in SWC.
102
+ isServer: testEnvironment === "node" || testEnvironment.includes("jest-environment-node"),
56
103
  filename,
57
104
  jsConfig: inputOptions == null ? void 0 : inputOptions.jsConfig,
58
105
  resolvedBaseUrl: inputOptions == null ? void 0 : inputOptions.resolvedBaseUrl,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/build/swc/jest-transformer.ts"],"names":["isSupportEsm","vm","getJestConfig","jestConfig","config","isEsm","isEsmProject","filename","test","extensionsToTreatAsEsm","some","ext","endsWith","createTransformer","inputOptions","process","src","jestOptions","swcTransformOpts","getJestSWCOptions","isServer","jsConfig","resolvedBaseUrl","pagesDir","hasServerComponents","modularizeImports","swcPlugins","compilerOptions","esm","Boolean","transformSync","module","exports"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;;;;2DAEe;uBACe;yBACI;;;;;;AAqBlC,6FAA6F;AAC7F,mDAAmD;AACnD,MAAMA,eAAe,YAAYC,WAAE;AAEnC,SAASC,cACPC,UAAmD,EAC7B;IACtB,OAAO,YAAYA,aAEfA,WAAWC,MAAM,GAEhBD,UAA8C;AACrD;AAEA,SAASE,MACPC,YAAqB,EACrBC,QAAgB,EAChBJ,UAAgC,EACvB;QAGPA;IAFF,OACE,AAAC,UAAUK,IAAI,CAACD,aAAaD,iBAC7BH,CAAAA,qCAAAA,WAAWM,sBAAsB,YAAjCN,KAAAA,IAAAA,mCAAmCO,KAAK,CAACC,MACvCJ,SAASK,QAAQ,CAACD;AAGxB;AAEA,MAAME,oBAGF,CAACC;IAAkB,OAAA;QACrBC,SAAQC,GAAG,EAAET,QAAQ,EAAEU,WAAW,EAAE;YAClC,MAAMd,aAAaD,cAAce;YAEjC,MAAMC,mBAAmBC,IAAAA,0BAAiB,EAAC;gBACzC,0HAA0H;gBAC1HC,UAAU,IAAI;gBACdb;gBACAc,UAAUP,uBAAAA,KAAAA,IAAAA,aAAcO,QAAQ;gBAChCC,iBAAiBR,uBAAAA,KAAAA,IAAAA,aAAcQ,eAAe;gBAC9CC,UAAUT,uBAAAA,KAAAA,IAAAA,aAAcS,QAAQ;gBAChCC,qBAAqBV,uBAAAA,KAAAA,IAAAA,aAAcU,mBAAmB;gBACtDC,mBAAmBX,uBAAAA,KAAAA,IAAAA,aAAcW,iBAAiB;gBAClDC,YAAYZ,uBAAAA,KAAAA,IAAAA,aAAcY,UAAU;gBACpCC,iBAAiBb,uBAAAA,KAAAA,IAAAA,aAAca,eAAe;gBAC9CC,KACE5B,gBACAK,MAAMwB,QAAQf,uBAAAA,KAAAA,IAAAA,aAAcR,YAAY,GAAGC,UAAUJ;YACzD;YAEA,OAAO2B,IAAAA,oBAAa,EAACd,KAAK;gBAAE,GAAGE,gBAAgB;gBAAEX;YAAS;QAC5D;IACF;;AAEAwB,OAAOC,OAAO,GAAG;IAAEnB;AAAkB"}
1
+ {"version":3,"sources":["../../../src/build/swc/jest-transformer.ts"],"names":["isSupportEsm","vm","getJestConfig","jestConfig","config","isEsm","isEsmProject","filename","test","extensionsToTreatAsEsm","some","ext","endsWith","getTestEnvironment","src","docblockPragmas","docblock","parse","extract","pragma","environment","Array","isArray","testEnvironment","createTransformer","inputOptions","process","jestOptions","swcTransformOpts","getJestSWCOptions","isServer","includes","jsConfig","resolvedBaseUrl","pagesDir","hasServerComponents","modularizeImports","swcPlugins","compilerOptions","esm","Boolean","transformSync","module","exports"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA;;;;2DAEe;uBACe;yBACI;sEACR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAqB1B,6FAA6F;AAC7F,mDAAmD;AACnD,MAAMA,eAAe,YAAYC,WAAE;AAEnC,SAASC,cACPC,UAAmD,EAC7B;IACtB,OAAO,YAAYA,aAEfA,WAAWC,MAAM,GAEhBD,UAA8C;AACrD;AAEA,SAASE,MACPC,YAAqB,EACrBC,QAAgB,EAChBJ,UAAgC,EACvB;QAGPA;IAFF,OACE,AAAC,UAAUK,IAAI,CAACD,aAAaD,iBAC7BH,CAAAA,qCAAAA,WAAWM,sBAAsB,YAAjCN,KAAAA,IAAAA,mCAAmCO,KAAK,CAACC,MACvCJ,SAASK,QAAQ,CAACD;AAGxB;AAEA,SAASE,mBACPC,GAAW,EACXX,UAAgC,EACxB;IACR,MAAMY,kBAAkBC,cAASC,KAAK,CAACD,cAASE,OAAO,CAACJ;IACxD,MAAMK,SAASJ,eAAe,CAAC,mBAAmB;IAClD,MAAMK,cACJ,AAACC,CAAAA,MAAMC,OAAO,CAACH,UAAUA,MAAM,CAAC,EAAE,GAAGA,MAAM,AAAD,KAAMhB,WAAWoB,eAAe;IAC5E,OAAOH;AACT;AAEA,MAAMI,oBAGF,CAACC;IAAkB,OAAA;QACrBC,SAAQZ,GAAG,EAAEP,QAAQ,EAAEoB,WAAW,EAAE;YAClC,MAAMxB,aAAaD,cAAcyB;YACjC,MAAMJ,kBAAkBV,mBAAmBC,KAAKX;YAEhD,MAAMyB,mBAAmBC,IAAAA,0BAAiB,EAAC;gBACzC,oEAAoE;gBACpEC,UACEP,oBAAoB,UACpBA,gBAAgBQ,QAAQ,CAAC;gBAC3BxB;gBACAyB,UAAUP,uBAAAA,KAAAA,IAAAA,aAAcO,QAAQ;gBAChCC,iBAAiBR,uBAAAA,KAAAA,IAAAA,aAAcQ,eAAe;gBAC9CC,UAAUT,uBAAAA,KAAAA,IAAAA,aAAcS,QAAQ;gBAChCC,qBAAqBV,uBAAAA,KAAAA,IAAAA,aAAcU,mBAAmB;gBACtDC,mBAAmBX,uBAAAA,KAAAA,IAAAA,aAAcW,iBAAiB;gBAClDC,YAAYZ,uBAAAA,KAAAA,IAAAA,aAAcY,UAAU;gBACpCC,iBAAiBb,uBAAAA,KAAAA,IAAAA,aAAca,eAAe;gBAC9CC,KACEvC,gBACAK,MAAMmC,QAAQf,uBAAAA,KAAAA,IAAAA,aAAcnB,YAAY,GAAGC,UAAUJ;YACzD;YAEA,OAAOsC,IAAAA,oBAAa,EAAC3B,KAAK;gBAAE,GAAGc,gBAAgB;gBAAErB;YAAS;QAC5D;IACF;;AAEAmC,OAAOC,OAAO,GAAG;IAAEnB;AAAkB"}
@@ -1842,7 +1842,7 @@ async function getBaseWebpackConfig(dir, { buildId , config , compilerType , dev
1842
1842
  new _wellknownerrorsplugin.WellKnownErrorsPlugin(),
1843
1843
  isClient && new _copyfileplugin.CopyFilePlugin({
1844
1844
  filePath: require.resolve("./polyfills/polyfill-nomodule"),
1845
- cacheKey: "13.4.17-canary.1",
1845
+ cacheKey: "13.4.17",
1846
1846
  name: `static/chunks/polyfills${dev ? "" : "-[hash]"}.js`,
1847
1847
  minimize: false,
1848
1848
  info: {
@@ -2068,7 +2068,7 @@ async function getBaseWebpackConfig(dir, { buildId , config , compilerType , dev
2068
2068
  // Includes:
2069
2069
  // - Next.js version
2070
2070
  // - next.config.js keys that affect compilation
2071
- version: `${"13.4.17-canary.1"}|${configVars}`,
2071
+ version: `${"13.4.17"}|${configVars}`,
2072
2072
  cacheDirectory: _path.default.join(distDir, "cache", "webpack"),
2073
2073
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
2074
2074
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -13,7 +13,7 @@ Object.defineProperty(exports, "appBootstrap", {
13
13
  return appBootstrap;
14
14
  }
15
15
  });
16
- const version = "13.4.17-canary.1";
16
+ const version = "13.4.17";
17
17
  window.next = {
18
18
  version,
19
19
  appDir: true
@@ -60,7 +60,7 @@ const _hooksclientcontext = require("../shared/lib/hooks-client-context");
60
60
  const _onrecoverableerror = /*#__PURE__*/ _interop_require_default._(require("./on-recoverable-error"));
61
61
  const _tracer = /*#__PURE__*/ _interop_require_default._(require("./tracing/tracer"));
62
62
  const _reporttosocket = /*#__PURE__*/ _interop_require_default._(require("./tracing/report-to-socket"));
63
- const version = "13.4.17-canary.1";
63
+ const version = "13.4.17";
64
64
  let router;
65
65
  const emitter = (0, _mitt.default)();
66
66
  const looseToArray = (input)=>[].slice.call(input);
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Meta Platforms, Inc. and affiliates.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ (()=>{"use strict";var e={381:e=>{const detectNewline=e=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}const t=e.match(/(?:\r?\n)/g)||[];if(t.length===0){return}const r=t.filter((e=>e==="\r\n")).length;const n=t.length-r;return r>n?"\r\n":"\n"};e.exports=detectNewline;e.exports.graceful=e=>typeof e==="string"&&detectNewline(e)||"\n"},37:e=>{e.exports=require("os")}};var t={};function __nccwpck_require__(r){var n=t[r];if(n!==undefined){return n.exports}var s=t[r]={exports:{}};var c=true;try{e[r](s,s.exports,__nccwpck_require__);c=false}finally{if(c)delete t[r]}return s.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var r={};(()=>{var e=r;Object.defineProperty(e,"__esModule",{value:true});e.extract=extract;e.parse=parse;e.parseWithComments=parseWithComments;e.print=print;e.strip=strip;function _os(){const e=__nccwpck_require__(37);_os=function(){return e};return e}function _detectNewline(){const e=_interopRequireDefault(__nccwpck_require__(381));_detectNewline=function(){return e};return e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}const t=/\*\/$/;const n=/^\/\*\*?/;const s=/^\s*(\/\*\*?(.|\r?\n)*?\*\/)/;const c=/(^|\s+)\/\/([^\r\n]*)/g;const o=/^(\r?\n)+/;const i=/(?:^|\r?\n) *(@[^\r\n]*?) *\r?\n *(?![^@\r\n]*\/\/[^]*)([^@\r\n\s][^@\r\n]+?) *\r?\n/g;const a=/(?:^|\r?\n) *@(\S+) *([^\r\n]*)/g;const u=/(\r?\n|^) *\* ?/g;const p=[];function extract(e){const t=e.match(s);return t?t[0].trimLeft():""}function strip(e){const t=e.match(s);return t&&t[0]?e.substring(t[0].length):e}function parse(e){return parseWithComments(e).pragmas}function parseWithComments(e){const r=(0,_detectNewline().default)(e)??_os().EOL;e=e.replace(n,"").replace(t,"").replace(u,"$1");let s="";while(s!==e){s=e;e=e.replace(i,`${r}$1 $2${r}`)}e=e.replace(o,"").trimRight();const _=Object.create(null);const l=e.replace(a,"").replace(o,"").trimRight();let f;while(f=a.exec(e)){const e=f[2].replace(c,"");if(typeof _[f[1]]==="string"||Array.isArray(_[f[1]])){_[f[1]]=p.concat(_[f[1]],e)}else{_[f[1]]=e}}return{comments:l,pragmas:_}}function print({comments:e="",pragmas:t={}}){const r=(0,_detectNewline().default)(e)??_os().EOL;const n="/**";const s=" *";const c=" */";const o=Object.keys(t);const i=o.map((e=>printKeyValues(e,t[e]))).reduce(((e,t)=>e.concat(t)),[]).map((e=>`${s} ${e}${r}`)).join("");if(!e){if(o.length===0){return""}if(o.length===1&&!Array.isArray(t[o[0]])){const e=t[o[0]];return`${n} ${printKeyValues(o[0],e)[0]}${c}`}}const a=e.split(r).map((e=>`${s} ${e}`)).join(r)+r;return n+r+(e?a:"")+(e&&o.length?s+r:"")+i+c}function printKeyValues(e,t){return p.concat(t).map((t=>`@${e} ${t}`.trim()))}})();module.exports=r})();
@@ -0,0 +1 @@
1
+ {"name":"jest-docblock","main":"index.js","license":"MIT"}
@@ -84,7 +84,7 @@ export default async function build(dir, reactProductionProfiling = false, debug
84
84
  let hasAppDir = false;
85
85
  try {
86
86
  const nextBuildSpan = trace("next-build", undefined, {
87
- version: "13.4.17-canary.1"
87
+ version: "13.4.17"
88
88
  });
89
89
  NextBuildContext.nextBuildSpan = nextBuildSpan;
90
90
  NextBuildContext.dir = dir;
@@ -9,7 +9,7 @@ import { patchIncorrectLockfile } from "../../lib/patch-incorrect-lockfile";
9
9
  import { downloadWasmSwc, downloadNativeNextSwc } from "../../lib/download-swc";
10
10
  import { spawn } from "child_process";
11
11
  import { isDeepStrictEqual } from "util";
12
- const nextVersion = "13.4.17-canary.1";
12
+ const nextVersion = "13.4.17";
13
13
  const ArchName = arch();
14
14
  const PlatformName = platform();
15
15
  const infoLog = (...args)=>{
@@ -27,6 +27,7 @@ DEALINGS IN THE SOFTWARE.
27
27
  */ import vm from "vm";
28
28
  import { transformSync } from "./index";
29
29
  import { getJestSWCOptions } from "./options";
30
+ import * as docblock from "next/dist/compiled/jest-docblock";
30
31
  // Jest use the `vm` [Module API](https://nodejs.org/api/vm.html#vm_class_vm_module) for ESM.
31
32
  // see https://github.com/facebook/jest/issues/9430
32
33
  const isSupportEsm = "Module" in vm;
@@ -37,13 +38,20 @@ function isEsm(isEsmProject, filename, jestConfig) {
37
38
  var _jestConfig_extensionsToTreatAsEsm;
38
39
  return /\.jsx?$/.test(filename) && isEsmProject || ((_jestConfig_extensionsToTreatAsEsm = jestConfig.extensionsToTreatAsEsm) == null ? void 0 : _jestConfig_extensionsToTreatAsEsm.some((ext)=>filename.endsWith(ext)));
39
40
  }
41
+ function getTestEnvironment(src, jestConfig) {
42
+ const docblockPragmas = docblock.parse(docblock.extract(src));
43
+ const pragma = docblockPragmas["jest-environment"];
44
+ const environment = (Array.isArray(pragma) ? pragma[0] : pragma) ?? jestConfig.testEnvironment;
45
+ return environment;
46
+ }
40
47
  const createTransformer = (inputOptions)=>{
41
48
  return {
42
49
  process (src, filename, jestOptions) {
43
50
  const jestConfig = getJestConfig(jestOptions);
51
+ const testEnvironment = getTestEnvironment(src, jestConfig);
44
52
  const swcTransformOpts = getJestSWCOptions({
45
- // Always target server when compiling during test, to pass server-only validations and allow testing pages with metadatas
46
- isServer: true,
53
+ // When target is node it's similar to the server option set in SWC.
54
+ isServer: testEnvironment === "node" || testEnvironment.includes("jest-environment-node"),
47
55
  filename,
48
56
  jsConfig: inputOptions == null ? void 0 : inputOptions.jsConfig,
49
57
  resolvedBaseUrl: inputOptions == null ? void 0 : inputOptions.resolvedBaseUrl,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/build/swc/jest-transformer.ts"],"names":["vm","transformSync","getJestSWCOptions","isSupportEsm","getJestConfig","jestConfig","config","isEsm","isEsmProject","filename","test","extensionsToTreatAsEsm","some","ext","endsWith","createTransformer","inputOptions","process","src","jestOptions","swcTransformOpts","isServer","jsConfig","resolvedBaseUrl","pagesDir","hasServerComponents","modularizeImports","swcPlugins","compilerOptions","esm","Boolean","module","exports"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,GAEA,OAAOA,QAAQ,KAAI;AACnB,SAASC,aAAa,QAAQ,UAAS;AACvC,SAASC,iBAAiB,QAAQ,YAAW;AAqB7C,6FAA6F;AAC7F,mDAAmD;AACnD,MAAMC,eAAe,YAAYH;AAEjC,SAASI,cACPC,UAAmD,EAC7B;IACtB,OAAO,YAAYA,aAEfA,WAAWC,MAAM,GAEhBD,UAA8C;AACrD;AAEA,SAASE,MACPC,YAAqB,EACrBC,QAAgB,EAChBJ,UAAgC,EACvB;QAGPA;IAFF,OACE,AAAC,UAAUK,IAAI,CAACD,aAAaD,iBAC7BH,CAAAA,qCAAAA,WAAWM,sBAAsB,YAAjCN,KAAAA,IAAAA,mCAAmCO,KAAK,CAACC,MACvCJ,SAASK,QAAQ,CAACD;AAGxB;AAEA,MAAME,oBAGF,CAACC;IAAkB,OAAA;QACrBC,SAAQC,GAAG,EAAET,QAAQ,EAAEU,WAAW,EAAE;YAClC,MAAMd,aAAaD,cAAce;YAEjC,MAAMC,mBAAmBlB,kBAAkB;gBACzC,0HAA0H;gBAC1HmB,UAAU,IAAI;gBACdZ;gBACAa,UAAUN,uBAAAA,KAAAA,IAAAA,aAAcM,QAAQ;gBAChCC,iBAAiBP,uBAAAA,KAAAA,IAAAA,aAAcO,eAAe;gBAC9CC,UAAUR,uBAAAA,KAAAA,IAAAA,aAAcQ,QAAQ;gBAChCC,qBAAqBT,uBAAAA,KAAAA,IAAAA,aAAcS,mBAAmB;gBACtDC,mBAAmBV,uBAAAA,KAAAA,IAAAA,aAAcU,iBAAiB;gBAClDC,YAAYX,uBAAAA,KAAAA,IAAAA,aAAcW,UAAU;gBACpCC,iBAAiBZ,uBAAAA,KAAAA,IAAAA,aAAcY,eAAe;gBAC9CC,KACE1B,gBACAI,MAAMuB,QAAQd,uBAAAA,KAAAA,IAAAA,aAAcR,YAAY,GAAGC,UAAUJ;YACzD;YAEA,OAAOJ,cAAciB,KAAK;gBAAE,GAAGE,gBAAgB;gBAAEX;YAAS;QAC5D;IACF;;AAEAsB,OAAOC,OAAO,GAAG;IAAEjB;AAAkB"}
1
+ {"version":3,"sources":["../../../src/build/swc/jest-transformer.ts"],"names":["vm","transformSync","getJestSWCOptions","docblock","isSupportEsm","getJestConfig","jestConfig","config","isEsm","isEsmProject","filename","test","extensionsToTreatAsEsm","some","ext","endsWith","getTestEnvironment","src","docblockPragmas","parse","extract","pragma","environment","Array","isArray","testEnvironment","createTransformer","inputOptions","process","jestOptions","swcTransformOpts","isServer","includes","jsConfig","resolvedBaseUrl","pagesDir","hasServerComponents","modularizeImports","swcPlugins","compilerOptions","esm","Boolean","module","exports"],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,GAEA,OAAOA,QAAQ,KAAI;AACnB,SAASC,aAAa,QAAQ,UAAS;AACvC,SAASC,iBAAiB,QAAQ,YAAW;AAC7C,YAAYC,cAAc,mCAAkC;AAqB5D,6FAA6F;AAC7F,mDAAmD;AACnD,MAAMC,eAAe,YAAYJ;AAEjC,SAASK,cACPC,UAAmD,EAC7B;IACtB,OAAO,YAAYA,aAEfA,WAAWC,MAAM,GAEhBD,UAA8C;AACrD;AAEA,SAASE,MACPC,YAAqB,EACrBC,QAAgB,EAChBJ,UAAgC,EACvB;QAGPA;IAFF,OACE,AAAC,UAAUK,IAAI,CAACD,aAAaD,iBAC7BH,CAAAA,qCAAAA,WAAWM,sBAAsB,YAAjCN,KAAAA,IAAAA,mCAAmCO,KAAK,CAACC,MACvCJ,SAASK,QAAQ,CAACD;AAGxB;AAEA,SAASE,mBACPC,GAAW,EACXX,UAAgC,EACxB;IACR,MAAMY,kBAAkBf,SAASgB,KAAK,CAAChB,SAASiB,OAAO,CAACH;IACxD,MAAMI,SAASH,eAAe,CAAC,mBAAmB;IAClD,MAAMI,cACJ,AAACC,CAAAA,MAAMC,OAAO,CAACH,UAAUA,MAAM,CAAC,EAAE,GAAGA,MAAM,AAAD,KAAMf,WAAWmB,eAAe;IAC5E,OAAOH;AACT;AAEA,MAAMI,oBAGF,CAACC;IAAkB,OAAA;QACrBC,SAAQX,GAAG,EAAEP,QAAQ,EAAEmB,WAAW,EAAE;YAClC,MAAMvB,aAAaD,cAAcwB;YACjC,MAAMJ,kBAAkBT,mBAAmBC,KAAKX;YAEhD,MAAMwB,mBAAmB5B,kBAAkB;gBACzC,oEAAoE;gBACpE6B,UACEN,oBAAoB,UACpBA,gBAAgBO,QAAQ,CAAC;gBAC3BtB;gBACAuB,UAAUN,uBAAAA,KAAAA,IAAAA,aAAcM,QAAQ;gBAChCC,iBAAiBP,uBAAAA,KAAAA,IAAAA,aAAcO,eAAe;gBAC9CC,UAAUR,uBAAAA,KAAAA,IAAAA,aAAcQ,QAAQ;gBAChCC,qBAAqBT,uBAAAA,KAAAA,IAAAA,aAAcS,mBAAmB;gBACtDC,mBAAmBV,uBAAAA,KAAAA,IAAAA,aAAcU,iBAAiB;gBAClDC,YAAYX,uBAAAA,KAAAA,IAAAA,aAAcW,UAAU;gBACpCC,iBAAiBZ,uBAAAA,KAAAA,IAAAA,aAAcY,eAAe;gBAC9CC,KACEpC,gBACAI,MAAMiC,QAAQd,uBAAAA,KAAAA,IAAAA,aAAclB,YAAY,GAAGC,UAAUJ;YACzD;YAEA,OAAOL,cAAcgB,KAAK;gBAAE,GAAGa,gBAAgB;gBAAEpB;YAAS;QAC5D;IACF;;AAEAgC,OAAOC,OAAO,GAAG;IAAEjB;AAAkB"}
@@ -1740,7 +1740,7 @@ export default async function getBaseWebpackConfig(dir, { buildId , config , com
1740
1740
  new WellKnownErrorsPlugin(),
1741
1741
  isClient && new CopyFilePlugin({
1742
1742
  filePath: require.resolve("./polyfills/polyfill-nomodule"),
1743
- cacheKey: "13.4.17-canary.1",
1743
+ cacheKey: "13.4.17",
1744
1744
  name: `static/chunks/polyfills${dev ? "" : "-[hash]"}.js`,
1745
1745
  minimize: false,
1746
1746
  info: {
@@ -1966,7 +1966,7 @@ export default async function getBaseWebpackConfig(dir, { buildId , config , com
1966
1966
  // Includes:
1967
1967
  // - Next.js version
1968
1968
  // - next.config.js keys that affect compilation
1969
- version: `${"13.4.17-canary.1"}|${configVars}`,
1969
+ version: `${"13.4.17"}|${configVars}`,
1970
1970
  cacheDirectory: path.join(distDir, "cache", "webpack"),
1971
1971
  // For production builds, it's more efficient to compress all cache files together instead of compression each one individually.
1972
1972
  // So we disable compression here and allow the build runner to take care of compressing the cache as a whole.
@@ -3,7 +3,7 @@
3
3
  * sure the following scripts are executed in the correct order:
4
4
  * - Polyfills
5
5
  * - next/script with `beforeInteractive` strategy
6
- */ const version = "13.4.17-canary.1";
6
+ */ const version = "13.4.17";
7
7
  window.next = {
8
8
  version,
9
9
  appDir: true
@@ -25,7 +25,7 @@ import { SearchParamsContext } from "../shared/lib/hooks-client-context";
25
25
  import onRecoverableError from "./on-recoverable-error";
26
26
  import tracer from "./tracing/tracer";
27
27
  import reportToSocket from "./tracing/report-to-socket";
28
- export const version = "13.4.17-canary.1";
28
+ export const version = "13.4.17";
29
29
  export let router;
30
30
  export const emitter = mitt();
31
31
  const looseToArray = (input)=>[].slice.call(input);
@@ -145,7 +145,7 @@ export default class HotReloader {
145
145
  this.previewProps = previewProps;
146
146
  this.rewrites = rewrites;
147
147
  this.hotReloaderSpan = trace("hot-reloader", undefined, {
148
- version: "13.4.17-canary.1"
148
+ version: "13.4.17"
149
149
  });
150
150
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
151
151
  // of the current `next dev` invocation.
@@ -215,7 +215,7 @@ class HotReloader {
215
215
  this.previewProps = previewProps;
216
216
  this.rewrites = rewrites;
217
217
  this.hotReloaderSpan = (0, _trace.trace)("hot-reloader", undefined, {
218
- version: "13.4.17-canary.1"
218
+ version: "13.4.17"
219
219
  });
220
220
  // Ensure the hotReloaderSpan is flushed immediately as it's the parentSpan for all processing
221
221
  // of the current `next dev` invocation.
@@ -79,7 +79,7 @@ function getAnonymousMeta() {
79
79
  isWsl: _iswsl.default,
80
80
  isCI: _ciinfo.isCI,
81
81
  ciName: _ciinfo.isCI && _ciinfo.name || null,
82
- nextVersion: "13.4.17-canary.1"
82
+ nextVersion: "13.4.17"
83
83
  };
84
84
  return traits;
85
85
  }
@@ -11,11 +11,11 @@ Object.defineProperty(exports, "eventCliSessionStopped", {
11
11
  const EVENT_VERSION = "NEXT_CLI_SESSION_STOPPED";
12
12
  function eventCliSessionStopped(event) {
13
13
  // This should be an invariant, if it fails our build tooling is broken.
14
- if (typeof "13.4.17-canary.1" !== "string") {
14
+ if (typeof "13.4.17" !== "string") {
15
15
  return [];
16
16
  }
17
17
  const payload = {
18
- nextVersion: "13.4.17-canary.1",
18
+ nextVersion: "13.4.17",
19
19
  nodeVersion: process.version,
20
20
  cliCommand: event.cliCommand,
21
21
  durationMilliseconds: event.durationMilliseconds,
@@ -35,12 +35,12 @@ function hasBabelConfig(dir) {
35
35
  }
36
36
  function eventCliSession(dir, nextConfig, event) {
37
37
  // This should be an invariant, if it fails our build tooling is broken.
38
- if (typeof "13.4.17-canary.1" !== "string") {
38
+ if (typeof "13.4.17" !== "string") {
39
39
  return [];
40
40
  }
41
41
  const { images , i18n } = nextConfig || {};
42
42
  const payload = {
43
- nextVersion: "13.4.17-canary.1",
43
+ nextVersion: "13.4.17",
44
44
  nodeVersion: process.version,
45
45
  cliCommand: event.cliCommand,
46
46
  isSrcDir: event.isSrcDir,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "next",
3
- "version": "13.4.17-canary.1",
3
+ "version": "13.4.17",
4
4
  "description": "The React Framework",
5
5
  "main": "./dist/server/next.js",
6
6
  "license": "MIT",
@@ -89,7 +89,7 @@
89
89
  ]
90
90
  },
91
91
  "dependencies": {
92
- "@next/env": "13.4.17-canary.1",
92
+ "@next/env": "13.4.17",
93
93
  "@swc/helpers": "0.5.1",
94
94
  "busboy": "1.6.0",
95
95
  "caniuse-lite": "^1.0.30001406",
@@ -144,11 +144,11 @@
144
144
  "@mswjs/interceptors": "0.23.0",
145
145
  "@napi-rs/cli": "2.16.2",
146
146
  "@napi-rs/triples": "1.1.0",
147
- "@next/polyfill-module": "13.4.17-canary.1",
148
- "@next/polyfill-nomodule": "13.4.17-canary.1",
149
- "@next/react-dev-overlay": "13.4.17-canary.1",
150
- "@next/react-refresh-utils": "13.4.17-canary.1",
151
- "@next/swc": "13.4.17-canary.1",
147
+ "@next/polyfill-module": "13.4.17",
148
+ "@next/polyfill-nomodule": "13.4.17",
149
+ "@next/react-dev-overlay": "13.4.17",
150
+ "@next/react-refresh-utils": "13.4.17",
151
+ "@next/swc": "13.4.17",
152
152
  "@opentelemetry/api": "1.4.1",
153
153
  "@playwright/test": "^1.35.1",
154
154
  "@segment/ajv-human-errors": "2.1.2",
@@ -242,6 +242,7 @@
242
242
  "image-size": "1.0.0",
243
243
  "is-docker": "2.0.0",
244
244
  "is-wsl": "2.2.0",
245
+ "jest-docblock": "29.4.3",
245
246
  "jest-worker": "27.0.0-next.5",
246
247
  "json5": "2.2.3",
247
248
  "jsonwebtoken": "9.0.0",
@@ -318,14 +319,14 @@
318
319
  "node": ">=16.8.0"
319
320
  },
320
321
  "optionalDependencies": {
321
- "@next/swc-darwin-arm64": "13.4.17-canary.1",
322
- "@next/swc-darwin-x64": "13.4.17-canary.1",
323
- "@next/swc-linux-arm64-gnu": "13.4.17-canary.1",
324
- "@next/swc-linux-arm64-musl": "13.4.17-canary.1",
325
- "@next/swc-linux-x64-gnu": "13.4.17-canary.1",
326
- "@next/swc-linux-x64-musl": "13.4.17-canary.1",
327
- "@next/swc-win32-arm64-msvc": "13.4.17-canary.1",
328
- "@next/swc-win32-ia32-msvc": "13.4.17-canary.1",
329
- "@next/swc-win32-x64-msvc": "13.4.17-canary.1"
322
+ "@next/swc-darwin-arm64": "13.4.17",
323
+ "@next/swc-darwin-x64": "13.4.17",
324
+ "@next/swc-linux-arm64-gnu": "13.4.17",
325
+ "@next/swc-linux-arm64-musl": "13.4.17",
326
+ "@next/swc-linux-x64-gnu": "13.4.17",
327
+ "@next/swc-linux-x64-musl": "13.4.17",
328
+ "@next/swc-win32-arm64-msvc": "13.4.17",
329
+ "@next/swc-win32-ia32-msvc": "13.4.17",
330
+ "@next/swc-win32-x64-msvc": "13.4.17"
330
331
  }
331
332
  }