-
Notifications
You must be signed in to change notification settings - Fork 544
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(scripts): convert update:versions scripts to mjs (#3226)
- Loading branch information
Showing
9 changed files
with
24 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
scripts/update-versions/current.ts → scripts/update-versions/current.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env ts-node | ||
// @ts-check | ||
|
||
// Updates versions for internal packages `@aws-sdk/*` to exact versions | ||
// in dependencies/devDependencies/peerDependencies | ||
|
||
import { getDepToCurrentVersionHash } from "./getDepToCurrentVersionHash"; | ||
import { updateVersions } from "./updateVersions"; | ||
import { getDepToCurrentVersionHash } from "./getDepToCurrentVersionHash.mjs"; | ||
import { updateVersions } from "./updateVersions.mjs"; | ||
|
||
updateVersions(getDepToCurrentVersionHash()); |
6 changes: 3 additions & 3 deletions
6
scripts/update-versions/default.ts → scripts/update-versions/default.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
#!/usr/bin/env ts-node | ||
// @ts-check | ||
|
||
// Updates versions for internal packages `@aws-sdk/*` to `*` | ||
// in dependencies/devDependencies/peerDependencies | ||
|
||
import { getDepToDefaultVersionHash } from "./getDepToDefaultVersionHash"; | ||
import { updateVersions } from "./updateVersions"; | ||
import { getDepToDefaultVersionHash } from "./getDepToDefaultVersionHash.mjs"; | ||
import { updateVersions } from "./updateVersions.mjs"; | ||
|
||
updateVersions(getDepToDefaultVersionHash()); |
3 changes: 2 additions & 1 deletion
3
...te-versions/getDepToCurrentVersionHash.ts → ...e-versions/getDepToCurrentVersionHash.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
...te-versions/getDepToDefaultVersionHash.ts → ...e-versions/getDepToDefaultVersionHash.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
.../update-versions/getUpdatedPackageJson.ts → ...update-versions/getUpdatedPackageJson.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 2 additions & 4 deletions
6
...-versions/getUpdatedPackageJsonSection.ts → ...versions/getUpdatedPackageJsonSection.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,5 @@ | ||
export const getUpdatedPackageJsonSection = ( | ||
section: { [key: string]: string }, | ||
depToVersionHash: { [key: string]: string } | ||
) => | ||
// @ts-check | ||
export const getUpdatedPackageJsonSection = (section, depToVersionHash) => | ||
Object.entries(section) | ||
.filter(([key, value]) => key.startsWith("@aws-sdk/") && !value.startsWith("file:")) | ||
.reduce((acc, [key, value]) => ({ ...acc, [key]: depToVersionHash[key] || value }), section); |
7 changes: 5 additions & 2 deletions
7
scripts/update-versions/getWorkspacePaths.ts → ...pts/update-versions/getWorkspacePaths.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
scripts/update-versions/updateVersions.ts → scripts/update-versions/updateVersions.mjs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters