@soleil-se/build-app 2.4.0-next.4 → 2.4.0-next.6

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@soleil-se/build-app",
3
3
  "description": "Script for building WebApps, RESTApps and Widgets with Svelte in Sitevision.",
4
- "version": "2.4.0-next.4",
4
+ "version": "2.4.0-next.6",
5
5
  "bin": {
6
6
  "build-app": "./bin/index.js",
7
7
  "sv-app-build": "./bin/index.js"
@@ -22,47 +22,48 @@
22
22
  },
23
23
  "homepage": "https://docs.soleil.se/build/app",
24
24
  "dependencies": {
25
- "@babel/core": "7.27.1",
26
- "@babel/preset-env": "7.27.2",
25
+ "@babel/core": "7.28.0",
26
+ "@babel/preset-env": "7.28.0",
27
27
  "@rollup/plugin-alias": "5.1.1",
28
28
  "@rollup/plugin-babel": "6.0.4",
29
- "@rollup/plugin-commonjs": "28.0.3",
29
+ "@rollup/plugin-commonjs": "28.0.6",
30
30
  "@rollup/plugin-json": "6.1.0",
31
31
  "@rollup/plugin-node-resolve": "16.0.1",
32
32
  "@rollup/plugin-replace": "6.0.2",
33
33
  "@rollup/plugin-terser": "0.4.4",
34
- "@rollup/plugin-typescript": "^12.1.2",
34
+ "@rollup/plugin-typescript": "^12.1.4",
35
35
  "archiver": "7.0.1",
36
36
  "chalk": "5.4.1",
37
37
  "find-up": "7.0.0",
38
- "form-data": "4.0.2",
38
+ "form-data": "4.0.4",
39
39
  "fs-extra": "11.3.0",
40
- "glob": "^11.0.1",
40
+ "glob": "^11.0.3",
41
41
  "got": "14.4.7",
42
42
  "gzip-size": "7.0.0",
43
43
  "lodash-es": "4.17.21",
44
44
  "minimist": "^1.2.8",
45
- "postcss": "8.5.3",
45
+ "postcss": "8.5.6",
46
46
  "postcss-preset-env": "^10.1.5",
47
47
  "postcss-pxtorem": "6.1.0",
48
- "pretty-bytes": "6.1.1",
48
+ "pretty-bytes": "7.0.0",
49
49
  "prompts": "2.4.2",
50
- "rollup": "4.41.0",
50
+ "rollup": "4.46.2",
51
51
  "rollup-plugin-postcss": "4.0.2",
52
52
  "rollup-plugin-string": "3.0.0",
53
53
  "rollup-plugin-svelte": "7.2.2",
54
54
  "slash": "5.1.0",
55
55
  "svelte-preprocess": "6.0.3",
56
56
  "tslib": "^2.8.1",
57
- "@soleil-se/build-utils": "^1.8.3",
58
- "@soleil-se/build-config": "^1.3.0"
57
+ "@soleil-se/build-config": "^1.3.0",
58
+ "@soleil-se/build-utils": "^1.8.3"
59
59
  },
60
60
  "devDependencies": {
61
61
  "svelte": "^5.33.1",
62
62
  "typescript": "^5.8.3"
63
63
  },
64
64
  "publishConfig": {
65
- "access": "public"
65
+ "access": "public",
66
+ "tag": "next"
66
67
  },
67
68
  "scripts": {}
68
69
  }
@@ -0,0 +1,12 @@
1
+ import { existsSync } from 'node:fs';
2
+
3
+ let hasTsConfig;
4
+ let typescriptPlugin;
5
+
6
+ export default async function getTypescriptPlugin() {
7
+ hasTsConfig = hasTsConfig || existsSync('tsconfig.json');
8
+ if (!hasTsConfig) return false;
9
+
10
+ typescriptPlugin = typescriptPlugin || await import('@rollup/plugin-typescript').then((pkg) => pkg.default);
11
+ return typescriptPlugin();
12
+ }
package/rollup/client.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { rollup } from 'rollup';
2
2
  import json from '@rollup/plugin-json';
3
- import typescript from '@rollup/plugin-typescript';
4
3
  import { globSync } from 'glob';
5
4
 
6
5
  import onwarn from './utils/onwarn.js';
@@ -15,6 +14,7 @@ import getSveltePlugin from './api/getSveltePlugin.js';
15
14
  import getPostcssPlugin from './api/getPostcssPlugin.js';
16
15
  import getTerserPlugin from './api/getTerserPlugin.js';
17
16
  import getStringPlugin from './api/getStringPlugin.js';
17
+ import getTypescriptPlugin from './api/getTypescriptPlugin.js';
18
18
 
19
19
  import sitevisionPlugin from './plugins/sitevision.js';
20
20
  import bundleSizePlugin from './plugins/bundleSize.js';
@@ -42,7 +42,7 @@ export default function rollupClient({
42
42
  plugins = plugins || [
43
43
  format === 'amd' && amdGlobalsPlugin({ globals }),
44
44
  sitevisionPlugin({ context: 'client' }),
45
- typescript(),
45
+ getTypescriptPlugin(),
46
46
  getReplaceClientPlugin(),
47
47
  getAliasClientPlugin(),
48
48
  getNodeResolvePlugin({ input: inputs[0], context: 'client', debug }),
@@ -67,10 +67,6 @@ export default function rollupClient({
67
67
 
68
68
  bundleCache = cache && bundle.cache;
69
69
  return bundle.write({
70
- // name: format === 'amd' ? 'app' : undefined,
71
- // banner: format === 'amd' ? 'define(function (require) {' : undefined,
72
- // footer: format === 'amd' ? 'return app; });' : undefined,
73
- // format: 'iife',
74
70
  format,
75
71
  file: output,
76
72
  globals,
package/rollup/server.js CHANGED
@@ -1,6 +1,5 @@
1
1
  import { rollup } from 'rollup';
2
2
  import json from '@rollup/plugin-json';
3
- import typescript from '@rollup/plugin-typescript';
4
3
  import { globSync } from 'glob';
5
4
 
6
5
  import onwarn from './utils/onwarn.js';
@@ -14,6 +13,7 @@ import getSveltePlugin from './api/getSveltePlugin.js';
14
13
  import getPostcssPlugin from './api/getPostcssPlugin.js';
15
14
  import getTerserPlugin from './api/getTerserPlugin.js';
16
15
  import getStringPlugin from './api/getStringPlugin.js';
16
+ import getTypescriptPlugin from './api/getTypescriptPlugin.js';
17
17
 
18
18
  import sitevision from './plugins/sitevision.js';
19
19
 
@@ -36,7 +36,7 @@ export default function rollupServer({
36
36
  getReplaceServerPlugin(),
37
37
  getAliasServerPlugin(),
38
38
  sitevision({ context: 'server' }),
39
- typescript(),
39
+ getTypescriptPlugin(),
40
40
  json(),
41
41
  getStringPlugin(),
42
42
  getNodeResolvePlugin({ input: inputs[0], debug }),