@adbayb/stack 0.0.0-next-fd6185e → 0.0.0-next-4a1a044

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.
@@ -192,7 +192,6 @@ export const config = [
192
192
  "sonarjs/sonar-no-empty-character-class": "error",
193
193
  "sonarjs/sonar-no-fallthrough": "error",
194
194
  "sonarjs/sonar-no-invalid-regexp": "error",
195
- "sonarjs/sonar-no-magic-numbers": "error",
196
195
  "sonarjs/sonar-no-misleading-character-class": "error",
197
196
  "sonarjs/sonar-no-regex-spaces": "error",
198
197
  // "sonarjs/sonar-no-unused-class-component-methods": "error", // Disabled since it involves `eslint-plugin-react` activation
package/dist/index.js CHANGED
@@ -2,7 +2,7 @@ import { helpers, termost } from 'termost';
2
2
  import process from 'node:process';
3
3
  import { resolve, join } from 'node:path';
4
4
  import { createRequire } from 'node:module';
5
- import { writeFile, chmod, mkdir, symlink } from 'node:fs/promises';
5
+ import { writeFile, chmod, mkdir, symlink, rm } from 'node:fs/promises';
6
6
  import { existsSync, cpSync, readFileSync, renameSync, writeFileSync, readdirSync } from 'node:fs';
7
7
  import { fdir } from 'fdir';
8
8
 
@@ -167,7 +167,7 @@ const ESLINT_EXTENSIONS = [
167
167
  "mdx"
168
168
  ];
169
169
 
170
- var version = "0.0.0-next-fd6185e";
170
+ var version = "0.0.0-next-4a1a044";
171
171
 
172
172
  const createWatchCommand = (program)=>{
173
173
  program.command({
@@ -519,7 +519,8 @@ const createCleanCommand = (program)=>{
519
519
  }
520
520
  }).task({
521
521
  handler ({ files }) {
522
- helpers.message(`Removed assets: ${files.join(", ")}\n`, {
522
+ helpers.message(files.join("\n "), {
523
+ label: "Removed assets",
523
524
  type: "information"
524
525
  });
525
526
  },
@@ -530,15 +531,17 @@ const createCleanCommand = (program)=>{
530
531
  };
531
532
  const label$1 = (message)=>`${message} 🧹`;
532
533
  const cleanFiles = async (files)=>{
533
- return helpers.exec(`rm -rf ${files.join(" ")}`);
534
+ return Promise.all(files.map(async (file)=>rm(file, {
535
+ force: true,
536
+ recursive: true
537
+ })));
534
538
  };
535
539
  const isDirectoryExistAndNotEmpty = (path)=>{
536
540
  return existsSync(path) && readdirSync(path).length > 0;
537
541
  };
538
542
  const retrieveIgnoredFiles = async ()=>{
539
- const excludedFiles = PRESERVE_FILES.join(String.raw`\|`);
540
- const rawFiles = await helpers.exec(`git clean -fdXn | grep -v '${excludedFiles}' | cut -c 14-`);
541
- return rawFiles.split(/\n/).filter(Boolean);
543
+ const rawFiles = await helpers.exec("git clean -fdXn");
544
+ return rawFiles.split(/\n|\r\n/).filter((cleanOutput)=>!PRESERVE_FILES.some((excludedFile)=>cleanOutput.includes(excludedFile))).map((cleanOutput)=>cleanOutput.split(" ").at(-1));
542
545
  };
543
546
  const PRESERVE_FILES = [
544
547
  "node_modules"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adbayb/stack",
3
- "version": "0.0.0-next-fd6185e",
3
+ "version": "0.0.0-next-4a1a044",
4
4
  "description": "My opinionated JavaScript-based toolchain",
5
5
  "publishConfig": {
6
6
  "access": "public"