@anolilab/prettier-config 5.0.3 → 5.0.5
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 +34 -0
- package/dist/postinstall.js +1 -1
- package/dist/postinstall.js.map +1 -1
- package/dist/postinstall.mjs +1 -1
- package/dist/postinstall.mjs.map +1 -1
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,37 @@
|
|
|
1
|
+
## @anolilab/prettier-config [5.0.5](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@5.0.4...@anolilab/prettier-config@5.0.5) (2023-09-14)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Styles
|
|
5
|
+
|
|
6
|
+
* cs fixes based on new rules ([b99c020](https://github.com/anolilab/javascript-style-guide/commit/b99c020b9f61f2517acd65b4d1a9f3d1f15812b1))
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Miscellaneous Chores
|
|
10
|
+
|
|
11
|
+
* **deps:** update dependency vitest to ^0.34.4 ([#755](https://github.com/anolilab/javascript-style-guide/issues/755)) ([3246b55](https://github.com/anolilab/javascript-style-guide/commit/3246b55702eae25cf8d95ac95bd5f9b1323b51ff))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Dependencies
|
|
16
|
+
|
|
17
|
+
* **@anolilab/semantic-release-preset:** upgraded to 6.0.6
|
|
18
|
+
|
|
19
|
+
## @anolilab/prettier-config [5.0.4](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@5.0.3...@anolilab/prettier-config@5.0.4) (2023-08-30)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
### Miscellaneous Chores
|
|
23
|
+
|
|
24
|
+
* **deps:** update dependency prettier to ^3.0.3 ([#737](https://github.com/anolilab/javascript-style-guide/issues/737)) ([6966403](https://github.com/anolilab/javascript-style-guide/commit/69664036183617fc6a8a1218f43d35f8f27ca87d))
|
|
25
|
+
* **deps:** update dependency semantic-release to ^21.1.1 ([#738](https://github.com/anolilab/javascript-style-guide/issues/738)) ([ee6e926](https://github.com/anolilab/javascript-style-guide/commit/ee6e926d19848a6d7aaca6b3b0f92befaed59e08))
|
|
26
|
+
* **deps:** update dependency vitest to ^0.34.3 ([#739](https://github.com/anolilab/javascript-style-guide/issues/739)) ([67dd404](https://github.com/anolilab/javascript-style-guide/commit/67dd404766bceb0103f637208fc646ed40aefb16))
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
### Dependencies
|
|
31
|
+
|
|
32
|
+
* **@anolilab/package-json-utils:** upgraded to 3.0.5
|
|
33
|
+
* **@anolilab/semantic-release-preset:** upgraded to 6.0.5
|
|
34
|
+
|
|
1
35
|
## @anolilab/prettier-config [5.0.3](https://github.com/anolilab/javascript-style-guide/compare/@anolilab/prettier-config@5.0.2...@anolilab/prettier-config@5.0.3) (2023-08-10)
|
|
2
36
|
|
|
3
37
|
|
package/dist/postinstall.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
3
|
var chunk3OYUO3P4_js = require('./chunk-3OYUO3P4.js');
|
|
4
|
-
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
5
4
|
var fs = require('fs');
|
|
6
5
|
var path = require('path');
|
|
7
6
|
var util = require('util');
|
|
7
|
+
var packageJsonUtils = require('@anolilab/package-json-utils');
|
|
8
8
|
|
|
9
9
|
process.env.CI&&process.exit(0);var l=util.promisify(fs.writeFile);console.log("Configuring @anolilab/prettier-config",packageJsonUtils.projectPath,`
|
|
10
10
|
`);var e=".prettierrc",g=async()=>{for(let i 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,i))){console.warn(`\u26A0\uFE0F ${i} already exists;
|
package/dist/postinstall.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/postinstall.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","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,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAI7C,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBH,EAAUF,CAAS,EAE1C,QAAQ,IAAI,wCAAyCI,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,GAAIP,EAAWE,EAAKG,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,EAAeT,EAAKG,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,EAAeT,EAAKG,EAAa,iBAAiB,EAGxD,GAAIL,EAAWW,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,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASC,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nimport content from \".\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.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\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 // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
|
package/dist/postinstall.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a } from './chunk-WDFZ7A7B.mjs';
|
|
2
|
-
import { projectPath, packageIsTypeModule } from '@anolilab/package-json-utils';
|
|
3
2
|
import { writeFile, existsSync } from 'fs';
|
|
4
3
|
import { join } from 'path';
|
|
5
4
|
import { promisify } from 'util';
|
|
5
|
+
import { projectPath, packageIsTypeModule } from '@anolilab/package-json-utils';
|
|
6
6
|
|
|
7
7
|
process.env.CI&&process.exit(0);var l=promisify(writeFile);console.log("Configuring @anolilab/prettier-config",projectPath,`
|
|
8
8
|
`);var e=".prettierrc",g=async()=>{for(let i 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,i))){console.warn(`\u26A0\uFE0F ${i} already exists;
|
package/dist/postinstall.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/postinstall.ts"],"names":["
|
|
1
|
+
{"version":3,"sources":["../src/postinstall.ts"],"names":["existsSync","writeFile","join","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,aAAAC,MAAiB,OAE1B,OAAS,uBAAAC,EAAqB,eAAAC,MAAmB,+BAI7C,QAAQ,IAAI,IAEZ,QAAQ,KAAK,CAAC,EAGlB,IAAMC,EAAiBH,EAAUF,CAAS,EAE1C,QAAQ,IAAI,wCAAyCI,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,GAAIP,EAAWE,EAAKG,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,EAAeT,EAAKG,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,EAAeT,EAAKG,EAAa,iBAAiB,EAGxD,GAAIL,EAAWW,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,EAGjD,QAAQ,KAAK,CAAC,CAClB,OAASC,EAAP,CACE,QAAQ,IAAI,kCAA2B,EACvC,QAAQ,MAAMA,CAAK,EAGnB,QAAQ,KAAK,CAAC,CAClB,CACJ,GAAG","sourcesContent":["import { existsSync, writeFile } from \"node:fs\";\nimport { join } from \"node:path\";\nimport { promisify } from \"node:util\";\n\nimport { packageIsTypeModule, projectPath } from \"@anolilab/package-json-utils\";\n\nimport content from \".\";\n\nif (process.env[\"CI\"]) {\n // eslint-disable-next-line unicorn/no-process-exit\n process.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\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 // eslint-disable-next-line unicorn/no-process-exit\n process.exit(0);\n } catch (error) {\n console.log(\"😬 something went wrong:\");\n console.error(error);\n\n // eslint-disable-next-line unicorn/no-process-exit\n process.exit(1);\n }\n})();\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/prettier-config",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.5",
|
|
4
4
|
"description": "Prettier shareable config for Anolilab.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"css",
|
|
@@ -57,15 +57,15 @@
|
|
|
57
57
|
"postinstall": "node ./skip.js || node ./dist/postinstall.js"
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@anolilab/package-json-utils": "3.0.
|
|
60
|
+
"@anolilab/package-json-utils": "3.0.5"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@anolilab/semantic-release-preset": "6.0.
|
|
64
|
-
"prettier": "^3.0.
|
|
63
|
+
"@anolilab/semantic-release-preset": "6.0.6",
|
|
64
|
+
"prettier": "^3.0.3",
|
|
65
65
|
"rimraf": "^5.0.1",
|
|
66
|
-
"semantic-release": "^21.
|
|
66
|
+
"semantic-release": "^21.1.1",
|
|
67
67
|
"tsup": "^7.2.0",
|
|
68
|
-
"vitest": "^0.34.
|
|
68
|
+
"vitest": "^0.34.4"
|
|
69
69
|
},
|
|
70
70
|
"peerDependencies": {
|
|
71
71
|
"prettier": "2.x || 3.x"
|