MCPcopy Create free account
hub / github.com/adobe/react-spectrum / constructor

Method constructor

scripts/bumpVersions.js:64–91  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

62
63class VersionManager {
64 constructor() {
65 let workspaceLookup = {};
66 // Get dependency tree from yarn workspaces
67 this.workspacePackages = exec('yarn workspaces list --json -v')
68 .toString()
69 .split('\n')
70 .map(line => {
71 try {
72 let result = JSON.parse(line);
73 workspaceLookup[result.location] = result.name;
74 return result;
75 } catch (e) {
76 // ignore empty lines
77 }
78 })
79 .filter(Boolean)
80 .reduce((acc, item) => {
81 acc[item.name] = item;
82 acc[item.name].workspaceDependencies = item.workspaceDependencies.map(
83 dep => workspaceLookup[dep]
84 );
85 return acc;
86 }, {});
87 this.existingPackages = new Set();
88 this.changedPackages = new Set();
89 this.versionBumps = {};
90 this.releasedPackages = new Map();
91 }
92
93 async run() {
94 await this.getExistingPackages();

Callers

nothing calls this directly

Calls 3

filterMethod · 0.65
toStringMethod · 0.65
parseMethod · 0.45

Tested by

no test coverage detected