@nemigo/configs 2.3.3 → 2.3.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.
@@ -1,4 +1,4 @@
1
- import type { Adapter, Config } from "@sveltejs/kit";
1
+ import type { Adapter, Config, KitConfig } from "@sveltejs/kit";
2
2
  /**
3
3
  * Опции создания конфигурации для {@link defineSvelteConfig}
4
4
  */
@@ -17,12 +17,26 @@ export interface SvelteConfigOptions {
17
17
  * @default true
18
18
  */
19
19
  runes?: boolean;
20
+ /**
21
+ * Асинхронный **Svelte**
22
+ *
23
+ * Аналог к {@link CompileOptions.experimental.async}
24
+ *
25
+ * @see https://svelte.dev/docs/svelte/await-expressions
26
+ */
27
+ async?: boolean;
20
28
  /**
21
29
  * {@link https://svelte.dev/docs/kit/configuration#alias Алиасы} путей для **SvelteKit** и {@link https://www.npmjs.com/package/@sveltejs/package @sveltejs/package}
22
30
  *
23
31
  * Аналог к {@link KitConfig.alias}
24
32
  */
25
33
  alias?: Record<string, string>;
34
+ /**
35
+ * {@link https://svelte.dev/docs/kit/configuration#experimental Экспериментальные} возможности **SvelteKit**
36
+ *
37
+ * Аналог к {@link KitConfig.experimental}
38
+ */
39
+ experimental?: KitConfig["experimental"];
26
40
  /**
27
41
  * Переопределение путей для **SvelteKit**
28
42
  *
@@ -34,11 +34,16 @@ export const defineSvelteConfig = (options) => ({
34
34
  * Использование современного AST
35
35
  */
36
36
  modernAst: true,
37
+ experimental: {
38
+ async: options.async,
39
+ },
40
+ warningFilter: (w) => w.code !== "state_referenced_locally",
37
41
  },
38
42
  preprocess: vitePreprocess({ script: true }),
39
43
  kit: {
40
44
  adapter: typeof options.adapter === "function" ? options.adapter() : options.adapter,
41
45
  alias: options.alias,
46
+ experimental: options.experimental,
42
47
  files: {
43
48
  assets: options.files?.assets,
44
49
  appTemplate: options.files?.app_html,
@@ -1,4 +1,4 @@
1
- import type { Config } from "@sveltejs/kit";
1
+ import type { Config, KitConfig } from "@sveltejs/kit";
2
2
  /**
3
3
  * Опции создания конфигурации для {@link defineSveltePackageConfig}
4
4
  */
@@ -11,6 +11,14 @@ export interface SveltePackageConfigOptions {
11
11
  * @default true
12
12
  */
13
13
  runes?: boolean;
14
+ /**
15
+ * Асинхронный **Svelte**
16
+ *
17
+ * Аналог к {@link CompileOptions.experimental.async}
18
+ *
19
+ * @see https://svelte.dev/docs/svelte/await-expressions
20
+ */
21
+ async?: boolean;
14
22
  /**
15
23
  * Добавляет {@link https://svelte.dev/docs/kit/configuration#alias алиас} `({ "#": "src" })`
16
24
  *
@@ -19,6 +27,12 @@ export interface SveltePackageConfigOptions {
19
27
  * @default true
20
28
  */
21
29
  isolate?: boolean;
30
+ /**
31
+ * {@link https://svelte.dev/docs/kit/configuration#experimental Экспериментальные} возможности **SvelteKit**
32
+ *
33
+ * Аналог к {@link KitConfig.experimental}
34
+ */
35
+ experimental?: KitConfig["experimental"];
22
36
  /**
23
37
  * {@link https://svelte.dev/docs/kit/configuration#alias Алиасы} путей
24
38
  *
@@ -30,9 +30,14 @@ export const defineSveltePackageConfig = (options) => ({
30
30
  * Использование современного AST
31
31
  */
32
32
  modernAst: true,
33
+ experimental: {
34
+ async: options?.async,
35
+ },
36
+ warningFilter: (w) => w.code !== "state_referenced_locally",
33
37
  },
34
38
  preprocess: vitePreprocess({ script: true }),
35
39
  kit: {
40
+ experimental: options?.experimental,
36
41
  files: {
37
42
  lib: options?.path ?? "./src",
38
43
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nemigo/configs",
3
- "version": "2.3.3",
3
+ "version": "2.3.5",
4
4
  "private": false,
5
5
  "license": "MPL-2.0",
6
6
  "author": {