Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions .config/rollup.dist.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ import baseConfig, {
const {
CONSTANTS,
INLINED_SOCKET_CLI_LEGACY_BUILD,
INLINED_SOCKET_CLI_PUBLISHED_BUILD,
INLINED_SOCKET_CLI_SENTRY_BUILD,
INSTRUMENT_WITH_SENTRY,
NODE_MODULES,
Expand Down Expand Up @@ -104,69 +103,6 @@ async function copyInitGradle() {
await fs.copyFile(filepath, destPath)
}

// Copy the build-tool resolution assets (Gradle init script, sbt plugin,
// Maven extension jar, dotnet tool) into dist/manifest-scripts, where run.mts resolves them
// at runtime. The Maven jar is compiled by maven-extension/build-jar.sh. Local
// dev builds may omit it; published builds fail here if it is missing.
async function copyManifestScripts() {
const srcDir = path.join(constants.srcPath, 'commands/manifest/scripts')
const destDir = path.join(constants.distPath, 'manifest-scripts')
await fs.mkdir(path.join(destDir, 'maven-extension'), { recursive: true })
await Promise.all([
fs.copyFile(
path.join(srcDir, 'socket-facts.init.gradle'),
path.join(destDir, 'socket-facts.init.gradle'),
),
fs.copyFile(
path.join(srcDir, 'socket-facts.plugin.scala'),
path.join(destDir, 'socket-facts.plugin.scala'),
),
fs.copyFile(
path.join(srcDir, 'socket-workspaces.init.gradle'),
path.join(destDir, 'socket-workspaces.init.gradle'),
),
fs.copyFile(
path.join(srcDir, 'socket-workspaces.plugin.scala'),
path.join(destDir, 'socket-workspaces.plugin.scala'),
),
])
// The dotnet tool's publish output (scripts/dotnet-tool/build-tool.sh),
// like the Maven jar absent from a fresh checkout.
const dotnetToolDir = path.join(srcDir, 'dotnet-tool', 'publish')
if (existsSync(path.join(dotnetToolDir, 'socket-facts-dotnet.dll'))) {
await fs.cp(dotnetToolDir, path.join(destDir, 'dotnet-tool'), {
recursive: true,
})
} else if (constants.ENV[INLINED_SOCKET_CLI_PUBLISHED_BUILD]) {
throw new Error(
'dotnet manifest tool not found at ' +
dotnetToolDir +
' for a published build. Build it first: pnpm run build:dotnet-tool',
)
}
const jarPath = path.join(
srcDir,
'maven-extension',
'coana-maven-extension.jar',
)
if (existsSync(jarPath)) {
await fs.copyFile(
jarPath,
path.join(destDir, 'maven-extension', 'coana-maven-extension.jar'),
)
} else if (constants.ENV[INLINED_SOCKET_CLI_PUBLISHED_BUILD]) {
// Fail closed: a published build without the jar would ship a package whose
// `socket manifest maven` / Maven reachability silently produces an empty
// SBOM. Run `pnpm run build:maven-extension` before `build:dist`. (A local
// dev build tolerates a missing jar; run.mts surfaces a hint at runtime.)
throw new Error(
'Maven manifest extension jar not found at ' +
jarPath +
' for a published build. Build it first: pnpm run build:maven-extension',
)
}
}

async function copyBashCompletion() {
const filepath = path.join(
constants.srcPath,
Expand Down Expand Up @@ -554,7 +490,6 @@ export default async () => {
await Promise.all([
copyCoanaCache(),
copyInitGradle(),
copyManifestScripts(),
copyBashCompletion(),
...(updatePackageMetadata ? [updatePackageJson()] : []),
// Remove dist/vendor.js.map file.
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -423,10 +423,6 @@ jobs:
print(''.join(row.itertext()).rstrip())
PYTHON

- name: Verify .NET SDK
shell: bash
run: dotnet --list-sdks | awk -F. '$1 >= 8 { found=1 } END { exit !found }'

- name: Build and check the native executable
env:
NODE_OPTIONS: ${{ matrix.target == 'darwin-arm64' && '--max-old-space-size=4096' || '' }}
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,6 @@ jobs:
VERSION: ${{ steps.release-meta.outputs.version }}
SOCKET_CLI_DEBUG: ${{ inputs.debug }}
run: |
# Run tool builds directly so the firewall only wraps package-manager traffic.
if [[ -n "${JAVA_HOME_17_X64:-}" ]]; then export JAVA_HOME="$JAVA_HOME_17_X64"; fi
bash src/commands/manifest/scripts/maven-extension/build-jar.sh
bash src/commands/manifest/scripts/dotnet-tool/build-tool.sh
node .github/scripts/pin-readme-assets.mjs

mkdir -p "$RUNNER_TEMP/dist"
Expand Down
302 changes: 0 additions & 302 deletions .gitignore

Large diffs are not rendered by default.

2 changes: 0 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@
"build:dist": "pnpm build:dist:src && pnpm build:dist:types",
"build:dist:src": "run-p -c clean:dist clean:external && dotenvx -q run -f .env.local -- rollup -c .config/rollup.dist.config.mjs",
"build:dist:types": "pnpm clean:dist:types && tsgo --project .config/tsconfig.dts.json",
"build:dotnet-tool": "bash src/commands/manifest/scripts/dotnet-tool/build-tool.sh",
"build:maven-extension": "bash src/commands/manifest/scripts/maven-extension/build-jar.sh",
"build:sea": "node src/sea/build-sea.mts",
"build:package-matrix": "node scripts/build-package-matrix.mts",
"snapshots": "node scripts/refresh/snapshots.mts",
Expand Down
4 changes: 0 additions & 4 deletions scripts/build-package-matrix.mts
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,6 @@ async function main(): Promise<void> {
privateEnv,
)
await verifyPrivateVirtualStore(workspace)
run(workspace, 'pnpm', ['run', 'build:dotnet-tool'], privateEnv)
await verifyPrivateVirtualStore(workspace)
run(workspace, 'pnpm', ['run', 'build:maven-extension'], privateEnv)
await verifyPrivateVirtualStore(workspace)
for (const variant of variants) {
await fs.writeFile(
packagePath,
Expand Down
5 changes: 0 additions & 5 deletions socket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,3 @@ version: 2

projectIgnorePaths:
- "test/fixtures/"
# Build-tooling and test fixtures for the JVM manifest scripts, not socket-cli's
# own supply chain: the Maven extension's build pom and the compat-test
# projects' pom.xml / build.gradle / build.sbt.
- "src/commands/manifest/scripts/maven-extension/"
- "src/commands/manifest/scripts/test/"
Loading
Loading