@inlang/paraglide-js 1.2.1 → 1.2.3

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.
@@ -0,0 +1,10 @@
1
+ import type { NodeishFilesystem } from "@lix-js/fs";
2
+ /**
3
+ * Attempts to find the package.json file that's closest to the current working directory.
4
+ *
5
+ * @param fs The filesystem to use.
6
+ * @param cwd The current working directory.
7
+ * @returns The path to the package.json file, or undefined if none was found.
8
+ */
9
+ export declare function findPackageJson(fs: NodeishFilesystem, cwd: string): Promise<string | undefined>;
10
+ export declare function getPackageJson(fs: NodeishFilesystem, cwd: string): Promise<unknown | undefined>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,8 @@
1
+ import type { NodeishFilesystem } from "@lix-js/fs";
2
+ /**
3
+ * Returns true if the path exists (file or directory), false otherwise.
4
+ *
5
+ * @param nodeishFs
6
+ * @returns
7
+ */
8
+ export declare function pathExists(filePath: string, nodeishFs: NodeishFilesystem): Promise<boolean>;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,39 @@
1
+ /**
2
+ * A list of packages that we consider relevant for stack detection.
3
+ *
4
+ * We (Loris & Nils) decided against using _all_ packages because that would be too much unnecessary data
5
+ * that would slow down queries.
6
+ */
7
+ declare const RelevantPackages: readonly ["next", "solid", "solid-start", "svelte", "@sveltejs/kit", "@sveltejs/adaper-static", "@sveltejs/adapter-node", "@sveltejs/adapter-netlify", "@sveltejs/adapter-vercel", "@sveltejs/adapter-cloudflare-workers", "@sveltejs/adapter-auto", "vue", "nuxt", "react", "react-native", "remix", "astro", "flutter", "vite", "webpack", "rollup", "esbuild", "qwick", "parcel", "lit", "lit-html", "@angular/core"];
8
+ type RelevantPackage = (typeof RelevantPackages)[number];
9
+ export type StackInfo = {
10
+ /**
11
+ * A map of relevant packages to their versions.
12
+ */
13
+ packages: {
14
+ [packageName in RelevantPackage]?: string;
15
+ };
16
+ };
17
+ /**
18
+ * Returns information about the tech-stack used based on the package.json.
19
+ * It will return an object with a map of relevant packages and their versions
20
+ * as the `packages` property.
21
+ *
22
+ * If no interestring packages are found, the `packages` property will be an empty object.
23
+ * If an error occurs, the `packages` property will be an empty object.
24
+ *
25
+ * @example
26
+ *
27
+ * ```ts
28
+ * {
29
+ * "packages": {
30
+ * "next": "^14.0.0",
31
+ * "react": "^17.0.0"
32
+ * }
33
+ * }
34
+ * ```
35
+ *
36
+ * @param packageJson The JSON parsed package.json file.
37
+ */
38
+ export declare function getStackInfo(packageJson: unknown): StackInfo;
39
+ export {};
@@ -0,0 +1 @@
1
+ export {};
package/package.json CHANGED
@@ -1,12 +1,18 @@
1
1
  {
2
2
  "name": "@inlang/paraglide-js",
3
3
  "type": "module",
4
- "version": "1.2.1",
4
+ "version": "1.2.3",
5
5
  "license": "Apache-2.0",
6
6
  "publishConfig": {
7
7
  "access": "public"
8
8
  },
9
9
  "author": "inlang <hello@inlang.com> (https://inlang.com/)",
10
+ "homepage": "https://github.com/opral/monorepo/tree/main/inlang/source-code/paraglide/paraglide-js",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "https://github.com/opral/monorepo.git",
14
+ "directory": "inlang/source-code/paraglide/paraglide-js"
15
+ },
10
16
  "keywords": [
11
17
  "paraglide",
12
18
  "javascript i18n",
@@ -21,14 +27,19 @@
21
27
  "vue",
22
28
  "angular",
23
29
  "nextjs",
24
- "next i18n"
30
+ "next i18n",
31
+ "astro",
32
+ "astro i18n",
33
+ "solid",
34
+ "solidstart"
25
35
  ],
26
36
  "bin": {
27
37
  "paraglide-js": "./bin/run.js"
28
38
  },
29
39
  "files": [
30
40
  "./dist",
31
- "./bin"
41
+ "./bin",
42
+ "./default"
32
43
  ],
33
44
  "dependencies": {
34
45
  "commander": "11.1.0",
@@ -45,7 +56,7 @@
45
56
  "@rollup/plugin-virtual": "3.0.1",
46
57
  "@ts-morph/bootstrap": "0.20.0",
47
58
  "@types/minimist": "1.2.3",
48
- "@types/node": "^20.11.2",
59
+ "@types/node": "^20.11.4",
49
60
  "@vitest/coverage-v8": "0.34.3",
50
61
  "cross-env": "^7.0.3",
51
62
  "esbuild": "^0.19.7",
@@ -54,13 +65,17 @@
54
65
  "typescript": "5.2.2",
55
66
  "vitest": "0.34.3",
56
67
  "@inlang/env-variables": "0.2.0",
57
- "@inlang/sdk": "0.23.0",
58
- "@inlang/telemetry": "0.3.4",
59
- "@lix-js/client": "0.5.0",
60
- "@lix-js/fs": "0.5.0",
68
+ "@inlang/sdk": "0.26.1",
69
+ "@inlang/telemetry": "0.3.9",
70
+ "@lix-js/client": "0.8.0",
71
+ "@lix-js/fs": "0.6.0",
61
72
  "@inlang/plugin-message-format": "2.0.0"
62
73
  },
63
74
  "exports": {
75
+ ".": {
76
+ "import": "./default/index.js",
77
+ "types": "./default/index.d.ts"
78
+ },
64
79
  "./internal": {
65
80
  "import": "./dist/index.js",
66
81
  "types": "./dist/index.d.ts"