@ui5/webcomponents-tools 0.0.0-97cba4b0b → 0.0.0-97db186fd

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,125 @@
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.14.0-rc.1](https://github.com/SAP/ui5-webcomponents/compare/v1.14.0-rc.0...v1.14.0-rc.1) (2023-05-25)
7
+
8
+ **Note:** Version bump only for package @ui5/webcomponents-tools
9
+
10
+
11
+
12
+
13
+
14
+ # [1.14.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.13.2...v1.14.0-rc.0) (2023-05-18)
15
+
16
+ **Note:** Version bump only for package @ui5/webcomponents-tools
17
+
18
+
19
+
20
+
21
+
22
+ ## [1.13.1](https://github.com/SAP/ui5-webcomponents/compare/v1.13.0-rc.5...v1.13.1) (2023-05-11)
23
+
24
+ **Note:** Version bump only for package @ui5/webcomponents-tools
25
+
26
+
27
+
28
+
29
+
30
+ # [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)
31
+
32
+
33
+ ### Bug Fixes
34
+
35
+ * **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))
36
+
37
+
38
+
39
+
40
+
41
+ # [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)
42
+
43
+
44
+ ### Features
45
+
46
+ * generate TS from HBS templates ([#6558](https://github.com/SAP/ui5-webcomponents/issues/6558)) ([02611b2](https://github.com/SAP/ui5-webcomponents/commit/02611b2e24b2c2a06129b8e60a8bc680d9501e39))
47
+
48
+
49
+
50
+
51
+
52
+ # [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)
53
+
54
+ **Note:** Version bump only for package @ui5/webcomponents-tools
55
+
56
+
57
+
58
+
59
+
60
+ # [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)
61
+
62
+ **Note:** Version bump only for package @ui5/webcomponents-tools
63
+
64
+
65
+
66
+
67
+
68
+ # [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)
69
+
70
+
71
+ ### Bug Fixes
72
+
73
+ * **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))
74
+
75
+
76
+
77
+
78
+
79
+ # [1.13.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0...v1.13.0-rc.0) (2023-04-06)
80
+
81
+ **Note:** Version bump only for package @ui5/webcomponents-tools
82
+
83
+
84
+
85
+
86
+
87
+ # [1.12.0](https://github.com/SAP/ui5-webcomponents/compare/v1.12.0-rc.3...v1.12.0) (2023-04-04)
88
+
89
+
90
+ ### Bug Fixes
91
+
92
+ * **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)
93
+
94
+
95
+
96
+
97
+
98
+ # [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)
99
+
100
+ **Note:** Version bump only for package @ui5/webcomponents-tools
101
+
102
+
103
+
104
+
105
+
106
+ # [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)
107
+
108
+
109
+ ### Bug Fixes
110
+
111
+ * 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))
112
+
113
+
114
+
115
+
116
+
117
+ # [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)
118
+
119
+ **Note:** Version bump only for package @ui5/webcomponents-tools
120
+
121
+
122
+
123
+
124
+
6
125
  # [1.12.0-rc.0](https://github.com/SAP/ui5-webcomponents/compare/v1.11.0...v1.12.0-rc.0) (2023-03-09)
7
126
 
8
127
 
@@ -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"
@@ -20,6 +20,15 @@ const getScripts = (options) => {
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 {
@@ -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"`,
@@ -3,6 +3,7 @@ const combineSelectors = require('../lib/postcss-combine-duplicated-selectors/in
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
5
  const cssnano = require('cssnano');
6
+ const modifySelectors = require("modify-selectors");
6
7
  const fs = require("fs");
7
8
 
8
9
  const packageName = JSON.parse(fs.readFileSync("./package.json")).name;
@@ -20,6 +21,15 @@ module.exports = {
20
21
  },
21
22
  ]
22
23
  },),
24
+ modifySelectors({
25
+ enable: true,
26
+ suffix: [
27
+ {
28
+ match: '*',
29
+ with: '[_ui5host]', // Add suffix to each selector in the file (:root => :root [_ui5host])
30
+ },
31
+ ],
32
+ }),
23
33
  postcssCSStoJSON({ toReplace: 'src', packageName }),
24
34
  postcssCSStoESM({ toReplace: 'src', packageName }),
25
35
  ]
@@ -1,12 +1,16 @@
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],
12
+ server: {
13
+ open: "/packages/main/test/pages/Button.html",
14
+ }
11
15
  }
12
- });
16
+ })