@ui5/webcomponents-tools 0.0.0-974b11d82 → 0.0.0-97c4a1259

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
@@ -3,6 +3,285 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [1.17.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.17.0-rc.1...v1.17.0-rc.2) (2023-08-24)
7
+
8
+ **Note:** Version bump only for package @ui5/webcomponents-tools
9
+
10
+
11
+
12
+
13
+
14
+ # [1.17.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.17.0-rc.0...v1.17.0-rc.1) (2023-08-17)
15
+
16
+
17
+ ### Features
18
+
19
+ * **framework:** scope css variables per runtime and version ([#7449](https://github.com/SAP/ui5-webcomponents/issues/7449)) ([d3f6c2e](https://github.com/SAP/ui5-webcomponents/commit/d3f6c2efba9cfda389ea4d700a375f75b3e2996b))
20
+
21
+
22
+
23
+
24
+
25
+ # [1.17.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0...v1.17.0-rc.0) (2023-08-10)
26
+
27
+
28
+ ### Bug Fixes
29
+
30
+ * **ui5-illustrated-message:** support collection based illustration loading ([#7318](https://github.com/SAP/ui5-webcomponents/issues/7318)) ([6b52dbd](https://github.com/SAP/ui5-webcomponents/commit/6b52dbd157a3c8198e41c84157e3d9ae89e3386e))
31
+
32
+
33
+
34
+
35
+
36
+ # [1.16.0](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.4...v1.16.0) (2023-08-03)
37
+
38
+ **Note:** Version bump only for package @ui5/webcomponents-tools
39
+
40
+
41
+
42
+
43
+
44
+ # [1.16.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.3...v1.16.0-rc.4) (2023-08-03)
45
+
46
+ **Note:** Version bump only for package @ui5/webcomponents-tools
47
+
48
+
49
+
50
+
51
+
52
+ # [1.16.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.2...v1.16.0-rc.3) (2023-07-27)
53
+
54
+ **Note:** Version bump only for package @ui5/webcomponents-tools
55
+
56
+
57
+
58
+
59
+
60
+ # [1.16.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.1...v1.16.0-rc.2) (2023-07-20)
61
+
62
+ **Note:** Version bump only for package @ui5/webcomponents-tools
63
+
64
+
65
+
66
+
67
+
68
+ # [1.16.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.16.0-rc.0...v1.16.0-rc.1) (2023-07-13)
69
+
70
+ **Note:** Version bump only for package @ui5/webcomponents-tools
71
+
72
+
73
+
74
+
75
+
76
+ # [1.16.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.15.1...v1.16.0-rc.0) (2023-07-06)
77
+
78
+ **Note:** Version bump only for package @ui5/webcomponents-tools
79
+
80
+
81
+
82
+
83
+
84
+ # [1.15.0](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.2...v1.15.0) (2023-06-30)
85
+
86
+
87
+ ### Bug Fixes
88
+
89
+ * **framework:** missing CSS variables in compact mode / rtl mode ([#7189](https://github.com/SAP/ui5-webcomponents/issues/7189)) ([9b39b9c](https://github.com/SAP/ui5-webcomponents/commit/9b39b9ce5c3720dbb106c5638f858754e11a735f))
90
+
91
+
92
+
93
+
94
+
95
+ # [1.15.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.1...v1.15.0-rc.2) (2023-06-22)
96
+
97
+ **Note:** Version bump only for package @ui5/webcomponents-tools
98
+
99
+
100
+
101
+
102
+
103
+ # [1.15.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.15.0-rc.0...v1.15.0-rc.1) (2023-06-15)
104
+
105
+ **Note:** Version bump only for package @ui5/webcomponents-tools
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ # [1.15.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0...v1.15.0-rc.0) (2023-06-08)
116
+
117
+ **Note:** Version bump only for package @ui5/webcomponents-tools
118
+
119
+
120
+
121
+
122
+
123
+ # [1.14.0](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.2...v1.14.0) (2023-06-01)
124
+
125
+ **Note:** Version bump only for package @ui5/webcomponents-tools
126
+
127
+
128
+
129
+
130
+
131
+ # [1.14.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.1...v1.14.0-rc.2) (2023-06-01)
132
+
133
+ **Note:** Version bump only for package @ui5/webcomponents-tools
134
+
135
+
136
+
137
+
138
+
139
+ # [1.14.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.0...v1.14.0-rc.1) (2023-05-25)
140
+
141
+ **Note:** Version bump only for package @ui5/webcomponents-tools
142
+
143
+
144
+
145
+
146
+
147
+ # [1.14.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.13.2...v1.14.0-rc.0) (2023-05-18)
148
+
149
+ **Note:** Version bump only for package @ui5/webcomponents-tools
150
+
151
+
152
+
153
+
154
+
155
+ ## [1.13.1](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.5...v1.13.1) (2023-05-11)
156
+
157
+ **Note:** Version bump only for package @ui5/webcomponents-tools
158
+
159
+
160
+
161
+
162
+
163
+ # [1.13.0-rc.5](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.4...v1.13.0-rc.5) (2023-05-11)
164
+
165
+
166
+ ### Bug Fixes
167
+
168
+ * **create-webcomponents-package:** fix package creation issues with test and lint ([#6976](https://github.com/SAP/ui5-webcomponents/issues/6976)) ([dd70f3a](https://github.com/SAP/ui5-webcomponents/commit/dd70f3aa8ef70b592f1d4e0f3f9894c6280fb1bf))
169
+
170
+
171
+
172
+
173
+
174
+ # [1.13.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.3...v1.13.0-rc.4) (2023-05-04)
175
+
176
+
177
+ ### Features
178
+
179
+ * generate TS from HBS templates ([#6558](https://github.com/SAP/ui5-webcomponents/issues/6558)) ([02611b2](https://github.com/SAP/ui5-webcomponents/commit/02611b2e24b2c2a06129b8e60a8bc680d9501e39))
180
+
181
+
182
+
183
+
184
+
185
+ # [1.13.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.2...v1.13.0-rc.3) (2023-04-27)
186
+
187
+ **Note:** Version bump only for package @ui5/webcomponents-tools
188
+
189
+
190
+
191
+
192
+
193
+ # [1.13.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.1...v1.13.0-rc.2) (2023-04-20)
194
+
195
+ **Note:** Version bump only for package @ui5/webcomponents-tools
196
+
197
+
198
+
199
+
200
+
201
+ # [1.13.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.0...v1.13.0-rc.1) (2023-04-13)
202
+
203
+
204
+ ### Bug Fixes
205
+
206
+ * **framework:** correct fileName in component CSS import ([#6900](https://github.com/SAP/ui5-webcomponents/issues/6900)) ([4d950c5](https://github.com/SAP/ui5-webcomponents/commit/4d950c5ea3bee0e3b629e5797693ecf41a2cdfd3))
207
+
208
+
209
+
210
+
211
+
212
+ # [1.13.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0...v1.13.0-rc.0) (2023-04-06)
213
+
214
+ **Note:** Version bump only for package @ui5/webcomponents-tools
215
+
216
+
217
+
218
+
219
+
220
+ # [1.12.0](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0-rc.3...v1.12.0) (2023-04-04)
221
+
222
+
223
+ ### Bug Fixes
224
+
225
+ * **theming:** fix icons version display for custom themes (built via the ThemeDesigner) ([#6815](https://github.com/SAP/ui5-webcomponents/issues/6815)) ([63ff800](https://github.com/SAP/ui5-webcomponents/commit/63ff8007889a66efae074fc6b4dbcb1b7ea36713)), closes [#6758](https://github.com/SAP/ui5-webcomponents/issues/6758)
226
+
227
+
228
+
229
+
230
+
231
+ # [1.12.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0-rc.2...v1.12.0-rc.3) (2023-03-30)
232
+
233
+ **Note:** Version bump only for package @ui5/webcomponents-tools
234
+
235
+
236
+
237
+
238
+
239
+ # [1.12.0-rc.2](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0-rc.1...v1.12.0-rc.2) (2023-03-23)
240
+
241
+
242
+ ### Bug Fixes
243
+
244
+ * fix eslint for JS 3rd party projects ([#6725](https://github.com/SAP/ui5-webcomponents/issues/6725)) ([215a888](https://github.com/SAP/ui5-webcomponents/commit/215a888b006e46d431edd6324812b9d39249aef4))
245
+
246
+
247
+
248
+
249
+
250
+ # [1.12.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0-rc.0...v1.12.0-rc.1) (2023-03-16)
251
+
252
+ **Note:** Version bump only for package @ui5/webcomponents-tools
253
+
254
+
255
+
256
+
257
+
258
+ # [1.12.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.11.0...v1.12.0-rc.0) (2023-03-09)
259
+
260
+
261
+ ### Features
262
+
263
+ * enhance create-ui5-element command to create component in TS ([#6609](https://github.com/SAP/ui5-webcomponents/issues/6609)) ([d870065](https://github.com/SAP/ui5-webcomponents/commit/d8700650a4e5991862e2076cc2c93482011c4c90))
264
+
265
+
266
+
267
+
268
+
269
+ # [1.11.0](https://github.com/SAP/ui5-webcomponents/compare/v1.11.0-rc.4...v1.11.0) (2023-03-06)
270
+
271
+ **Note:** Version bump only for package @ui5/webcomponents-tools
272
+
273
+
274
+
275
+
276
+
277
+ # [1.11.0-rc.4](https://github.com/SAP/ui5-webcomponents/compare/v1.11.0-rc.3...v1.11.0-rc.4) (2023-03-02)
278
+
279
+ **Note:** Version bump only for package @ui5/webcomponents-tools
280
+
281
+
282
+
283
+
284
+
6
285
  # [1.11.0-rc.3](https://github.com/SAP/ui5-webcomponents/compare/v1.11.0-rc.2...v1.11.0-rc.3) (2023-02-23)
7
286
 
8
287
 
package/assets-meta.js CHANGED
@@ -9,12 +9,15 @@ const assetsMeta = {
9
9
  "sap_belize_hcw",
10
10
  "sap_fiori_3_hcb",
11
11
  "sap_fiori_3_hcw",
12
- "sap_horizon",
13
- "sap_horizon_dark",
14
- "sap_horizon_hcb",
15
- "sap_horizon_hcw",
16
- "sap_horizon_exp"
17
- ]
12
+ "sap_horizon",
13
+ "sap_horizon_dark",
14
+ "sap_horizon_hcb",
15
+ "sap_horizon_hcw",
16
+ "sap_horizon_exp",
17
+ "sap_horizon_dark_exp",
18
+ "sap_horizon_hcb_exp",
19
+ "sap_horizon_hcw_exp",
20
+ ],
18
21
  },
19
22
  "languages": {
20
23
  "default": "en",
@@ -1,3 +1,36 @@
1
+ const fs = require("fs");
2
+ const path = require("path");
3
+ const tsMode = fs.existsSync(path.join(process.cwd(), "tsconfig.json"));
4
+
5
+ /**
6
+ * Typescript Rules
7
+ */
8
+ const overrides = tsMode ? [{
9
+ files: ["*.ts"],
10
+ parser: "@typescript-eslint/parser",
11
+ plugins: ["@typescript-eslint"],
12
+ extends: [
13
+ "plugin:@typescript-eslint/recommended",
14
+ "plugin:@typescript-eslint/recommended-requiring-type-checking"
15
+ ],
16
+ parserOptions: {
17
+ "project": ["./tsconfig.json", "./packages/*/tsconfig.json"],
18
+ },
19
+ rules: {
20
+ "no-shadow": "off",
21
+ "@typescript-eslint/no-shadow": ["error"],
22
+ "@typescript-eslint/no-unsafe-member-access": "off",
23
+ "@typescript-eslint/no-floating-promises": "off",
24
+ "@typescript-eslint/no-explicit-any": "off",
25
+ "@typescript-eslint/no-unsafe-assignment": "off",
26
+ "@typescript-eslint/ban-ts-comment": "off",
27
+ "@typescript-eslint/no-unsafe-call": "off",
28
+ "@typescript-eslint/no-non-null-assertion": "off",
29
+ "@typescript-eslint/no-empty-function": "off",
30
+ "lines-between-class-members": "off",
31
+ }
32
+ }] : [];
33
+
1
34
  module.exports = {
2
35
  "env": {
3
36
  "browser": true,
@@ -5,34 +38,7 @@ module.exports = {
5
38
  },
6
39
  "root": true,
7
40
  "extends": "airbnb-base",
8
- overrides: [{
9
- files: ["*.ts"],
10
- parser: "@typescript-eslint/parser",
11
- plugins: ["@typescript-eslint"],
12
- extends: [
13
- "plugin:@typescript-eslint/recommended",
14
- "plugin:@typescript-eslint/recommended-requiring-type-checking"
15
- ],
16
- parserOptions: {
17
- "project": ["./tsconfig.json", "./packages/*/tsconfig.json"],
18
- },
19
- /**
20
- * Typescript Rules
21
- */
22
- rules: {
23
- "no-shadow": "off",
24
- "@typescript-eslint/no-shadow": ["error"],
25
- "@typescript-eslint/no-unsafe-member-access": "off",
26
- "@typescript-eslint/no-floating-promises": "off",
27
- "@typescript-eslint/no-explicit-any": "off",
28
- "@typescript-eslint/no-unsafe-assignment": "off",
29
- "@typescript-eslint/ban-ts-comment": "off",
30
- "@typescript-eslint/no-unsafe-call": "off",
31
- "@typescript-eslint/no-non-null-assertion": "off",
32
- "@typescript-eslint/no-empty-function": "off",
33
- "lines-between-class-members": "off",
34
- }
35
- }],
41
+ overrides,
36
42
  "parserOptions": {
37
43
  "ecmaVersion": 2018,
38
44
  "sourceType": "module"
@@ -8,18 +8,27 @@ const getScripts = (options) => {
8
8
 
9
9
  // The script creates all JS modules (dist/illustrations/{illustrationName}.js) out of the existing SVGs
10
10
  const illustrationsData = options.illustrationsData || [];
11
- const illustrations = illustrationsData.map(illustration => `node "${LIB}/create-illustrations/index.js" ${illustration.path} ${illustration.defaultText} ${illustration.illustrationsPrefix} ${illustration.set} ${illustration.destinationPath}`);
11
+ const illustrations = illustrationsData.map(illustration => `node "${LIB}/create-illustrations/index.js" ${illustration.path} ${illustration.defaultText} ${illustration.illustrationsPrefix} ${illustration.set} ${illustration.destinationPath} ${illustration.collection}`);
12
12
  const createIllustrationsJSImportsScript = illustrations.join(" && ");
13
13
 
14
14
  // The script creates the "dist/generated/js-imports/Illustration.js" file that registers loaders (dynamic JS imports) for each illustration
15
- const illustrationDestinationPaths = illustrationsData.map(illustrations => illustrations.destinationPath);
16
- const createIllustrationsLoadersScript = options.fioriPackage ? `node ${LIB}/generate-js-imports/illustrations.js ${illustrationDestinationPaths[0]} ${illustrationDestinationPaths[1]} dist/generated/js-imports` : "";
15
+ const createIllustrationsLoadersScript = illustrationsData.map(illustrations => `node ${LIB}/generate-js-imports/illustrations.js ${illustrations.destinationPath} ${illustrations.dynamicImports.outputFile} ${illustrations.collection} ${illustrations.dynamicImports.location} ${illustrations.dynamicImports.prefix || '\"\"'} ${illustrations.dynamicImports.filterOut.join(" ")}`).join(" && ");
16
+
17
17
  const tsOption = options.typescript;
18
18
  const tsCommand = tsOption ? "tsc" : "";
19
19
  const tsWatchCommand = tsOption ? "tsc --watch" : "";
20
20
  const tsCrossEnv = tsOption ? "cross-env UI5_TS=true" : "";
21
21
  const copySrcGenerated = tsOption ? "" : "copy.srcGenerated";
22
22
 
23
+ if (tsOption) {
24
+ try {
25
+ require("typescript");
26
+ } catch(e) {
27
+ console.error(`TypeScript is not found. Try to install it by running \`npm install --save-dev typescript\` if you are using npm or by running \`yarn add --dev typescript\` if you are using yarn.`);
28
+ process.exit(e.code);
29
+ }
30
+ }
31
+
23
32
  let viteConfig;
24
33
  if (fs.existsSync("config/vite.config.js")) {
25
34
  // old project setup where config file is in separate folder
@@ -33,10 +42,7 @@ const getScripts = (options) => {
33
42
  }
34
43
 
35
44
  let eslintConfig;
36
- if (fs.existsSync("config/.eslintrc.js")) {
37
- // old project setup where config file is in separate folder
38
- eslintConfig = "--config config/.eslintrc.js";
39
- } else if (fs.existsSync(".eslintrc.js")) {
45
+ if (fs.existsSync(".eslintrc.js") || fs.existsSync(".eslintrc.cjs")) {
40
46
  // preferred way of custom configuration in root project folder
41
47
  eslintConfig = "";
42
48
  } else {
@@ -47,7 +53,7 @@ const getScripts = (options) => {
47
53
  const scripts = {
48
54
  clean: 'rimraf jsdoc-dist && rimraf src/generated && rimraf dist && rimraf .port && nps "scope.testPages.clean"',
49
55
  lint: `eslint . ${eslintConfig}`,
50
- lintfix: `eslint . ${eslintConfig}`,
56
+ lintfix: `eslint . ${eslintConfig} --fix`,
51
57
  prepare: {
52
58
  default: `${tsCrossEnv} nps clean prepare.all typescript generateAPI`,
53
59
  all: 'concurrently "nps build.templates" "nps build.i18n" "nps prepare.styleRelated" "nps copy" "nps build.illustrations"',
@@ -56,7 +62,7 @@ const getScripts = (options) => {
56
62
  typescript: tsCommand,
57
63
  build: {
58
64
  default: "nps prepare lint build.bundle",
59
- templates: `mkdirp dist/generated/templates && node "${LIB}/hbs2ui5/index.js" -d src/ -o dist/generated/templates`,
65
+ templates: `mkdirp dist/generated/templates && ${tsCrossEnv} node "${LIB}/hbs2ui5/index.js" -d src/ -o src/generated/templates`,
60
66
  styles: {
61
67
  default: `nps build.styles.themes build.styles.components ${copySrcGenerated}`,
62
68
  themes: `node "${LIB}/postcss-p/postcss-p.mjs"`,
@@ -1,9 +1,11 @@
1
1
  const postcssImport = require('postcss-import');
2
2
  const postcssCSStoESM = require('../lib/postcss-css-to-esm/index.js');
3
+ const postcssScopeVars = require('../lib/postcss-scope-vars/index.js');
3
4
  const cssnano = require('cssnano');
4
- const fs = require("fs");
5
+ const fs = require("fs")
5
6
 
6
- const packageName = JSON.parse(fs.readFileSync("./package.json")).name;
7
+
8
+ const packageJSON = JSON.parse(fs.readFileSync("./package.json"))
7
9
 
8
10
  module.exports = {
9
11
  plugins: [
@@ -16,6 +18,7 @@ module.exports = {
16
18
  },
17
19
  ]
18
20
  }),
19
- postcssCSStoESM({ toReplace: 'src', includeDefaultTheme: true, packageName }),
21
+ postcssScopeVars({version: packageJSON.version}),
22
+ postcssCSStoESM({ toReplace: 'src', includeDefaultTheme: true, packageName: packageJSON.name }),
20
23
  ]
21
24
  }
@@ -2,13 +2,17 @@ const postcssImport = require('postcss-import');
2
2
  const combineSelectors = require('../lib/postcss-combine-duplicated-selectors/index.js');
3
3
  const postcssCSStoJSON = require('../lib/postcss-css-to-json/index.js');
4
4
  const postcssCSStoESM = require('../lib/postcss-css-to-esm/index.js');
5
+ const postcssScopeVars = require('../lib/postcss-scope-vars/index.js');
5
6
  const cssnano = require('cssnano');
6
7
  const fs = require("fs");
7
8
 
8
- const packageName = JSON.parse(fs.readFileSync("./package.json")).name;
9
+
10
+ const packageJSON = JSON.parse(fs.readFileSync("./package.json"))
11
+ const packageName = packageJSON.name;
9
12
 
10
13
  module.exports = {
11
14
  plugins: [
15
+ postcssScopeVars({version: packageJSON.version}),
12
16
  postcssImport(),
13
17
  combineSelectors({
14
18
  removeDuplicatedProperties: true
@@ -1,12 +1,13 @@
1
1
  // vite.config.js
2
- const { defineConfig } = require('vite');
3
- const virtualIndex = require("../lib/dev-server/virtual-index-html-plugin.js");
2
+ import { defineConfig } from 'vite';
3
+ import virtualIndex from '../lib/dev-server/virtual-index-html-plugin.js';
4
4
 
5
- module.exports = defineConfig(async () => {
5
+ export default defineConfig(async () => {
6
+ const data = await virtualIndex();
6
7
  return {
7
8
  build: {
8
9
  emptyOutDir: false,
9
10
  },
10
- plugins: [await virtualIndex()],
11
+ plugins: [data],
11
12
  }
12
- });
13
+ })