Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@changesets/config

Package Overview
Dependencies
Maintainers
3
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@changesets/config - npm Package Compare versions

Comparing version 0.3.0 to 1.0.0

11

CHANGELOG.md
# @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 @@

30

dist/config.cjs.dev.js

@@ -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 @@ },

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc