@vercel/build-utils 2.16.1-canary.1 → 2.16.1-canary.4

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.
@@ -1,8 +1,8 @@
1
1
  import { NodeVersion } from '../types';
2
2
  export declare function getLatestNodeVersion(): {
3
- readonly major: 14;
4
- readonly range: "14.x";
5
- readonly runtime: "nodejs14.x";
3
+ readonly major: 16;
4
+ readonly range: "16.x";
5
+ readonly runtime: "nodejs16.x";
6
6
  };
7
7
  export declare function getDiscontinuedNodeVersions(): NodeVersion[];
8
8
  export declare function getSupportedNodeVersion(engineRange: string | undefined, isAuto?: boolean): Promise<NodeVersion>;
@@ -8,6 +8,7 @@ const semver_1 = require("semver");
8
8
  const errors_1 = require("../errors");
9
9
  const debug_1 = __importDefault(require("../debug"));
10
10
  const allOptions = [
11
+ { major: 16, range: '16.x', runtime: 'nodejs16.x' },
11
12
  { major: 14, range: '14.x', runtime: 'nodejs14.x' },
12
13
  { major: 12, range: '12.x', runtime: 'nodejs12.x' },
13
14
  {
@@ -136,10 +136,6 @@ async function getNodeVersion(destPath, _nodeVersion, config = {}, meta = {}) {
136
136
  const latest = node_version_1.getLatestNodeVersion();
137
137
  return { ...latest, runtime: 'nodejs' };
138
138
  }
139
- if (process.env.ENABLE_EXPERIMENTAL_NODE16 === '1') {
140
- console.warn('Warning: Using experimental Node.js 16.x due to ENABLE_EXPERIMENTAL_NODE16=1');
141
- return { major: 16, range: '16.x', runtime: 'nodejs16.x' };
142
- }
143
139
  const { packageJson } = await scanParentDirs(destPath, true);
144
140
  let { nodeVersion } = config;
145
141
  let isAuto = true;
@@ -312,6 +308,15 @@ function getEnvForPackageManager({ cliType, lockfileVersion, nodeVersion, env, }
312
308
  console.log('Detected `package-lock.json` generated by npm 7...');
313
309
  }
314
310
  }
311
+ else if (cliType === 'pnpm') {
312
+ if (typeof lockfileVersion === 'number' &&
313
+ lockfileVersion === 5.4 &&
314
+ ((nodeVersion === null || nodeVersion === void 0 ? void 0 : nodeVersion.major) || 0) > 12) {
315
+ // Ensure that pnpm 7 is at the beginning of the `$PATH`
316
+ newEnv.PATH = `/pnpm7/pnpm:${env.PATH}`;
317
+ console.log('Detected `pnpm-lock.yaml` generated by pnpm 7...');
318
+ }
319
+ }
315
320
  else {
316
321
  // Yarn v2 PnP mode may be activated, so force "node-modules" linker style
317
322
  if (!env.YARN_NODE_LINKER) {
package/dist/index.js CHANGED
@@ -27001,8 +27001,7 @@ exports.frameworks = [
27001
27001
  detectors: {
27002
27002
  every: [
27003
27003
  {
27004
- path: 'package.json',
27005
- matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"remix":\\s*".+?"[^}]*}',
27004
+ path: 'remix.config.js',
27006
27005
  },
27007
27006
  ],
27008
27007
  },
@@ -27058,6 +27057,70 @@ exports.frameworks = [
27058
27057
  },
27059
27058
  ],
27060
27059
  },
27060
+ {
27061
+ name: 'Astro',
27062
+ slug: 'astro',
27063
+ demo: 'https://astro-template.vercel.app',
27064
+ logo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/astro.svg',
27065
+ darkModeLogo: 'https://raw.githubusercontent.com/vercel/vercel/main/packages/frameworks/logos/astro-dark.svg',
27066
+ tagline: 'Astro is a new kind of static site builder for the modern web. Powerful developer experience meets lightweight output.',
27067
+ description: 'An Astro site, using the basics starter kit.',
27068
+ website: 'https://astro.build',
27069
+ envPrefix: 'PUBLIC_',
27070
+ detectors: {
27071
+ every: [
27072
+ {
27073
+ path: 'package.json',
27074
+ matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"astro":\\s*".+?"[^}]*}',
27075
+ },
27076
+ ],
27077
+ },
27078
+ settings: {
27079
+ installCommand: {
27080
+ placeholder: '`yarn install` or `npm install`',
27081
+ },
27082
+ buildCommand: {
27083
+ value: 'astro build',
27084
+ placeholder: '`npm run build` or `astro build`',
27085
+ },
27086
+ devCommand: {
27087
+ value: 'astro dev --port $PORT',
27088
+ placeholder: 'astro dev',
27089
+ },
27090
+ outputDirectory: {
27091
+ value: 'dist',
27092
+ },
27093
+ },
27094
+ dependency: 'astro',
27095
+ getFsOutputDir: async () => 'dist',
27096
+ getOutputDirName: async () => 'dist',
27097
+ defaultRoutes: [
27098
+ {
27099
+ src: '^/dist/(.*)$',
27100
+ headers: { 'cache-control': 'public, max-age=31536000, immutable' },
27101
+ continue: true,
27102
+ },
27103
+ {
27104
+ handle: 'filesystem',
27105
+ },
27106
+ {
27107
+ src: '/(.*)',
27108
+ dest: '/index.html',
27109
+ },
27110
+ ],
27111
+ defaultHeaders: [
27112
+ {
27113
+ source: '^/dist/(.*)$',
27114
+ regex: '^/dist/(.*)$',
27115
+ headers: [
27116
+ {
27117
+ key: 'cache-control',
27118
+ value: 'public, max-age=31536000, immutable',
27119
+ },
27120
+ ],
27121
+ },
27122
+ ],
27123
+ },
27061
27124
  {
27062
27125
  name: 'Hexo',
27063
27126
  slug: 'hexo',
@@ -34700,6 +34763,7 @@ const semver_1 = __webpack_require__(2879);
34700
34763
  const errors_1 = __webpack_require__(3983);
34701
34764
  const debug_1 = __importDefault(__webpack_require__(1868));
34702
34765
  const allOptions = [
34766
+ { major: 16, range: '16.x', runtime: 'nodejs16.x' },
34703
34767
  { major: 14, range: '14.x', runtime: 'nodejs14.x' },
34704
34768
  { major: 12, range: '12.x', runtime: 'nodejs12.x' },
34705
34769
  {
@@ -34999,10 +35063,6 @@ async function getNodeVersion(destPath, _nodeVersion, config = {}, meta = {}) {
34999
35063
  const latest = node_version_1.getLatestNodeVersion();
35000
35064
  return { ...latest, runtime: 'nodejs' };
35001
35065
  }
35002
- if (process.env.ENABLE_EXPERIMENTAL_NODE16 === '1') {
35003
- console.warn('Warning: Using experimental Node.js 16.x due to ENABLE_EXPERIMENTAL_NODE16=1');
35004
- return { major: 16, range: '16.x', runtime: 'nodejs16.x' };
35005
- }
35006
35066
  const { packageJson } = await scanParentDirs(destPath, true);
35007
35067
  let { nodeVersion } = config;
35008
35068
  let isAuto = true;
@@ -35175,6 +35235,15 @@ function getEnvForPackageManager({ cliType, lockfileVersion, nodeVersion, env, }
35175
35235
  console.log('Detected `package-lock.json` generated by npm 7...');
35176
35236
  }
35177
35237
  }
35238
+ else if (cliType === 'pnpm') {
35239
+ if (typeof lockfileVersion === 'number' &&
35240
+ lockfileVersion === 5.4 &&
35241
+ ((nodeVersion === null || nodeVersion === void 0 ? void 0 : nodeVersion.major) || 0) > 12) {
35242
+ // Ensure that pnpm 7 is at the beginning of the `$PATH`
35243
+ newEnv.PATH = `/pnpm7/pnpm:${env.PATH}`;
35244
+ console.log('Detected `pnpm-lock.yaml` generated by pnpm 7...');
35245
+ }
35246
+ }
35178
35247
  else {
35179
35248
  // Yarn v2 PnP mode may be activated, so force "node-modules" linker style
35180
35249
  if (!env.YARN_NODE_LINKER) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "2.16.1-canary.1",
3
+ "version": "2.16.1-canary.4",
4
4
  "license": "MIT",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -30,7 +30,7 @@
30
30
  "@types/node-fetch": "^2.1.6",
31
31
  "@types/semver": "6.0.0",
32
32
  "@types/yazl": "2.4.2",
33
- "@vercel/frameworks": "0.8.0",
33
+ "@vercel/frameworks": "0.8.1-canary.1",
34
34
  "@vercel/ncc": "0.24.0",
35
35
  "aggregate-error": "3.0.1",
36
36
  "async-retry": "1.2.3",
@@ -49,5 +49,5 @@
49
49
  "typescript": "4.3.4",
50
50
  "yazl": "2.5.1"
51
51
  },
52
- "gitHead": "f88c862e9d9d4ad385e54d5fecaa0306a6ed5612"
52
+ "gitHead": "ec57654b5bb44bca26ed665ec68995cca0948825"
53
53
  }