@changesets/config
Advanced tools
Comparing version 0.3.0 to 1.0.0
# @changesets/config | ||
## 1.0.0 | ||
### Major Changes | ||
- [`cc8c921`](https://github.com/atlassian/changesets/commit/cc8c92143d4c4b7cca8b9917dfc830a40b5cda20) [#290](https://github.com/atlassian/changesets/pull/290) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Accept `Packages` object from `@manypkg/get-workspaces` instead of `Workspace[]` from `get-workspaces` | ||
### Patch Changes | ||
- Updated dependencies [[`41e2e3d`](https://github.com/atlassian/changesets/commit/41e2e3dd1053ff2f35a1a07e60793c9099f26997), [`cc8c921`](https://github.com/atlassian/changesets/commit/cc8c92143d4c4b7cca8b9917dfc830a40b5cda20), [`cc8c921`](https://github.com/atlassian/changesets/commit/cc8c92143d4c4b7cca8b9917dfc830a40b5cda20), [`2363366`](https://github.com/atlassian/changesets/commit/2363366756d1b15bddf6d803911baccfca03cbdf)]: | ||
- @changesets/types@1.0.0 | ||
## 0.3.0 | ||
@@ -4,0 +15,0 @@ |
@@ -14,3 +14,3 @@ 'use strict'; | ||
name: "@changesets/config", | ||
version: "0.3.0", | ||
version: "1.0.0", | ||
description: "Utilities for reading and parsing Changeset's config", | ||
@@ -28,3 +28,4 @@ main: "dist/config.cjs.js", | ||
"@changesets/logger": "^0.0.3", | ||
"@changesets/types": "^0.4.0", | ||
"@changesets/types": "^1.0.0", | ||
"@manypkg/get-packages": "^1.0.0", | ||
"fs-extra": "^7.0.1" | ||
@@ -59,7 +60,7 @@ }, | ||
let read = async (cwd, workspaces) => { | ||
let read = async (cwd, packages) => { | ||
let json = await fs.readJSON(path.join(cwd, ".changeset", "config.json")); | ||
return parse(json, workspaces); | ||
return parse(json, packages); | ||
}; | ||
let parse = (json, workspaces) => { | ||
let parse = (json, packages) => { | ||
let messages = []; | ||
@@ -94,5 +95,5 @@ | ||
} else { | ||
let pkgNames = new Set(workspaces.map(({ | ||
name | ||
}) => name)); | ||
let pkgNames = new Set(packages.packages.map(({ | ||
packageJson | ||
}) => packageJson.name)); | ||
let foundPkgNames = new Set(); | ||
@@ -136,3 +137,14 @@ let duplicatedPkgNames = new Set(); | ||
}; | ||
let defaultConfig = parse(defaultWrittenConfig, []); | ||
let fakePackage = { | ||
dir: "", | ||
packageJson: { | ||
name: "", | ||
version: "" | ||
} | ||
}; | ||
let defaultConfig = parse(defaultWrittenConfig, { | ||
root: fakePackage, | ||
tool: "root", | ||
packages: [fakePackage] | ||
}); | ||
@@ -139,0 +151,0 @@ exports.defaultConfig = defaultConfig; |
@@ -13,3 +13,3 @@ "use strict"; | ||
name: "@changesets/config", | ||
version: "0.3.0", | ||
version: "1.0.0", | ||
description: "Utilities for reading and parsing Changeset's config", | ||
@@ -24,3 +24,4 @@ main: "dist/config.cjs.js", | ||
"@changesets/logger": "^0.0.3", | ||
"@changesets/types": "^0.4.0", | ||
"@changesets/types": "^1.0.0", | ||
"@manypkg/get-packages": "^1.0.0", | ||
"fs-extra": "^7.0.1" | ||
@@ -47,6 +48,6 @@ }, | ||
let read = async (cwd, workspaces) => { | ||
let read = async (cwd, packages) => { | ||
let json = await fs.readJSON(path.join(cwd, ".changeset", "config.json")); | ||
return parse(json, workspaces); | ||
}, parse = (json, workspaces) => { | ||
return parse(json, packages); | ||
}, parse = (json, packages) => { | ||
let messages = []; | ||
@@ -60,3 +61,3 @@ void 0 === json.changelog || !1 === json.changelog || "string" == typeof json.changelog || Array.isArray(json.changelog) && 2 === json.changelog.length && "string" == typeof json.changelog[0] || messages.push(`The \`changelog\` option is set as ${JSON.stringify(json.changelog, null, 2)} when the only valid values are undefined, a module path(e.g. "@changesets/cli/changelog" or "./some-module") or a tuple with a module path and config for the changelog generator(e.g. ["@changesets/cli/changelog", { someOption: true }])`); | ||
void 0 !== json.linked) if (Array.isArray(json.linked) && json.linked.every(arr => Array.isArray(arr) && arr.every(pkgName => "string" == typeof pkgName))) { | ||
let pkgNames = new Set(workspaces.map(({name: name}) => name)), foundPkgNames = new Set(), duplicatedPkgNames = new Set(); | ||
let pkgNames = new Set(packages.packages.map(({packageJson: packageJson}) => packageJson.name)), foundPkgNames = new Set, duplicatedPkgNames = new Set; | ||
for (let linkedGroup of json.linked) for (let linkedPkgName of linkedGroup) pkgNames.has(linkedPkgName) || messages.push(`The package "${linkedPkgName}" is specified in the \`linked\` option but it is not found in the project. You may have misspelled the package name.`), | ||
@@ -76,5 +77,15 @@ foundPkgNames.has(linkedPkgName) && duplicatedPkgNames.add(linkedPkgName), foundPkgNames.add(linkedPkgName); | ||
}; | ||
}, defaultConfig = parse(defaultWrittenConfig, []); | ||
}, fakePackage = { | ||
dir: "", | ||
packageJson: { | ||
name: "", | ||
version: "" | ||
} | ||
}, defaultConfig = parse(defaultWrittenConfig, { | ||
root: fakePackage, | ||
tool: "root", | ||
packages: [ fakePackage ] | ||
}); | ||
exports.defaultConfig = defaultConfig, exports.defaultWrittenConfig = defaultWrittenConfig, | ||
exports.parse = parse, exports.read = read; |
@@ -8,3 +8,3 @@ import { readJSON } from 'fs-extra'; | ||
name: "@changesets/config", | ||
version: "0.3.0", | ||
version: "1.0.0", | ||
description: "Utilities for reading and parsing Changeset's config", | ||
@@ -22,3 +22,4 @@ main: "dist/config.cjs.js", | ||
"@changesets/logger": "^0.0.3", | ||
"@changesets/types": "^0.4.0", | ||
"@changesets/types": "^1.0.0", | ||
"@manypkg/get-packages": "^1.0.0", | ||
"fs-extra": "^7.0.1" | ||
@@ -53,7 +54,7 @@ }, | ||
let read = async (cwd, workspaces) => { | ||
let read = async (cwd, packages) => { | ||
let json = await readJSON(path.join(cwd, ".changeset", "config.json")); | ||
return parse(json, workspaces); | ||
return parse(json, packages); | ||
}; | ||
let parse = (json, workspaces) => { | ||
let parse = (json, packages) => { | ||
let messages = []; | ||
@@ -88,5 +89,5 @@ | ||
} else { | ||
let pkgNames = new Set(workspaces.map(({ | ||
name | ||
}) => name)); | ||
let pkgNames = new Set(packages.packages.map(({ | ||
packageJson | ||
}) => packageJson.name)); | ||
let foundPkgNames = new Set(); | ||
@@ -130,4 +131,15 @@ let duplicatedPkgNames = new Set(); | ||
}; | ||
let defaultConfig = parse(defaultWrittenConfig, []); | ||
let fakePackage = { | ||
dir: "", | ||
packageJson: { | ||
name: "", | ||
version: "" | ||
} | ||
}; | ||
let defaultConfig = parse(defaultWrittenConfig, { | ||
root: fakePackage, | ||
tool: "root", | ||
packages: [fakePackage] | ||
}); | ||
export { defaultConfig, defaultWrittenConfig, parse, read }; |
@@ -0,1 +1,2 @@ | ||
import { Packages } from "@manypkg/get-packages"; | ||
export declare let defaultWrittenConfig: { | ||
@@ -9,4 +10,4 @@ readonly $schema: string; | ||
}; | ||
export declare let read: (cwd: string, workspaces: any[]) => Promise<any>; | ||
export declare let parse: (json: any, workspaces: any[]) => any; | ||
export declare let read: (cwd: string, packages: Packages) => Promise<any>; | ||
export declare let parse: (json: any, packages: Packages) => any; | ||
export declare let defaultConfig: any; |
{ | ||
"name": "@changesets/config", | ||
"version": "0.3.0", | ||
"version": "1.0.0", | ||
"description": "Utilities for reading and parsing Changeset's config", | ||
@@ -16,3 +16,4 @@ "main": "dist/config.cjs.js", | ||
"@changesets/logger": "^0.0.3", | ||
"@changesets/types": "^0.4.0", | ||
"@changesets/types": "^1.0.0", | ||
"@manypkg/get-packages": "^1.0.0", | ||
"fs-extra": "^7.0.1" | ||
@@ -19,0 +20,0 @@ }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
23527
405
1
5
+ Added@manypkg/get-packages@^1.0.0
+ Added@babel/runtime@7.26.0(transitive)
+ Added@changesets/types@1.0.14.1.0(transitive)
+ Added@manypkg/find-root@1.1.0(transitive)
+ Added@manypkg/get-packages@1.1.3(transitive)
+ Added@nodelib/fs.scandir@2.1.5(transitive)
+ Added@nodelib/fs.stat@2.0.5(transitive)
+ Added@nodelib/fs.walk@1.2.8(transitive)
+ Added@types/node@12.20.55(transitive)
+ Addedargparse@1.0.10(transitive)
+ Addedarray-union@2.1.0(transitive)
+ Addedbraces@3.0.3(transitive)
+ Addeddir-glob@3.0.1(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedfast-glob@3.3.2(transitive)
+ Addedfastq@1.17.1(transitive)
+ Addedfill-range@7.1.1(transitive)
+ Addedfind-up@4.1.0(transitive)
+ Addedfs-extra@8.1.0(transitive)
+ Addedglob-parent@5.1.2(transitive)
+ Addedglobby@11.1.0(transitive)
+ Addedignore@5.3.2(transitive)
+ Addedis-extglob@2.1.1(transitive)
+ Addedis-glob@4.0.3(transitive)
+ Addedis-number@7.0.0(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedlocate-path@5.0.0(transitive)
+ Addedmerge2@1.4.1(transitive)
+ Addedmicromatch@4.0.8(transitive)
+ Addedp-limit@2.3.0(transitive)
+ Addedp-locate@4.1.0(transitive)
+ Addedp-try@2.2.0(transitive)
+ Addedpath-exists@4.0.0(transitive)
+ Addedpath-type@4.0.0(transitive)
+ Addedpicomatch@2.3.1(transitive)
+ Addedpify@4.0.1(transitive)
+ Addedqueue-microtask@1.2.3(transitive)
+ Addedread-yaml-file@1.1.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
+ Addedreusify@1.0.4(transitive)
+ Addedrun-parallel@1.2.0(transitive)
+ Addedslash@3.0.0(transitive)
+ Addedsprintf-js@1.0.3(transitive)
+ Addedstrip-bom@3.0.0(transitive)
+ Addedto-regex-range@5.0.1(transitive)
- Removed@changesets/types@0.4.0(transitive)
Updated@changesets/types@^1.0.0