@esmate/prettier 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.
package/dist/index.js CHANGED
@@ -17,7 +17,8 @@ function defineConfig(options, config) {
17
17
  const overrides = config?.overrides || [];
18
18
  {
19
19
  const ignores = [
20
- "pnpm-lock.yaml"
20
+ "pnpm-lock.yaml",
21
+ "package-lock.json"
21
22
  ];
22
23
  if (options?.ignores) ignores.push(...options.ignores);
23
24
  overrides.push({
package/dist/utils.d.ts CHANGED
@@ -2,3 +2,4 @@ import type { Config } from "prettier";
2
2
  declare const _default: (defaultConfig?: Config | undefined) => Config;
3
3
  export default _default;
4
4
  export declare function importPlugin(plugin: string): string;
5
+ export declare function findRootDir(): string;
package/dist/utils.js CHANGED
@@ -1,5 +1,6 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
1
+ import * as __WEBPACK_EXTERNAL_MODULE_find_up_69e9ea2b__ from "find-up";
2
2
  import * as __WEBPACK_EXTERNAL_MODULE_make_synchronized_25569d3e__ from "make-synchronized";
3
+ import * as __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__ from "node:path";
3
4
  import * as __WEBPACK_EXTERNAL_MODULE_prettier__ from "prettier";
4
5
  const utils = (0, __WEBPACK_EXTERNAL_MODULE_make_synchronized_25569d3e__["default"])(import.meta, async (defaultConfig = {})=>{
5
6
  const configFile = await (0, __WEBPACK_EXTERNAL_MODULE_prettier__.resolveConfigFile)();
@@ -16,4 +17,9 @@ function importPlugin(plugin) {
16
17
  const __dirname = new URL(".", import.meta.url).pathname;
17
18
  return __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].join(__dirname, "plugins", `${plugin}.js`);
18
19
  }
19
- export { utils as default, importPlugin };
20
+ function findRootDir() {
21
+ const pkgPath = (0, __WEBPACK_EXTERNAL_MODULE_find_up_69e9ea2b__.findUpSync)("package.json");
22
+ if (pkgPath) return __WEBPACK_EXTERNAL_MODULE_node_path_c5b9b54f__["default"].parse(pkgPath).dir;
23
+ throw new Error("Could not find root directory where package.json is located");
24
+ }
25
+ export { utils as default, findRootDir, importPlugin };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@esmate/prettier",
3
3
  "type": "module",
4
- "version": "1.0.5",
4
+ "version": "1.0.7",
5
5
  "description": "Prettier configuration for humans.",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -29,17 +29,21 @@
29
29
  "dist"
30
30
  ],
31
31
  "dependencies": {
32
+ "find-up": "^7.0.0",
33
+ "globby": "^14.1.0",
32
34
  "make-synchronized": "^0.7.2",
33
35
  "prettier-plugin-astro": "^0.14.1",
34
- "prettier-plugin-svelte": "^3.4.0",
35
- "prettier-plugin-tailwindcss": "^0.6.11"
36
+ "prettier-plugin-svelte": "^3.4.1",
37
+ "prettier-plugin-tailwindcss": "^0.6.14"
36
38
  },
37
39
  "devDependencies": {
40
+ "@esmate/eslint": "^1.2.2",
41
+ "@esmate/prettier": "^1.0.6",
38
42
  "@rslib/core": "^0.7.1",
39
- "@types/node": "^22.8.1",
40
- "eslint": "^9.27.0",
41
- "prettier": "^3.5.3",
42
- "typescript": "^5.8.3"
43
+ "@types/node": "^22.19.3",
44
+ "eslint": "^9.39.2",
45
+ "prettier": "^3.7.4",
46
+ "typescript": "^5.9.3"
43
47
  },
44
48
  "scripts": {
45
49
  "build": "rslib build",