-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Maksim Sitnikov
committed
Dec 1, 2023
1 parent
b574e44
commit 43ce35a
Showing
14 changed files
with
1,679 additions
and
7,243 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
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 |
---|---|---|
|
@@ -27,5 +27,6 @@ yarn-debug.log* | |
yarn-error.log* | ||
|
||
/src/libs-data.json | ||
/src/packages-versions.json | ||
|
||
.env |
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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import fs from 'node:fs'; | ||
import path from 'node:path'; | ||
import {fileURLToPath} from 'node:url'; | ||
|
||
const packagesMap = { | ||
'@gravity-ui/uikit': 'uikit', | ||
'@gravity-ui/components': 'components', | ||
// '@gravity-ui/date-components': 'date-components', | ||
}; | ||
|
||
const packageJsonPath = path.join(path.dirname(fileURLToPath(import.meta.url)), '../package.json'); | ||
const packagesVersionsPath = path.join( | ||
path.dirname(fileURLToPath(import.meta.url)), | ||
'../src/packages-versions.json', | ||
); | ||
|
||
const getPackagesVersions = () => { | ||
try { | ||
console.log('GET_PACKAGES_VERSIONS_START'); | ||
|
||
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf8')); | ||
const dependencies = packageJson.dependencies; | ||
|
||
const result = {}; | ||
Object.keys(packagesMap).forEach((packageName) => { | ||
if (dependencies[packageName]) { | ||
result[packagesMap[packageName]] = dependencies[packageName].replace(/[\^~]/g, ''); | ||
} else { | ||
console.warn('GET_PACKAGES_VERSIONS_MISSED_PACKAGE', packageName); | ||
} | ||
}); | ||
|
||
console.log('GET_PACKAGES_VERSIONS_RESULT', result); | ||
|
||
fs.writeFileSync(packagesVersionsPath, JSON.stringify(result), 'utf8'); | ||
|
||
console.log('GET_PACKAGES_VERSIONS_FINISH'); | ||
} catch (err) { | ||
console.error(err.message); | ||
process.exit(1); | ||
} | ||
}; | ||
|
||
getPackagesVersions(); |
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
This file was deleted.
Oops, something went wrong.
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
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
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
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
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,5 +1,5 @@ | ||
export enum Repos { | ||
Uikit = 'uikit', | ||
Components = 'components', | ||
DateComponents = 'date-components', | ||
// DateComponents = 'date-components', | ||
} |