Skip to content

Commit dd31a8b

Browse files
committed
refactor: remove unnecessary unsafe slice modification
1 parent 7b5f0f3 commit dd31a8b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎language/js/generate.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,10 +321,10 @@ func (ts *typeScriptLang) addPackageRule(cfg *JsGazelleConfig, args language.Gen
321321
}
322322

323323
// Add the package.json if not in the src
324+
// BUG: if it was removed from 'dataFiles' and put in a target that the package does not depend on (such as a test ts_project())
324325
// TODO: why not always add it?
325326
// TODO: declare import on it instead if it's in another rule?
326327
if packageIdx := slices.Index(dataFiles, NpmPackageFilename); packageIdx != -1 {
327-
dataFiles = slices.Delete(dataFiles, packageIdx, packageIdx+1)
328328
npmPackageInfo.sources.Add(NpmPackageFilename)
329329
}
330330

0 commit comments

Comments
 (0)