Skip to content

Commit d13d974

Browse files
committed
refactor: add explicit process imports
1 parent 2991127 commit d13d974

File tree

133 files changed

+133
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+133
-0
lines changed

.config/esbuild.config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import path from 'node:path'
77
import { fileURLToPath } from 'node:url'
8+
import process from 'node:process'
89
import fg from 'fast-glob'
910

1011
import { envAsBoolean } from '@socketsecurity/lib-stable/env/helpers'

.config/vitest-plugins/require-transform.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { readFileSync } from 'node:fs'
22
import { dirname, resolve } from 'node:path'
3+
import process from 'node:process'
34

45
import { parse } from '@babel/parser'
56
import type { NodePath } from '@babel/traverse'

.config/vitest.config.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
import path from 'node:path'
66
import { fileURLToPath } from 'node:url'
7+
import process from 'node:process'
78
import { defineConfig } from 'vitest/config'
89

910
const __dirname = path.dirname(fileURLToPath(import.meta.url))

.config/vitest.setup.mts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/** @fileoverview Vitest setup file for coverage mode require() interception. */
22

33
// Check if coverage is enabled.
4+
import process from 'node:process'
45
const isCoverageEnabled =
56
process.argv.includes('--coverage') || process.env.COVERAGE === 'true'
67

plugins/babel-plugin-inline-process-env.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
* process.env.NODE_ENV // → 'production'
3232
* process.env.DEBUG // → unchanged (not in env)
3333
*/
34+
import process from 'node:process'
3435
export function inlineProcessEnv(babel, options = {}) {
3536
const { types: t } = babel
3637
const { env = process.env, exclude = [], include = [] } = options

plugins/babel-plugin-inline-require-calls.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import process from 'node:process'
12
const { createRequire } = require('node:module')
23
const fs = require('node:fs')
34
const path = require('node:path')

scripts/build-externals/esbuild-config.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
import { readFileSync } from 'node:fs'
66
import path from 'node:path'
77
import { fileURLToPath } from 'node:url'
8+
import process from 'node:process'
89

910
const __dirname = path.dirname(fileURLToPath(import.meta.url))
1011
const stubsDir = path.join(__dirname, 'stubs')

scripts/build/clean.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
import path from 'node:path'
77
import { fileURLToPath } from 'node:url'
8+
import process from 'node:process'
89

910
import { deleteAsync } from 'del'
1011
import fastGlob from 'fast-glob'

scripts/build/externals.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
* Entry point that wraps the modular build-externals system.
66
*/
77

8+
import process from 'node:process'
89
import { isQuiet } from '@socketsecurity/lib-stable/argv/flags'
910
import { getDefaultLogger } from '@socketsecurity/lib-stable/logger'
1011
import { pluralize } from '@socketsecurity/lib-stable/words'

scripts/build/js.mjs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
* This replaces tsgo for JS compilation while keeping tsgo for declarations
44
*/
55

6+
import process from 'node:process'
67
import { build, context } from 'esbuild'
78

89
import {

0 commit comments

Comments
 (0)