Skip to content
Merged
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
90 changes: 0 additions & 90 deletions actions/setup/js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions actions/setup/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"@vitest/coverage-v8": "^4.0.10",
"@vitest/ui": "^4.0.10",
"prettier": "^3.8.0",
"terser": "^5.44.1",
"typescript": "^5.9.3",
"vite": "^7.2.2",
"vitest": "^4.0.17"
Expand All @@ -24,7 +23,6 @@
"test:js": "vitest run",
"test:js-watch": "vitest",
"test:js-coverage": "vitest run --coverage",
"format:terser": "find . -name '*.cjs' -type f -not -path './node_modules/*' | while read file; do if ! grep -qE '^(await |/// <reference|// @ts-check)|await import' \"$file\"; then npx terser \"$file\" -b -c dead_code=true,unused=true,collapse_vars=true --ecma 2022 -o \"$file.tmp\" && mv \"$file.tmp\" \"$file\"; fi; done",
"format:cjs": "npx prettier --write '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.prettierignore",
"lint:cjs": "npx prettier --check '**/*.cjs' '**/*.ts' '**/*.json' --ignore-path ../../../.prettierignore",
"format:schema": "npx prettier --write ../../../pkg/workflow/schemas/github-workflow.json --ignore-path /dev/null",
Expand Down
4 changes: 2 additions & 2 deletions pkg/workflow/bundler.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func removeExports(content string) string {

// Pattern for inline conditional exports like:
// ("undefined" != typeof module && module.exports && (module.exports = {...}),
// This pattern is used by minified/terser-processed code
// This pattern is used by minified code
inlineConditionalExportRegex := regexp.MustCompile(`\(\s*["']undefined["']\s*!=\s*typeof\s+module\s*&&\s*module\.exports`)

// Track if we're inside a conditional export block that should be removed
Expand All @@ -317,7 +317,7 @@ func removeExports(content string) string {
for i, line := range lines {
trimmed := strings.TrimSpace(line)

// Check for inline conditional export pattern (minified/terser style)
// Check for inline conditional export pattern (minified style)
// These lines should be entirely removed as they only contain the conditional export
if inlineConditionalExportRegex.MatchString(trimmed) {
// Skip the entire line - it's an inline conditional export
Expand Down