@scaleway/changesets-renovate 1.2.7 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Change Log
2
2
 
3
+ ## 1.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#1531](https://github.com/scaleway/scaleway-lib/pull/1531) [`5f1fc75`](https://github.com/scaleway/scaleway-lib/commit/5f1fc750d93333a4ae3f48abcd96dd3af21fd886) Thanks [@QuiiBz](https://github.com/QuiiBz)! - Ignore packages that are ignored in the changeset config
8
+
3
9
  ## 1.2.7
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -2,10 +2,26 @@
2
2
  import fs from 'node:fs/promises';
3
3
  import { simpleGit } from 'simple-git';
4
4
 
5
+ async function getChangesetIgnoredPackages() {
6
+ const changesetConfig = JSON.parse(await fs.readFile('.changeset/config.json', 'utf8'));
7
+ return changesetConfig.ignore ?? [];
8
+ }
9
+ function shouldIgnorePackage(packageName, ignoredPackages) {
10
+ return ignoredPackages.some(ignoredPackage => {
11
+ if (ignoredPackage.endsWith('*')) {
12
+ return packageName.startsWith(ignoredPackage.slice(0, -1));
13
+ }
14
+ return packageName === ignoredPackage;
15
+ });
16
+ }
5
17
  async function getPackagesNames(files) {
18
+ const ignoredPackages = await getChangesetIgnoredPackages();
6
19
  const packages = [];
7
20
  const promises = files.map(async file => {
8
21
  const data = JSON.parse(await fs.readFile(file, 'utf8'));
22
+ if (shouldIgnorePackage(data.name, ignoredPackages)) {
23
+ return;
24
+ }
9
25
  if (!data.workspaces && data.version) {
10
26
  packages.push(data.name);
11
27
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@scaleway/changesets-renovate",
3
- "version": "1.2.7",
3
+ "version": "1.3.0",
4
4
  "description": "Automatically create changesets for Renovate",
5
5
  "type": "module",
6
6
  "engines": {