@upleveled/preflight 9.0.13 → 10.0.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/bin/preflight.js CHANGED
@@ -17,7 +17,7 @@ registerHooks({
17
17
  nextLoad(url).source
18
18
  ).toString(),
19
19
  {
20
- mode: 'transform',
20
+ mode: 'strip',
21
21
  sourceUrl: url,
22
22
  },
23
23
  ),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@upleveled/preflight",
3
- "version": "9.0.13",
3
+ "version": "10.0.1",
4
4
  "repository": "upleveled/preflight",
5
5
  "license": "MIT",
6
6
  "author": "UpLeveled (https://github.com/upleveled)",
@@ -17,43 +17,49 @@
17
17
  "files": [
18
18
  "src"
19
19
  ],
20
+ "scripts": {
21
+ "docker-build": "docker build --tag preflight .",
22
+ "docker-build-run": "pnpm docker-build && pnpm docker-run",
23
+ "docker-run": "docker run preflight",
24
+ "lint": "eslint . --max-warnings 0",
25
+ "start": "node --watch ./src/index.ts",
26
+ "test": "vitest run",
27
+ "test-local": "rm -rf ./__tests__/fixtures/__temp && pnpm test"
28
+ },
20
29
  "dependencies": {
21
- "algoliasearch": "5.50.2",
22
- "chalk": "5.6.2",
30
+ "algoliasearch": "5.57.0",
31
+ "chalk": "6.0.0",
23
32
  "cheerio": "1.2.0",
24
33
  "depcheck": "1.4.7",
25
34
  "domhandler": "6.0.1",
26
- "execa": "9.6.1",
27
- "listr2": "10.2.1",
35
+ "execa": "10.0.1",
36
+ "listr2": "11.0.1",
28
37
  "node-fetch": "3.3.2",
29
38
  "p-reduce": "3.0.0",
30
- "readdirp": "5.0.0",
31
- "semver": "7.7.4",
32
- "top-user-agents": "2.1.108"
39
+ "readdirp": "5.1.1",
40
+ "semver": "7.8.5"
33
41
  },
34
42
  "devDependencies": {
35
- "@types/node": "25.6.0",
43
+ "@types/node": "26.4.0",
36
44
  "@types/p-map": "2.0.0",
37
- "@types/semver": "7.7.1",
38
- "eslint": "10.2.1",
39
- "eslint-config-upleveled": "10.0.0",
40
- "p-map": "7.0.4",
41
- "prettier": "3.8.3",
42
- "stylelint": "17.8.0",
45
+ "@types/semver": "7.8.0",
46
+ "eslint": "10.9.1",
47
+ "eslint-config-upleveled": "10.0.2",
48
+ "p-map": "7.0.7",
49
+ "prettier": "3.9.6",
50
+ "stylelint": "17.14.1",
43
51
  "typescript": "6.0.3",
44
- "typescript-eslint": "8.59.0",
45
- "vitest": "4.1.5"
52
+ "typescript-eslint": "8.68.0",
53
+ "vitest": "4.1.11"
46
54
  },
47
55
  "engines": {
48
56
  "node": ">=22"
49
57
  },
50
- "scripts": {
51
- "docker-build": "docker build --tag preflight .",
52
- "docker-build-run": "pnpm docker-build && pnpm docker-run",
53
- "docker-run": "docker run preflight",
54
- "lint": "eslint . --max-warnings 0",
55
- "start": "node --watch ./src/index.ts",
56
- "test": "vitest run",
57
- "test-local": "rm -rf ./__tests__/fixtures/__temp && pnpm test"
58
+ "devEngines": {
59
+ "packageManager": {
60
+ "name": "pnpm",
61
+ "version": "11.24.0",
62
+ "onFail": "download"
63
+ }
58
64
  }
59
- }
65
+ }
@@ -1,4 +1,3 @@
1
- import { promises as fs } from 'node:fs';
2
1
  import { execa } from 'execa';
3
2
  import { commandExample } from '../util/commandExample.ts';
4
3
  import { isDrone } from '../util/drone.ts';
@@ -6,14 +5,6 @@ import { isDrone } from '../util/drone.ts';
6
5
  export const title = 'All changes committed to Git';
7
6
 
8
7
  export default async function allChangesCommittedToGit() {
9
- const { stdout: replSlug } = await execa`echo $REPL_SLUG`;
10
-
11
- const isRunningInReplIt = replSlug !== '';
12
-
13
- if (isRunningInReplIt) {
14
- await fs.writeFile('.git/info/exclude', '.replit\n');
15
- }
16
-
17
8
  const { stdout } = await execa`git status --porcelain`;
18
9
 
19
10
  if (stdout !== '') {
@@ -2,7 +2,6 @@ import { load } from 'cheerio';
2
2
  import type { Element } from 'domhandler';
3
3
  import { execa } from 'execa';
4
4
  import fetch from 'node-fetch';
5
- import { randomUserAgent } from '../util/randomUserAgent.ts';
6
5
 
7
6
  export const title = 'GitHub repo has deployed project link under About';
8
7
 
@@ -32,16 +31,11 @@ export default async function linkOnGithubAbout() {
32
31
 
33
32
  if (!urlInAboutSection) {
34
33
  throw new Error(
35
- `Deployed project link not found in About section on ${repoUrl}. Click on the cog symbol to the right of the About heading and paste the Replit / Netlify / Fly.io link in the Website box.`,
34
+ `Deployed project link not found in About section on ${repoUrl}. Click on the gear symbol to the right of the About heading and paste the StackBlitz / Netlify / Fly.io / Vercel link in the Website box.`,
36
35
  );
37
36
  }
38
37
 
39
- const response = await fetch(urlInAboutSection, {
40
- headers: {
41
- // For Replit
42
- 'user-agent': randomUserAgent(),
43
- },
44
- });
38
+ const response = await fetch(urlInAboutSection);
45
39
 
46
40
  if (!response.ok) {
47
41
  throw new Error(
package/src/index.ts CHANGED
@@ -95,7 +95,7 @@ const listrTasks: ListrTask[] = [
95
95
 
96
96
  const tasks = new Listr(listrTasks, {
97
97
  exitOnError: false,
98
- collectErrors: 'minimal',
98
+ collectErrors: true,
99
99
  rendererOptions: {
100
100
  collapseErrors: false,
101
101
  removeEmptyLines: false,
@@ -107,6 +107,6 @@ const tasks = new Listr(listrTasks, {
107
107
 
108
108
  await tasks.run();
109
109
 
110
- if (tasks.errors.length > 0) {
110
+ if (tasks.errors && tasks.errors.length > 0) {
111
111
  process.exit(1);
112
112
  }
@@ -1,6 +0,0 @@
1
- import userAgents from 'top-user-agents';
2
-
3
- export function randomUserAgent() {
4
- const randomIndex = Math.floor(Math.random() * (userAgents.length - 1));
5
- return userAgents[randomIndex]!;
6
- }