@anolilab/prettier-config 5.0.14 → 6.0.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 +28 -0
- package/README.md +4 -6
- package/dist/bin.mjs +13 -0
- package/dist/index.cjs +1 -0
- package/dist/index.d.cts +5 -0
- package/dist/index.mjs +1 -3
- package/package.json +24 -30
- package/dist/chunk-3OYUO3P4.js +0 -7
- package/dist/chunk-3OYUO3P4.js.map +0 -1
- package/dist/chunk-WDFZ7A7B.mjs +0 -5
- package/dist/chunk-WDFZ7A7B.mjs.map +0 -1
- package/dist/index.js +0 -9
- package/dist/index.js.map +0 -1
- package/dist/index.mjs.map +0 -1
- package/dist/postinstall.d.mts +0 -2
- package/dist/postinstall.d.ts +0 -2
- package/dist/postinstall.js +0 -23
- package/dist/postinstall.js.map +0 -1
- package/dist/postinstall.mjs +0 -21
- package/dist/postinstall.mjs.map +0 -1
- package/skip.js +0 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,31 @@
|
|
|
1
|
+
## @anolilab/prettier-config [6.0.0](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@5.0.14...@anolilab/prettier-config@6.0.0) (2025-05-26)
|
|
2
|
+
|
|
3
|
+
### ⚠ BREAKING CHANGES
|
|
4
|
+
|
|
5
|
+
* **prettier-config:** changed post-install script to a bin command call, removed support for prettier v2
|
|
6
|
+
Signed-off-by: prisis <d.bannert@anolilab.de>
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* **prettier-config:** removed post-install script, updated dev-dependencies, allowed node 23 ([d1866a0](https://github.com/anolilab/javascript-style-guide/commit/d1866a01bfd816d84f58a024f369af9d9aa1f386))
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
* **prettier-config:** removed @anolilab/package-json-utils ([804c365](https://github.com/anolilab/javascript-style-guide/commit/804c36534afec53996e2a87c84b243245a4a9649))
|
|
15
|
+
|
|
16
|
+
### Miscellaneous Chores
|
|
17
|
+
|
|
18
|
+
* clean update after code changes ([c1ec624](https://github.com/anolilab/javascript-style-guide/commit/c1ec6245a20abfcf1e1d717e148464480f59262c))
|
|
19
|
+
* **prettier-config:** updated dev dependencies ([18b59d1](https://github.com/anolilab/javascript-style-guide/commit/18b59d125945bcbfc9d233824b24b98722f11d15))
|
|
20
|
+
* remove deprecated ESLint and Prettier configurations, update project structure and dependencies ([7b269ed](https://github.com/anolilab/javascript-style-guide/commit/7b269eda93e7dbede5fbdb536dec518dab2bc54b))
|
|
21
|
+
* update node engine compatibility across multiple packages ([8755783](https://github.com/anolilab/javascript-style-guide/commit/8755783d4be3199bd602ede7d83628f83be3f358))
|
|
22
|
+
* update prettier-config dependencies to latest versions ([ae0c554](https://github.com/anolilab/javascript-style-guide/commit/ae0c554c57416b606e72b6c28ed65cf9d056bc73))
|
|
23
|
+
* updated dev dependencies ([89cb5c7](https://github.com/anolilab/javascript-style-guide/commit/89cb5c72b14fc27041783804f1098c2ecfc3cc33))
|
|
24
|
+
|
|
25
|
+
### Continuous Integration
|
|
26
|
+
|
|
27
|
+
* fixed build workflow ([622591f](https://github.com/anolilab/javascript-style-guide/commit/622591f129fea0d30129d45346e49795169accd2))
|
|
28
|
+
|
|
1
29
|
## @anolilab/prettier-config [5.0.14](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@5.0.13...@anolilab/prettier-config@5.0.14) (2023-12-22)
|
|
2
30
|
|
|
3
31
|
|
package/README.md
CHANGED
|
@@ -23,25 +23,23 @@ Package that contains shareable configuration for [prettier](https://github.com/
|
|
|
23
23
|
## Install
|
|
24
24
|
|
|
25
25
|
```bash
|
|
26
|
-
npm install --dev-save @anolilab/prettier-config
|
|
26
|
+
npm install --dev-save prettier @anolilab/prettier-config
|
|
27
27
|
```
|
|
28
28
|
|
|
29
29
|
```sh
|
|
30
|
-
yarn add -D @anolilab/prettier-config
|
|
30
|
+
yarn add -D prettier @anolilab/prettier-config
|
|
31
31
|
```
|
|
32
32
|
|
|
33
33
|
```sh
|
|
34
|
-
pnpm add -D @anolilab/prettier-config
|
|
34
|
+
pnpm add -D prettier @anolilab/prettier-config
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
## Usage
|
|
38
38
|
|
|
39
|
-
If you don’t have a `.prettierrc.js` and `.prettierignore`, we
|
|
39
|
+
If you don’t have a `.prettierrc.js` or the other supported file names and `.prettierignore`, we can create the file for you after installing `@anolilab/prettier-config`, call `pnpm prettier-config:install`.
|
|
40
40
|
|
|
41
41
|
> Note: If the script detects an existing `.prettierrc.js` file, it will not overwrite it.
|
|
42
42
|
|
|
43
|
-
> Note: It can happen that the postinstall script don't run, then you have to add the `.prettierrc.js` manually.
|
|
44
|
-
|
|
45
43
|
<details>
|
|
46
44
|
<summary>File content of the `.prettierrc.js`</summary>
|
|
47
45
|
|
package/dist/bin.mjs
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
var p=Object.defineProperty;var l=(e,r)=>p(e,"name",{value:r,configurable:!0});import{existsSync as a}from"node:fs";import{readFile as g,writeFile as c}from"node:fs/promises";import{join as i}from"node:path";import{exit as s}from"node:process";const m={arrowParens:"always",bracketSpacing:!0,embeddedLanguageFormatting:"auto",endOfLine:"lf",htmlWhitespaceSensitivity:"css",insertPragma:!1,jsxSingleQuote:!1,overrides:[{files:".eslintrc",options:{parser:"json"}},{files:".prettierrc",options:{parser:"json"}},{files:".stylelintrc",options:{parser:"json"}},{files:"package*.json",options:{printWidth:1e3}},{files:"*.yml",options:{singleQuote:!1}},{files:"*.yaml",options:{singleQuote:!1}}],printWidth:160,proseWrap:"preserve",quoteProps:"as-needed",rangeEnd:Number.POSITIVE_INFINITY,rangeStart:0,requirePragma:!1,semi:!0,singleQuote:!1,tabWidth:4,trailingComma:"all",useTabs:!1,vueIndentScriptAndStyle:!1};var u=Object.defineProperty,f=l((e,r)=>u(e,"name",{value:r,configurable:!0}),"a");const t=".prettierrc",d=f(async(e,r)=>{for(const o of[t,`${t}.js`,`${t}.cjs`,`${t}.mjs`,`${t}.json`,`${t}.json5`,`${t}.yaml`,`${t}.yml`,`${t}.toml`,"prettier.config.js","prettier.config.mjs","prettier.config.cjs"])if(a(i(e,o))){console.warn(`⚠️ ${o} already exists;
|
|
3
|
+
Make sure that it includes the following for @anolilab/prettier-config to work as it should:
|
|
4
|
+
${JSON.stringify(m,void 0,4)}
|
|
5
|
+
`);return}const n=i(e,".prettierrc.js");await c(n,`${r?'import config from "@anolilab/prettier-config";':'var config = require("@anolilab/prettier-config");'}
|
|
6
|
+
|
|
7
|
+
${r?"export default":"module.exports ="} {
|
|
8
|
+
...config,
|
|
9
|
+
}
|
|
10
|
+
`,"utf8")},"writePrettierRc"),y=f(async e=>{const r=i(e,".prettierignore");if(a(r)){console.warn("⚠️ .prettierignore already exists");return}await c(r,`${["*.md","*.sh","*.yml","*.svg","*.gif","*.log",".DS_Store","CNAME","AUTHORS","LICENSE","es/","lib/","dist/","coverage/"].join(`
|
|
11
|
+
`)}
|
|
12
|
+
`,"utf8")},"writePrettierIgnore");(async()=>{const e=process.cwd(),r=i(e,"package.json");a(r)||(console.error("No package.json found in the current directory. You need to run this command in a directory with a package.json file."),s(1));const n=JSON.parse(await g(r,"utf-8"));console.log("Configuring @anolilab/prettier-config",e,`
|
|
13
|
+
`);try{await d(e,n.type==="module"),await y(e),console.log("Everything went well, have fun!"),s(0)}catch(o){console.error("Something went wrong:",o),s(1)}})();
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";const e={arrowParens:"always",bracketSpacing:!0,embeddedLanguageFormatting:"auto",endOfLine:"lf",htmlWhitespaceSensitivity:"css",insertPragma:!1,jsxSingleQuote:!1,overrides:[{files:".eslintrc",options:{parser:"json"}},{files:".prettierrc",options:{parser:"json"}},{files:".stylelintrc",options:{parser:"json"}},{files:"package*.json",options:{printWidth:1e3}},{files:"*.yml",options:{singleQuote:!1}},{files:"*.yaml",options:{singleQuote:!1}}],printWidth:160,proseWrap:"preserve",quoteProps:"as-needed",rangeEnd:Number.POSITIVE_INFINITY,rangeStart:0,requirePragma:!1,semi:!0,singleQuote:!1,tabWidth:4,trailingComma:"all",useTabs:!1,vueIndentScriptAndStyle:!1};module.exports=e;
|
package/dist/index.d.cts
ADDED
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1 @@
|
|
|
1
|
-
|
|
2
|
-
//# sourceMappingURL=out.js.map
|
|
3
|
-
//# sourceMappingURL=index.mjs.map
|
|
1
|
+
const e={arrowParens:"always",bracketSpacing:!0,embeddedLanguageFormatting:"auto",endOfLine:"lf",htmlWhitespaceSensitivity:"css",insertPragma:!1,jsxSingleQuote:!1,overrides:[{files:".eslintrc",options:{parser:"json"}},{files:".prettierrc",options:{parser:"json"}},{files:".stylelintrc",options:{parser:"json"}},{files:"package*.json",options:{printWidth:1e3}},{files:"*.yml",options:{singleQuote:!1}},{files:"*.yaml",options:{singleQuote:!1}}],printWidth:160,proseWrap:"preserve",quoteProps:"as-needed",rangeEnd:Number.POSITIVE_INFINITY,rangeStart:0,requirePragma:!1,semi:!0,singleQuote:!1,tabWidth:4,trailingComma:"all",useTabs:!1,vueIndentScriptAndStyle:!1};export{e as default};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/prettier-config",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "Prettier shareable config for Anolilab.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -32,53 +32,47 @@
|
|
|
32
32
|
"email": "d.bannert@anolilab.de"
|
|
33
33
|
},
|
|
34
34
|
"sideEffects": false,
|
|
35
|
+
"type": "module",
|
|
35
36
|
"exports": {
|
|
36
37
|
".": {
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
"require": {
|
|
39
|
+
"types": "./dist/index.d.cts",
|
|
40
|
+
"default": "./dist/index.cjs"
|
|
41
|
+
},
|
|
42
|
+
"import": {
|
|
43
|
+
"types": "./dist/index.d.mts",
|
|
44
|
+
"default": "./dist/index.mjs"
|
|
45
|
+
}
|
|
40
46
|
},
|
|
41
47
|
"./package.json": "./package.json"
|
|
42
48
|
},
|
|
43
|
-
"main": "dist/index.
|
|
49
|
+
"main": "dist/index.cjs",
|
|
44
50
|
"module": "dist/index.mjs",
|
|
45
51
|
"types": "dist/index.d.ts",
|
|
52
|
+
"typesVersions": {
|
|
53
|
+
">=5.0": {
|
|
54
|
+
".": [
|
|
55
|
+
"./dist/index.d.ts"
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
},
|
|
59
|
+
"bin": {
|
|
60
|
+
"prettier-config:install": "./dist/bin.mjs"
|
|
61
|
+
},
|
|
46
62
|
"files": [
|
|
47
63
|
"dist",
|
|
48
|
-
"skip.js",
|
|
49
64
|
"README.md",
|
|
50
65
|
"CHANGELOG.md",
|
|
51
66
|
"LICENSE.md"
|
|
52
67
|
],
|
|
53
|
-
"scripts": {
|
|
54
|
-
"build": "cross-env NODE_ENV=development tsup",
|
|
55
|
-
"build:prod": "cross-env NODE_ENV=production tsup",
|
|
56
|
-
"clean": "rimraf node_modules dist",
|
|
57
|
-
"postinstall": "node ./skip.js || node ./dist/postinstall.js"
|
|
58
|
-
},
|
|
59
|
-
"dependencies": {
|
|
60
|
-
"@anolilab/package-json-utils": "3.0.9"
|
|
61
|
-
},
|
|
62
|
-
"devDependencies": {
|
|
63
|
-
"@anolilab/semantic-release-preset": "8.0.3",
|
|
64
|
-
"prettier": "^3.1.1",
|
|
65
|
-
"rimraf": "^5.0.5",
|
|
66
|
-
"semantic-release": "^22.0.12",
|
|
67
|
-
"tsup": "^8.0.1",
|
|
68
|
-
"vitest": "^1.1.0"
|
|
69
|
-
},
|
|
70
68
|
"peerDependencies": {
|
|
71
|
-
"prettier": "
|
|
69
|
+
"prettier": "3.x"
|
|
72
70
|
},
|
|
73
71
|
"engines": {
|
|
74
|
-
"node": ">=18.* <=
|
|
72
|
+
"node": ">=20.18.* <=24.*"
|
|
75
73
|
},
|
|
76
74
|
"publishConfig": {
|
|
77
75
|
"access": "public",
|
|
78
76
|
"provenance": true
|
|
79
|
-
}
|
|
80
|
-
"sources": [
|
|
81
|
-
"src/index.ts",
|
|
82
|
-
"src/postinstall.ts"
|
|
83
|
-
]
|
|
77
|
+
}
|
|
84
78
|
}
|
package/dist/chunk-3OYUO3P4.js
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var e={arrowParens:"always",bracketSpacing:!0,embeddedLanguageFormatting:"auto",endOfLine:"lf",htmlWhitespaceSensitivity:"css",insertPragma:!1,jsxSingleQuote:!1,overrides:[{files:".eslintrc",options:{parser:"json"}},{files:".prettierrc",options:{parser:"json"}},{files:".stylelintrc",options:{parser:"json"}},{files:"package*.json",options:{printWidth:1e3}},{files:"*.yml",options:{singleQuote:!1}},{files:"*.yaml",options:{singleQuote:!1}}],printWidth:160,proseWrap:"preserve",quoteProps:"as-needed",rangeEnd:Number.POSITIVE_INFINITY,rangeStart:0,requirePragma:!1,semi:!0,singleQuote:!1,tabWidth:4,trailingComma:"all",useTabs:!1,vueIndentScriptAndStyle:!1},s=e;
|
|
4
|
-
|
|
5
|
-
exports.a = s;
|
|
6
|
-
//# sourceMappingURL=out.js.map
|
|
7
|
-
//# sourceMappingURL=chunk-3OYUO3P4.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["config","src_default"],"mappings":"AAEA,IAAMA,EAAiB,CAEnB,YAAa,SAEb,eAAgB,GAEhB,2BAA4B,OAE5B,UAAW,KAEX,0BAA2B,MAE3B,aAAc,GAEd,eAAgB,GAChB,UAAW,CACP,CAAE,MAAO,YAAa,QAAS,CAAE,OAAQ,MAAO,CAAE,EAClD,CAAE,MAAO,cAAe,QAAS,CAAE,OAAQ,MAAO,CAAE,EACpD,CAAE,MAAO,eAAgB,QAAS,CAAE,OAAQ,MAAO,CAAE,EACrD,CAAE,MAAO,gBAAiB,QAAS,CAAE,WAAY,GAAK,CAAE,EACxD,CAAE,MAAO,QAAS,QAAS,CAAE,YAAa,EAAM,CAAE,EAClD,CAAE,MAAO,SAAU,QAAS,CAAE,YAAa,EAAM,CAAE,CACvD,EAEA,WAAY,IAEZ,UAAW,WAEX,WAAY,YACZ,SAAU,OAAO,kBAEjB,WAAY,EAEZ,cAAe,GAEf,KAAM,GAEN,YAAa,GAEb,SAAU,EAEV,cAAe,MAEf,QAAS,GAET,wBAAyB,EAC7B,EAEOC,EAAQD","sourcesContent":["import type { Config } from \"prettier\";\n\nconst config: Config = {\n // brackets are required for arrow function parameter, even when there is only one parameter\n arrowParens: \"always\",\n // spaces are required at the beginning and end of the braces\n bracketSpacing: true,\n // formats quoted code embedded\n embeddedLanguageFormatting: \"auto\",\n // lf for newline\n endOfLine: \"lf\",\n // decide whether to break the html according to the display style\n htmlWhitespaceSensitivity: \"css\",\n // No need to automatically insert @prettier at the beginning of the file\n insertPragma: false,\n // use double quotes instead of single quotes in jsx\n jsxSingleQuote: false,\n overrides: [\n { files: \".eslintrc\", options: { parser: \"json\" } },\n { files: \".prettierrc\", options: { parser: \"json\" } },\n { files: \".stylelintrc\", options: { parser: \"json\" } },\n { files: \"package*.json\", options: { printWidth: 1000 } },\n { files: \"*.yml\", options: { singleQuote: false } },\n { files: \"*.yaml\", options: { singleQuote: false } },\n ],\n // max 160 characters per line\n printWidth: 160,\n // use default break criteria\n proseWrap: \"preserve\",\n // object's key is quoted only when necessary\n quoteProps: \"as-needed\",\n rangeEnd: Number.POSITIVE_INFINITY,\n // format the entire contents of the file\n rangeStart: 0,\n // no need to write the beginning @prettier of the file\n requirePragma: false,\n // semicolon at the end of the line\n semi: true,\n // use single quotes\n singleQuote: false,\n // use 4 spaces for indentation\n tabWidth: 4,\n // all comma at the end\n trailingComma: \"all\",\n // use spaces instead of indentations\n useTabs: false,\n // vue files script and style tags indentation\n vueIndentScriptAndStyle: false,\n};\n\nexport default config;\n"]}
|
package/dist/chunk-WDFZ7A7B.mjs
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
var e={arrowParens:"always",bracketSpacing:!0,embeddedLanguageFormatting:"auto",endOfLine:"lf",htmlWhitespaceSensitivity:"css",insertPragma:!1,jsxSingleQuote:!1,overrides:[{files:".eslintrc",options:{parser:"json"}},{files:".prettierrc",options:{parser:"json"}},{files:".stylelintrc",options:{parser:"json"}},{files:"package*.json",options:{printWidth:1e3}},{files:"*.yml",options:{singleQuote:!1}},{files:"*.yaml",options:{singleQuote:!1}}],printWidth:160,proseWrap:"preserve",quoteProps:"as-needed",rangeEnd:Number.POSITIVE_INFINITY,rangeStart:0,requirePragma:!1,semi:!0,singleQuote:!1,tabWidth:4,trailingComma:"all",useTabs:!1,vueIndentScriptAndStyle:!1},s=e;
|
|
2
|
-
|
|
3
|
-
export { s as a };
|
|
4
|
-
//# sourceMappingURL=out.js.map
|
|
5
|
-
//# sourceMappingURL=chunk-WDFZ7A7B.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts"],"names":["config","src_default"],"mappings":"AAEA,IAAMA,EAAiB,CAEnB,YAAa,SAEb,eAAgB,GAEhB,2BAA4B,OAE5B,UAAW,KAEX,0BAA2B,MAE3B,aAAc,GAEd,eAAgB,GAChB,UAAW,CACP,CAAE,MAAO,YAAa,QAAS,CAAE,OAAQ,MAAO,CAAE,EAClD,CAAE,MAAO,cAAe,QAAS,CAAE,OAAQ,MAAO,CAAE,EACpD,CAAE,MAAO,eAAgB,QAAS,CAAE,OAAQ,MAAO,CAAE,EACrD,CAAE,MAAO,gBAAiB,QAAS,CAAE,WAAY,GAAK,CAAE,EACxD,CAAE,MAAO,QAAS,QAAS,CAAE,YAAa,EAAM,CAAE,EAClD,CAAE,MAAO,SAAU,QAAS,CAAE,YAAa,EAAM,CAAE,CACvD,EAEA,WAAY,IAEZ,UAAW,WAEX,WAAY,YACZ,SAAU,OAAO,kBAEjB,WAAY,EAEZ,cAAe,GAEf,KAAM,GAEN,YAAa,GAEb,SAAU,EAEV,cAAe,MAEf,QAAS,GAET,wBAAyB,EAC7B,EAEOC,EAAQD","sourcesContent":["import type { Config } from \"prettier\";\n\nconst config: Config = {\n // brackets are required for arrow function parameter, even when there is only one parameter\n arrowParens: \"always\",\n // spaces are required at the beginning and end of the braces\n bracketSpacing: true,\n // formats quoted code embedded\n embeddedLanguageFormatting: \"auto\",\n // lf for newline\n endOfLine: \"lf\",\n // decide whether to break the html according to the display style\n htmlWhitespaceSensitivity: \"css\",\n // No need to automatically insert @prettier at the beginning of the file\n insertPragma: false,\n // use double quotes instead of single quotes in jsx\n jsxSingleQuote: false,\n overrides: [\n { files: \".eslintrc\", options: { parser: \"json\" } },\n { files: \".prettierrc\", options: { parser: \"json\" } },\n { files: \".stylelintrc\", options: { parser: \"json\" } },\n { files: \"package*.json\", options: { printWidth: 1000 } },\n { files: \"*.yml\", options: { singleQuote: false } },\n { files: \"*.yaml\", options: { singleQuote: false } },\n ],\n // max 160 characters per line\n printWidth: 160,\n // use default break criteria\n proseWrap: \"preserve\",\n // object's key is quoted only when necessary\n quoteProps: \"as-needed\",\n rangeEnd: Number.POSITIVE_INFINITY,\n // format the entire contents of the file\n rangeStart: 0,\n // no need to write the beginning @prettier of the file\n requirePragma: false,\n // semicolon at the end of the line\n semi: true,\n // use single quotes\n singleQuote: false,\n // use 4 spaces for indentation\n tabWidth: 4,\n // all comma at the end\n trailingComma: \"all\",\n // use spaces instead of indentations\n useTabs: false,\n // vue files script and style tags indentation\n vueIndentScriptAndStyle: false,\n};\n\nexport default config;\n"]}
|
package/dist/index.js
DELETED
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/index.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":[],"names":[],"mappings":""}
|
package/dist/postinstall.d.mts
DELETED
package/dist/postinstall.d.ts
DELETED
package/dist/postinstall.js
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
var chunk3OYUO3P4_js = require('./chunk-3OYUO3P4.js');
|
|
4
|
-
var fs = require('fs');
|
|
5
|
-
var path = require('path');
|
|
6
|
-
var process = require('process');
|
|
7
|
-
var util = require('util');
|
|
8
|
-
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
9
|
-
|
|
10
|
-
process.env.CI!==void 0&&process.exit(0);var a=util.promisify(fs.writeFile);console.log("Configuring @anolilab/prettier-config",packageJsonUtils.projectPath,`
|
|
11
|
-
`);var e=".prettierrc",m=async()=>{for(let n of [e,`${e}.js`,`${e}.cjs`,`${e}.json`,`${e}.json5`,`${e}.yaml`,`${e}.yml`,`${e}.toml`,"prettier.config.js","prettier.config.cjs"])if(fs.existsSync(path.join(packageJsonUtils.projectPath,n))){console.warn(`\u26A0\uFE0F ${n} already exists;
|
|
12
|
-
Make sure that it includes the following for @anolilab/prettier-config to work as it should:
|
|
13
|
-
${JSON.stringify(chunk3OYUO3P4_js.a,void 0,4)}
|
|
14
|
-
`);return}let r=path.join(packageJsonUtils.projectPath,".prettierrc.js");await a(r,`${packageJsonUtils.packageIsTypeModule?'import config from "@anolilab/prettier-config";':'var config = require("@anolilab/prettier-config");'}
|
|
15
|
-
|
|
16
|
-
${packageJsonUtils.packageIsTypeModule?"export default":"module.exports ="} {
|
|
17
|
-
...config,
|
|
18
|
-
}
|
|
19
|
-
`,"utf8");},u=async()=>{let r=path.join(packageJsonUtils.projectPath,".prettierignore");if(fs.existsSync(r)){console.warn("\u26A0\uFE0F .prettierignore already exists");return}await a(r,`${["*.md","*.sh","*.yml","*.svg","*.gif","*.log",".DS_Store","CNAME","AUTHORS","LICENSE","es/","lib/","dist/","coverage/"].join(`
|
|
20
|
-
`)}
|
|
21
|
-
`,"utf8");};(async()=>{try{await Promise.all([m(),u()]),console.log("\u{1F60E} Everything went well, have fun!"),process.exit(0);}catch(r){console.log("\u{1F62C} something went wrong:"),console.error(r),process.exit(1);}})();
|
|
22
|
-
//# sourceMappingURL=out.js.map
|
|
23
|
-
//# sourceMappingURL=postinstall.js.map
|
package/dist/postinstall.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","env","exit","promisify","packageIsTypeModule","projectPath","writeFileAsync","configFile","writePrettierRc","filename","src_default","prettierPath","writePrettierIgnore","error"],"mappings":"wCAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,OAAAC,EAAK,QAAAC,MAAY,UAC1B,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAI7CJ,EAAI,KAAU,QACdC,EAAK,CAAC,EAGV,IAAMI,EAAiBH,EAAUJ,CAAS,EAE1C,QAAQ,IAAI,wCAAyCM,EAAa;AAAA,CAAI,EAEtE,IAAME,EAAa,cAKbC,EAAkB,SAAY,CAEhC,QAAWC,IAAY,CACnBF,EACA,GAAGA,CAAU,MACb,GAAGA,CAAU,OACb,GAAGA,CAAU,QACb,GAAGA,CAAU,SACb,GAAGA,CAAU,QACb,GAAGA,CAAU,OACb,GAAGA,CAAU,QACb,qBACA,qBACJ,EAEI,GAAIT,EAAWE,EAAKK,EAAaI,CAAQ,CAAC,EAAG,CACzC,QAAQ,KAAK,iBAAOA,CAAQ;AAAA;AAAA,EAEtC,KAAK,UAAUC,EAAS,OAAW,CAAC,CAAC;AAAA,CAAI,EAE/B,MACJ,CAGJ,IAAMC,EAAeX,EAAKK,EAAa,gBAAgB,EAEvD,MAAMC,EACFK,EACA,GAAGP,EAAsB,kDAAoD,oDAAoD;AAAA;AAAA,EAEvIA,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA,EAIrD,MACJ,CACJ,EAKMQ,EAAsB,SAAY,CACpC,IAAMD,EAAeX,EAAKK,EAAa,iBAAiB,EAGxD,GAAIP,EAAWa,CAAY,EAAG,CAC1B,QAAQ,KAAK,8CAAoC,EAEjD,MACJ,CAEA,MAAML,EACFK,EACA,GAAG,CAAC,OAAQ,OAAQ,QAAS,QAAS,QAAS,QAAS,YAAa,QAAS,UAAW,UAAW,MAAO,OAAQ,QAAS,WAAW,EAAE,KAAK;AAAA,CAAI,CAAC;AAAA,EACnJ,MACJ,CACJ,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACH,EAAgB,EAAGI,EAAoB,CAAC,CAAC,EAE5D,QAAQ,IAAI,4CAAqC,EAEjDV,EAAK,CAAC,CACV,OAASW,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBX,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { env, exit } from \"node:process\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nimport content from \".\";\n\nif (env[\"CI\"] !== undefined) {\n exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/prettier-config\", projectPath, \"\\n\");\n\nconst configFile = \".prettierrc\";\n\n/**\n * Writes .prettierrc.${m|c}js if it doesn't exist. Warns if it exists.\n */\nconst writePrettierRc = async () => {\n // eslint-disable-next-line no-restricted-syntax,no-loops/no-loops\n for (const filename of [\n configFile,\n `${configFile}.js`,\n `${configFile}.cjs`,\n `${configFile}.json`,\n `${configFile}.json5`,\n `${configFile}.yaml`,\n `${configFile}.yml`,\n `${configFile}.toml`,\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n ]) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(join(projectPath, filename))) {\n console.warn(`⚠️ ${filename} already exists;\nMake sure that it includes the following for @anolilab/prettier-config to work as it should:\n${JSON.stringify(content, undefined, 4)}\\n`);\n\n return;\n }\n }\n\n const prettierPath = join(projectPath, \".prettierrc.js\");\n\n await writeFileAsync(\n prettierPath,\n `${packageIsTypeModule ? 'import config from \"@anolilab/prettier-config\";' : 'var config = require(\"@anolilab/prettier-config\");'}\n\n${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n ...config,\n}\n`,\n \"utf8\",\n );\n};\n\n/**\n * Writes .prettierignore if it doesn't exist. Warns if it exists.\n */\nconst writePrettierIgnore = async () => {\n const prettierPath = join(projectPath, \".prettierignore\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(prettierPath)) {\n console.warn(\"⚠️ .prettierignore already exists\");\n\n return;\n }\n\n await writeFileAsync(\n prettierPath,\n `${[\"*.md\", \"*.sh\", \"*.yml\", \"*.svg\", \"*.gif\", \"*.log\", \".DS_Store\", \"CNAME\", \"AUTHORS\", \"LICENSE\", \"es/\", \"lib/\", \"dist/\", \"coverage/\"].join(\"\\n\")}\\n`,\n \"utf8\",\n );\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writePrettierRc(), writePrettierIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n exit(1);\n }\n})();\n"]}
|
package/dist/postinstall.mjs
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { a as a$1 } from './chunk-WDFZ7A7B.mjs';
|
|
2
|
-
import { writeFile, existsSync } from 'fs';
|
|
3
|
-
import { join } from 'path';
|
|
4
|
-
import { env, exit } from 'process';
|
|
5
|
-
import { promisify } from 'util';
|
|
6
|
-
import { projectPath, packageIsTypeModule } from '@anolilab/package-json-utils';
|
|
7
|
-
|
|
8
|
-
env.CI!==void 0&&exit(0);var a=promisify(writeFile);console.log("Configuring @anolilab/prettier-config",projectPath,`
|
|
9
|
-
`);var e=".prettierrc",m=async()=>{for(let n of [e,`${e}.js`,`${e}.cjs`,`${e}.json`,`${e}.json5`,`${e}.yaml`,`${e}.yml`,`${e}.toml`,"prettier.config.js","prettier.config.cjs"])if(existsSync(join(projectPath,n))){console.warn(`\u26A0\uFE0F ${n} already exists;
|
|
10
|
-
Make sure that it includes the following for @anolilab/prettier-config to work as it should:
|
|
11
|
-
${JSON.stringify(a$1,void 0,4)}
|
|
12
|
-
`);return}let r=join(projectPath,".prettierrc.js");await a(r,`${packageIsTypeModule?'import config from "@anolilab/prettier-config";':'var config = require("@anolilab/prettier-config");'}
|
|
13
|
-
|
|
14
|
-
${packageIsTypeModule?"export default":"module.exports ="} {
|
|
15
|
-
...config,
|
|
16
|
-
}
|
|
17
|
-
`,"utf8");},u=async()=>{let r=join(projectPath,".prettierignore");if(existsSync(r)){console.warn("\u26A0\uFE0F .prettierignore already exists");return}await a(r,`${["*.md","*.sh","*.yml","*.svg","*.gif","*.log",".DS_Store","CNAME","AUTHORS","LICENSE","es/","lib/","dist/","coverage/"].join(`
|
|
18
|
-
`)}
|
|
19
|
-
`,"utf8");};(async()=>{try{await Promise.all([m(),u()]),console.log("\u{1F60E} Everything went well, have fun!"),exit(0);}catch(r){console.log("\u{1F62C} something went wrong:"),console.error(r),exit(1);}})();
|
|
20
|
-
//# sourceMappingURL=out.js.map
|
|
21
|
-
//# sourceMappingURL=postinstall.mjs.map
|
package/dist/postinstall.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","env","exit","promisify","packageIsTypeModule","projectPath","writeFileAsync","configFile","writePrettierRc","filename","src_default","prettierPath","writePrettierIgnore","error"],"mappings":"yCAAA,OAAS,cAAAA,EAAY,aAAAC,MAAiB,KACtC,OAAS,QAAAC,MAAY,OACrB,OAAS,OAAAC,EAAK,QAAAC,MAAY,UAC1B,OAAS,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAI7CJ,EAAI,KAAU,QACdC,EAAK,CAAC,EAGV,IAAMI,EAAiBH,EAAUJ,CAAS,EAE1C,QAAQ,IAAI,wCAAyCM,EAAa;AAAA,CAAI,EAEtE,IAAME,EAAa,cAKbC,EAAkB,SAAY,CAEhC,QAAWC,IAAY,CACnBF,EACA,GAAGA,CAAU,MACb,GAAGA,CAAU,OACb,GAAGA,CAAU,QACb,GAAGA,CAAU,SACb,GAAGA,CAAU,QACb,GAAGA,CAAU,OACb,GAAGA,CAAU,QACb,qBACA,qBACJ,EAEI,GAAIT,EAAWE,EAAKK,EAAaI,CAAQ,CAAC,EAAG,CACzC,QAAQ,KAAK,iBAAOA,CAAQ;AAAA;AAAA,EAEtC,KAAK,UAAUC,EAAS,OAAW,CAAC,CAAC;AAAA,CAAI,EAE/B,MACJ,CAGJ,IAAMC,EAAeX,EAAKK,EAAa,gBAAgB,EAEvD,MAAMC,EACFK,EACA,GAAGP,EAAsB,kDAAoD,oDAAoD;AAAA;AAAA,EAEvIA,EAAsB,iBAAmB,kBAAkB;AAAA;AAAA;AAAA,EAIrD,MACJ,CACJ,EAKMQ,EAAsB,SAAY,CACpC,IAAMD,EAAeX,EAAKK,EAAa,iBAAiB,EAGxD,GAAIP,EAAWa,CAAY,EAAG,CAC1B,QAAQ,KAAK,8CAAoC,EAEjD,MACJ,CAEA,MAAML,EACFK,EACA,GAAG,CAAC,OAAQ,OAAQ,QAAS,QAAS,QAAS,QAAS,YAAa,QAAS,UAAW,UAAW,MAAO,OAAQ,QAAS,WAAW,EAAE,KAAK;AAAA,CAAI,CAAC;AAAA,EACnJ,MACJ,CACJ,GAGC,SAAY,CACT,GAAI,CAEA,MAAM,QAAQ,IAAI,CAACH,EAAgB,EAAGI,EAAoB,CAAC,CAAC,EAE5D,QAAQ,IAAI,4CAAqC,EAEjDV,EAAK,CAAC,CACV,OAASW,EAAO,CACZ,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAEnBX,EAAK,CAAC,CACV,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { env, exit } from \"node:process\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nimport content from \".\";\n\nif (env[\"CI\"] !== undefined) {\n exit(0);\n}\n\nconst writeFileAsync = promisify(writeFile);\n\nconsole.log(\"Configuring @anolilab/prettier-config\", projectPath, \"\\n\");\n\nconst configFile = \".prettierrc\";\n\n/**\n * Writes .prettierrc.${m|c}js if it doesn't exist. Warns if it exists.\n */\nconst writePrettierRc = async () => {\n // eslint-disable-next-line no-restricted-syntax,no-loops/no-loops\n for (const filename of [\n configFile,\n `${configFile}.js`,\n `${configFile}.cjs`,\n `${configFile}.json`,\n `${configFile}.json5`,\n `${configFile}.yaml`,\n `${configFile}.yml`,\n `${configFile}.toml`,\n \"prettier.config.js\",\n \"prettier.config.cjs\",\n ]) {\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(join(projectPath, filename))) {\n console.warn(`⚠️ ${filename} already exists;\nMake sure that it includes the following for @anolilab/prettier-config to work as it should:\n${JSON.stringify(content, undefined, 4)}\\n`);\n\n return;\n }\n }\n\n const prettierPath = join(projectPath, \".prettierrc.js\");\n\n await writeFileAsync(\n prettierPath,\n `${packageIsTypeModule ? 'import config from \"@anolilab/prettier-config\";' : 'var config = require(\"@anolilab/prettier-config\");'}\n\n${packageIsTypeModule ? \"export default\" : \"module.exports =\"} {\n ...config,\n}\n`,\n \"utf8\",\n );\n};\n\n/**\n * Writes .prettierignore if it doesn't exist. Warns if it exists.\n */\nconst writePrettierIgnore = async () => {\n const prettierPath = join(projectPath, \".prettierignore\");\n\n // eslint-disable-next-line security/detect-non-literal-fs-filename\n if (existsSync(prettierPath)) {\n console.warn(\"⚠️ .prettierignore already exists\");\n\n return;\n }\n\n await writeFileAsync(\n prettierPath,\n `${[\"*.md\", \"*.sh\", \"*.yml\", \"*.svg\", \"*.gif\", \"*.log\", \".DS_Store\", \"CNAME\", \"AUTHORS\", \"LICENSE\", \"es/\", \"lib/\", \"dist/\", \"coverage/\"].join(\"\\n\")}\\n`,\n \"utf8\",\n );\n};\n\n// eslint-disable-next-line unicorn/prefer-top-level-await\n(async () => {\n try {\n // eslint-disable-next-line compat/compat\n await Promise.all([writePrettierRc(), writePrettierIgnore()]);\n\n console.log(\"😎 Everything went well, have fun!\");\n\n exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n exit(1);\n }\n})();\n"]}
|