@soleil-se/build-app 2.3.2 → 2.3.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@ title: Changelog
4
4
 
5
5
  Baseras på [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) och använder [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [2.3.3] - 2025-06-12
8
+
9
+ - Läs inte in targets för Babel om browserslist är angivet.
10
+
7
11
  ## [2.3.2] - 2025-05-28
8
12
 
9
13
  - Kontrollera att `./dist/src/index.js` finns innan den uppdateras.
package/bin/index.js CHANGED
File without changes
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.3.2",
4
+ "version": "2.3.3",
5
5
  "bin": {
6
6
  "build-app": "./bin/index.js",
7
7
  "sv-app-build": "./bin/index.js"
@@ -10,13 +10,7 @@
10
10
  "author": "Soleil AB",
11
11
  "license": "UNLICENSED",
12
12
  "type": "module",
13
- "keywords": [
14
- "sitevision",
15
- "webapp",
16
- "restapp",
17
- "widget",
18
- "svelte"
19
- ],
13
+ "keywords": ["sitevision", "webapp", "restapp", "widget", "svelte"],
20
14
  "engines": {
21
15
  "node": ">=20.0.0"
22
16
  },
@@ -31,6 +25,8 @@
31
25
  "@rollup/plugin-node-resolve": "16.0.1",
32
26
  "@rollup/plugin-replace": "6.0.2",
33
27
  "@rollup/plugin-terser": "0.4.4",
28
+ "@soleil-se/build-config": "workspace:^",
29
+ "@soleil-se/build-utils": "workspace:^",
34
30
  "archiver": "7.0.1",
35
31
  "chalk": "5.4.1",
36
32
  "find-up": "7.0.0",
@@ -51,15 +47,15 @@
51
47
  "rollup-plugin-string": "3.0.0",
52
48
  "rollup-plugin-svelte": "7.2.2",
53
49
  "slash": "5.1.0",
54
- "svelte-preprocess": "6.0.3",
55
- "@soleil-se/build-config": "^1.3.0",
56
- "@soleil-se/build-utils": "^1.8.3"
50
+ "svelte-preprocess": "6.0.3"
57
51
  },
58
52
  "devDependencies": {
59
53
  "svelte": "^5.6.2"
60
54
  },
55
+ "scripts": {
56
+ "postpublish": "node ../../scripts/postpublish"
57
+ },
61
58
  "publishConfig": {
62
59
  "access": "public"
63
- },
64
- "scripts": {}
65
- }
60
+ }
61
+ }
@@ -1,4 +1,6 @@
1
1
  import { babel } from '@rollup/plugin-babel';
2
+ import fse from 'fs-extra';
3
+ import { findUpSync } from 'find-up';
2
4
 
3
5
  const commonOptions = {
4
6
  babelrc: false,
@@ -6,20 +8,24 @@ const commonOptions = {
6
8
  babelHelpers: 'bundled',
7
9
  };
8
10
 
11
+ function hasBrowserslist() {
12
+ return !!findUpSync('.browserslistrc') || !!fse.readJSONSync('./package.json')?.browserslist;
13
+ }
14
+
9
15
  export function getBabelClientPlugin() {
10
16
  return babel({
11
17
  ...commonOptions,
12
18
  presets: [
13
19
  ['@babel/preset-env', {
14
20
  shippedProposals: true,
15
- targets: [
21
+ targets: hasBrowserslist() ? [] : [
16
22
  'last 2 chrome major versions',
17
23
  'last 2 firefox major versions',
18
- 'last 2 ios_saf major versions',
24
+ 'last 4 ios_saf major versions',
19
25
  'last 2 edge major versions',
20
- 'last 2 safari major versions',
26
+ 'last 4 safari major versions',
21
27
  'last 2 and_chr major versions',
22
- ],
28
+ ]
23
29
  }],
24
30
  ],
25
31
  });
package/LICENSE.md DELETED
@@ -1 +0,0 @@
1
- (c) Copyright 2021 Soleil AB, all rights reserved.