Compare commits

...

3 Commits

Author SHA1 Message Date
chloetedder
8814fc1515 Publish Stable
- @vercel/build-utils@5.5.3
 - vercel@28.4.5
 - @vercel/client@12.2.10
 - @vercel/fs-detectors@3.4.1
 - @vercel/go@2.2.11
 - @vercel/hydrogen@0.0.24
 - @vercel/next@3.2.1
 - @vercel/node@2.5.21
 - @vercel/python@3.1.20
 - @vercel/redwood@1.0.29
 - @vercel/remix@1.0.30
 - @vercel/ruby@1.3.37
 - @vercel/static-build@1.0.29
2022-09-28 10:14:27 -05:00
chloetedder
0d044b4eac [fs-detectors] Use json5 parser for Rush to have valid json parsing (#8645)
### Related Issues

Parse `rush.json` files with `json5` because it is very common for these
to have comments in them

[Template for people to clone for
Rush](https://rushjs.io/pages/configs/rush_json/) which has comments in
it as a default which most people will clone
 
Docs of Rush showing to not use `JSON.parse`

https://rushjs.io/pages/help/faq/#why-do-rushs-json-config-files-contain--comments-that-github-shows-in-red

Added in tests with block comments and single line comments

### 📋 Checklist

<!--
  Please keep your PR as a Draft until the checklist is complete
-->

#### Tests

- [ ] The code changed/added as part of this PR has been covered with
tests
- [ ] All tests pass locally with `yarn test-unit`

#### Code Review

- [ ] This PR has a concise title and thorough description useful to a
reviewer
- [ ] Issue from task tracker has a link to this PR

Co-authored-by: Sean Massa <EndangeredMassa@gmail.com>
2022-09-28 06:38:25 -05:00
Steven
f6bd1aa8c0 [tests] Remove console.log() from test (#8647)
Remove `console.log()` from test
2022-09-27 23:38:49 +00:00
18 changed files with 47 additions and 45 deletions

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/build-utils", "name": "@vercel/build-utils",
"version": "5.5.2", "version": "5.5.3",
"license": "MIT", "license": "MIT",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.js", "types": "./dist/index.d.js",

View File

@@ -77,7 +77,6 @@ it('should include peer dependencies when VERCEL_NPM_LEGACY_PEER_DEPS=1 on node1
const spawnOpts = getTestSpawnOpts({ VERCEL_NPM_LEGACY_PEER_DEPS: '1' }); const spawnOpts = getTestSpawnOpts({ VERCEL_NPM_LEGACY_PEER_DEPS: '1' });
const nodeVersion = getNodeVersion(14); const nodeVersion = getNodeVersion(14);
console.log({ nodeVersion, path: spawnOpts.env.PATH });
await runNpmInstall(fixture, [], spawnOpts, meta, nodeVersion); await runNpmInstall(fixture, [], spawnOpts, meta, nodeVersion);
expect(spawnMock.mock.calls.length).toBe(1); expect(spawnMock.mock.calls.length).toBe(1);
const args = spawnMock.mock.calls[0]; const args = spawnMock.mock.calls[0];
@@ -102,7 +101,6 @@ it('should not include peer dependencies when VERCEL_NPM_LEGACY_PEER_DEPS=1 on n
const spawnOpts = getTestSpawnOpts({ VERCEL_NPM_LEGACY_PEER_DEPS: '1' }); const spawnOpts = getTestSpawnOpts({ VERCEL_NPM_LEGACY_PEER_DEPS: '1' });
const nodeVersion = getNodeVersion(14); const nodeVersion = getNodeVersion(14);
console.log({ nodeVersion, path: spawnOpts.env.PATH });
await runNpmInstall(fixture, [], spawnOpts, meta, nodeVersion); await runNpmInstall(fixture, [], spawnOpts, meta, nodeVersion);
expect(spawnMock.mock.calls.length).toBe(1); expect(spawnMock.mock.calls.length).toBe(1);
const args = spawnMock.mock.calls[0]; const args = spawnMock.mock.calls[0];

View File

@@ -1,6 +1,6 @@
{ {
"name": "vercel", "name": "vercel",
"version": "28.4.4", "version": "28.4.5",
"preferGlobal": true, "preferGlobal": true,
"license": "Apache-2.0", "license": "Apache-2.0",
"description": "The command-line interface for Vercel", "description": "The command-line interface for Vercel",
@@ -41,16 +41,16 @@
"node": ">= 14" "node": ">= 14"
}, },
"dependencies": { "dependencies": {
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"@vercel/go": "2.2.10", "@vercel/go": "2.2.11",
"@vercel/hydrogen": "0.0.23", "@vercel/hydrogen": "0.0.24",
"@vercel/next": "3.2.0", "@vercel/next": "3.2.1",
"@vercel/node": "2.5.20", "@vercel/node": "2.5.21",
"@vercel/python": "3.1.19", "@vercel/python": "3.1.20",
"@vercel/redwood": "1.0.28", "@vercel/redwood": "1.0.29",
"@vercel/remix": "1.0.29", "@vercel/remix": "1.0.30",
"@vercel/ruby": "1.3.36", "@vercel/ruby": "1.3.37",
"@vercel/static-build": "1.0.28", "@vercel/static-build": "1.0.29",
"update-notifier": "5.1.0" "update-notifier": "5.1.0"
}, },
"devDependencies": { "devDependencies": {
@@ -95,9 +95,9 @@
"@types/which": "1.3.2", "@types/which": "1.3.2",
"@types/write-json-file": "2.2.1", "@types/write-json-file": "2.2.1",
"@types/yauzl-promise": "2.1.0", "@types/yauzl-promise": "2.1.0",
"@vercel/client": "12.2.9", "@vercel/client": "12.2.10",
"@vercel/frameworks": "1.1.6", "@vercel/frameworks": "1.1.6",
"@vercel/fs-detectors": "3.4.0", "@vercel/fs-detectors": "3.4.1",
"@vercel/fun": "1.0.4", "@vercel/fun": "1.0.4",
"@vercel/ncc": "0.24.0", "@vercel/ncc": "0.24.0",
"@zeit/source-map-support": "0.6.2", "@zeit/source-map-support": "0.6.2",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/client", "name": "@vercel/client",
"version": "12.2.9", "version": "12.2.10",
"main": "dist/index.js", "main": "dist/index.js",
"typings": "dist/index.d.ts", "typings": "dist/index.d.ts",
"homepage": "https://vercel.com", "homepage": "https://vercel.com",
@@ -43,7 +43,7 @@
] ]
}, },
"dependencies": { "dependencies": {
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"@vercel/routing-utils": "2.0.2", "@vercel/routing-utils": "2.0.2",
"@zeit/fetch": "5.2.0", "@zeit/fetch": "5.2.0",
"async-retry": "1.2.3", "async-retry": "1.2.3",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/fs-detectors", "name": "@vercel/fs-detectors",
"version": "3.4.0", "version": "3.4.1",
"description": "Vercel filesystem detectors", "description": "Vercel filesystem detectors",
"main": "./dist/index.js", "main": "./dist/index.js",
"types": "./dist/index.d.ts", "types": "./dist/index.d.ts",
@@ -23,6 +23,7 @@
"@vercel/routing-utils": "2.0.2", "@vercel/routing-utils": "2.0.2",
"glob": "8.0.3", "glob": "8.0.3",
"js-yaml": "4.1.0", "js-yaml": "4.1.0",
"json5": "2.2.1",
"minimatch": "3.0.4", "minimatch": "3.0.4",
"semver": "6.1.1" "semver": "6.1.1"
}, },

View File

@@ -1,6 +1,7 @@
import _path from 'path'; import _path from 'path';
import yaml from 'js-yaml'; import yaml from 'js-yaml';
import glob from 'glob'; import glob from 'glob';
import json5 from 'json5';
import { DetectorFilesystem } from '../detectors/filesystem'; import { DetectorFilesystem } from '../detectors/filesystem';
import { Workspace } from './get-workspaces'; import { Workspace } from './get-workspaces';
import { getGlobFs } from './get-glob-fs'; import { getGlobFs } from './get-glob-fs';
@@ -144,7 +145,7 @@ async function getRushWorkspacePackagePaths({
}: GetPackagePathOptions): Promise<string[]> { }: GetPackagePathOptions): Promise<string[]> {
const rushWorkspaceAsBuffer = await fs.readFile('rush.json'); const rushWorkspaceAsBuffer = await fs.readFile('rush.json');
const { projects = [] } = JSON.parse( const { projects = [] } = json5.parse(
rushWorkspaceAsBuffer.toString() rushWorkspaceAsBuffer.toString()
) as RushWorkspaces; ) as RushWorkspaces;

View File

@@ -2,7 +2,6 @@
"$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json", "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/rush.schema.json",
"rushVersion": "5.76.1", "rushVersion": "5.76.1",
"pnpmVersion": "6.7.1", "pnpmVersion": "6.7.1",
"pnpmOptions": { "pnpmOptions": {
@@ -22,6 +21,7 @@
"postRushBuild": [] "postRushBuild": []
}, },
// comment
"variants": [], "variants": [],
"projects": [ "projects": [
{ {

View File

@@ -12,7 +12,9 @@
"nodeSupportedVersionRange": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0", "nodeSupportedVersionRange": ">=12.13.0 <13.0.0 || >=14.15.0 <15.0.0 || >=16.13.0 <17.0.0",
"gitPolicy": {}, "gitPolicy": {},
/*
this is a comment
*/
"repository": {}, "repository": {},
"eventHooks": { "eventHooks": {
"preRushInstall": [], "preRushInstall": [],

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/go", "name": "@vercel/go",
"version": "2.2.10", "version": "2.2.11",
"license": "MIT", "license": "MIT",
"main": "./dist/index", "main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/go", "homepage": "https://vercel.com/docs/runtimes#official-runtimes/go",
@@ -35,7 +35,7 @@
"@types/jest": "28.1.6", "@types/jest": "28.1.6",
"@types/node-fetch": "^2.3.0", "@types/node-fetch": "^2.3.0",
"@types/tar": "^4.0.0", "@types/tar": "^4.0.0",
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"@vercel/ncc": "0.24.0", "@vercel/ncc": "0.24.0",
"async-retry": "1.3.1", "async-retry": "1.3.1",
"execa": "^1.0.0", "execa": "^1.0.0",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/hydrogen", "name": "@vercel/hydrogen",
"version": "0.0.23", "version": "0.0.24",
"license": "MIT", "license": "MIT",
"main": "./dist/index.js", "main": "./dist/index.js",
"homepage": "https://vercel.com/docs", "homepage": "https://vercel.com/docs",
@@ -21,7 +21,7 @@
"devDependencies": { "devDependencies": {
"@types/jest": "27.5.1", "@types/jest": "27.5.1",
"@types/node": "*", "@types/node": "*",
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"typescript": "4.6.4" "typescript": "4.6.4"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/next", "name": "@vercel/next",
"version": "3.2.0", "version": "3.2.1",
"license": "MIT", "license": "MIT",
"main": "./dist/index", "main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js", "homepage": "https://vercel.com/docs/runtimes#official-runtimes/next-js",
@@ -44,7 +44,7 @@
"@types/semver": "6.0.0", "@types/semver": "6.0.0",
"@types/text-table": "0.2.1", "@types/text-table": "0.2.1",
"@types/webpack-sources": "3.2.0", "@types/webpack-sources": "3.2.0",
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"@vercel/nft": "0.22.1", "@vercel/nft": "0.22.1",
"@vercel/routing-utils": "2.0.2", "@vercel/routing-utils": "2.0.2",
"async-sema": "3.0.1", "async-sema": "3.0.1",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/node", "name": "@vercel/node",
"version": "2.5.20", "version": "2.5.21",
"license": "MIT", "license": "MIT",
"main": "./dist/index", "main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js", "homepage": "https://vercel.com/docs/runtimes#official-runtimes/node-js",
@@ -31,7 +31,7 @@
"dependencies": { "dependencies": {
"@edge-runtime/vm": "1.1.0-beta.32", "@edge-runtime/vm": "1.1.0-beta.32",
"@types/node": "*", "@types/node": "*",
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"@vercel/node-bridge": "3.0.0", "@vercel/node-bridge": "3.0.0",
"@vercel/static-config": "2.0.3", "@vercel/static-config": "2.0.3",
"edge-runtime": "1.1.0-beta.32", "edge-runtime": "1.1.0-beta.32",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/python", "name": "@vercel/python",
"version": "3.1.19", "version": "3.1.20",
"main": "./dist/index.js", "main": "./dist/index.js",
"license": "MIT", "license": "MIT",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/python", "homepage": "https://vercel.com/docs/runtimes#official-runtimes/python",
@@ -22,7 +22,7 @@
"devDependencies": { "devDependencies": {
"@types/execa": "^0.9.0", "@types/execa": "^0.9.0",
"@types/jest": "27.4.1", "@types/jest": "27.4.1",
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"@vercel/ncc": "0.24.0", "@vercel/ncc": "0.24.0",
"execa": "^1.0.0", "execa": "^1.0.0",
"typescript": "4.3.4" "typescript": "4.3.4"

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/redwood", "name": "@vercel/redwood",
"version": "1.0.28", "version": "1.0.29",
"main": "./dist/index.js", "main": "./dist/index.js",
"license": "MIT", "license": "MIT",
"homepage": "https://vercel.com/docs", "homepage": "https://vercel.com/docs",
@@ -27,6 +27,6 @@
"@types/aws-lambda": "8.10.19", "@types/aws-lambda": "8.10.19",
"@types/node": "*", "@types/node": "*",
"@types/semver": "6.0.0", "@types/semver": "6.0.0",
"@vercel/build-utils": "5.5.2" "@vercel/build-utils": "5.5.3"
} }
} }

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/remix", "name": "@vercel/remix",
"version": "1.0.29", "version": "1.0.30",
"license": "MIT", "license": "MIT",
"main": "./dist/index.js", "main": "./dist/index.js",
"homepage": "https://vercel.com/docs", "homepage": "https://vercel.com/docs",
@@ -25,7 +25,7 @@
"devDependencies": { "devDependencies": {
"@types/jest": "27.5.1", "@types/jest": "27.5.1",
"@types/node": "*", "@types/node": "*",
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"typescript": "4.6.4" "typescript": "4.6.4"
} }
} }

View File

@@ -1,7 +1,7 @@
{ {
"name": "@vercel/ruby", "name": "@vercel/ruby",
"author": "Nathan Cahill <nathan@nathancahill.com>", "author": "Nathan Cahill <nathan@nathancahill.com>",
"version": "1.3.36", "version": "1.3.37",
"license": "MIT", "license": "MIT",
"main": "./dist/index", "main": "./dist/index",
"homepage": "https://vercel.com/docs/runtimes#official-runtimes/ruby", "homepage": "https://vercel.com/docs/runtimes#official-runtimes/ruby",
@@ -22,7 +22,7 @@
"devDependencies": { "devDependencies": {
"@types/fs-extra": "8.0.0", "@types/fs-extra": "8.0.0",
"@types/semver": "6.0.0", "@types/semver": "6.0.0",
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"@vercel/ncc": "0.24.0", "@vercel/ncc": "0.24.0",
"execa": "2.0.4", "execa": "2.0.4",
"fs-extra": "^7.0.1", "fs-extra": "^7.0.1",

View File

@@ -1,6 +1,6 @@
{ {
"name": "@vercel/static-build", "name": "@vercel/static-build",
"version": "1.0.28", "version": "1.0.29",
"license": "MIT", "license": "MIT",
"main": "./dist/index", "main": "./dist/index",
"homepage": "https://vercel.com/docs/build-step", "homepage": "https://vercel.com/docs/build-step",
@@ -36,7 +36,7 @@
"@types/ms": "0.7.31", "@types/ms": "0.7.31",
"@types/node-fetch": "2.5.4", "@types/node-fetch": "2.5.4",
"@types/promise-timeout": "1.3.0", "@types/promise-timeout": "1.3.0",
"@vercel/build-utils": "5.5.2", "@vercel/build-utils": "5.5.3",
"@vercel/frameworks": "1.1.6", "@vercel/frameworks": "1.1.6",
"@vercel/ncc": "0.24.0", "@vercel/ncc": "0.24.0",
"@vercel/routing-utils": "2.0.2", "@vercel/routing-utils": "2.0.2",

View File

@@ -8480,6 +8480,11 @@ json5@2.1.1:
dependencies: dependencies:
minimist "^1.2.0" minimist "^1.2.0"
json5@2.2.1, json5@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
json5@^2.1.0, json5@^2.1.2: json5@^2.1.0, json5@^2.1.2:
version "2.1.3" version "2.1.3"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43" resolved "https://registry.yarnpkg.com/json5/-/json5-2.1.3.tgz#c9b0f7fa9233bfe5807fe66fcf3a5617ed597d43"
@@ -8487,11 +8492,6 @@ json5@^2.1.0, json5@^2.1.2:
dependencies: dependencies:
minimist "^1.2.5" minimist "^1.2.5"
json5@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
jsonc-parser@^3.0.0: jsonc-parser@^3.0.0:
version "3.1.0" version "3.1.0"
resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d" resolved "https://registry.yarnpkg.com/jsonc-parser/-/jsonc-parser-3.1.0.tgz#73b8f0e5c940b83d03476bc2e51a20ef0932615d"