@sapphire-sh/utils 2.10.0 → 2.11.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.
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
 
3
- import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, writeFileSync } from 'node:fs';
3
+ import { copyFileSync, existsSync, mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs';
4
4
  import { basename, dirname, join } from 'node:path';
5
5
  import { fileURLToPath } from 'node:url';
6
6
 
@@ -8,7 +8,8 @@ const START_MARKER = '# @sapphire-sh/utils:start';
8
8
  const END_MARKER = '# @sapphire-sh/utils:end';
9
9
 
10
10
  const selfPackageName = '@sapphire-sh/utils';
11
- const selfSkipped = new Set([join('.github', 'workflows', 'utils-update.yml')]);
11
+ const selfSkipped = new Set([join('.github', 'workflows', 'shared-config-update.yml')]);
12
+ const obsoleteFiles = new Set([join('.github', 'workflows', 'utils-update.yml')]);
12
13
 
13
14
  const workflowsDir = join('.github', 'workflows');
14
15
  const workflowValuesPath = join('.github', 'sapphire-workflows.json');
@@ -143,3 +144,12 @@ for (const relativePath of collectTemplates(templatesDir, '')) {
143
144
  console.log(`wrote ${outputName}`);
144
145
  }
145
146
  }
147
+
148
+ for (const relativePath of obsoleteFiles) {
149
+ const filepath = join(cwd, relativePath);
150
+
151
+ if (existsSync(filepath)) {
152
+ rmSync(filepath);
153
+ console.log(`removed ${relativePath}`);
154
+ }
155
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapphire-sh/utils",
3
- "version": "2.10.0",
3
+ "version": "2.11.0",
4
4
  "description": "@sapphire-sh/utils",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -0,0 +1,18 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: npm
4
+ directory: /
5
+ schedule:
6
+ interval: cron
7
+ cronjob: '0 0 * * *'
8
+ groups:
9
+ dependencies:
10
+ patterns:
11
+ - '*'
12
+ exclude-patterns:
13
+ - '@sapphire-sh/utils'
14
+ - package-ecosystem: github-actions
15
+ directory: /
16
+ schedule:
17
+ interval: cron
18
+ cronjob: '0 0 * * *'
@@ -0,0 +1,17 @@
1
+ name: shared-config-update
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - package-lock.json
9
+ workflow_dispatch:
10
+
11
+ jobs:
12
+ update:
13
+ uses: sapphire-sh/github-actions/.github/workflows/shared-config-update-template.yml@main
14
+ permissions:
15
+ contents: write
16
+ issues: write
17
+ pull-requests: write
@@ -1,14 +0,0 @@
1
- name: utils-update
2
-
3
- on:
4
- schedule:
5
- - cron: '0 0 * * *'
6
- workflow_dispatch:
7
-
8
- jobs:
9
- update:
10
- uses: sapphire-sh/github-actions/.github/workflows/utils-update-template.yml@main
11
- permissions:
12
- contents: write
13
- issues: write
14
- pull-requests: write