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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.15.2] - 2026-02-20

### Fixed
- Fix `export const`/`export let` declarations not being added to the exports list in the TS parser, causing locally declared exported variables (e.g. `export const allScenarios = [...]`) to be invisible during entrypoint taint checking

## [0.15.1] - 2026-02-17

### Changed
Expand Down Expand Up @@ -187,6 +192,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Multi-stage Docker build
- Automated vendor upgrade workflow

[0.15.2]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.15.1...v0.15.2
[0.15.1]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.15.0...v0.15.1
[0.15.0]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.14.2...v0.15.0
[0.14.2]: https://github.com/gooddata/gooddata-goodchanges/compare/v0.14.1...v0.14.2
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.15.1
0.15.2
44 changes: 34 additions & 10 deletions internal/tsparse/tsparse.go
Original file line number Diff line number Diff line change
Expand Up @@ -210,17 +210,41 @@ func extractExports(stmt *ast.Node, analysis *FileAnalysis) {

default:
if ast.HasSyntacticModifier(stmt, ast.ModifierFlagsExport) {
name := getDeclName(stmt)
if name != "" {
isDefault := ast.HasSyntacticModifier(stmt, ast.ModifierFlagsDefault)
exportName := name
if isDefault {
exportName = "default"
isDefault := ast.HasSyntacticModifier(stmt, ast.ModifierFlagsDefault)

// VariableStatement has no Name() — iterate into declarations
if stmt.Kind == ast.KindVariableStatement {
vs := stmt.AsVariableStatement()
if vs.DeclarationList != nil {
dl := vs.DeclarationList.AsVariableDeclarationList()
if dl.Declarations != nil {
for _, decl := range dl.Declarations.Nodes {
name := getDeclName(decl)
if name != "" {
exportName := name
if isDefault {
exportName = "default"
}
analysis.Exports = append(analysis.Exports, Export{
Name: exportName,
LocalName: name,
})
}
}
}
}
} else {
name := getDeclName(stmt)
if name != "" {
exportName := name
if isDefault {
exportName = "default"
}
analysis.Exports = append(analysis.Exports, Export{
Name: exportName,
LocalName: name,
})
}
analysis.Exports = append(analysis.Exports, Export{
Name: exportName,
LocalName: name,
})
}
}
}
Expand Down