@salesforce/webapp-template-base-react-app-experimental 1.105.1 → 1.106.0
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 +6 -0
- package/package.json +1 -1
- package/src/force-app/main/default/webapplications/base-react-app/eslint.config.js +42 -27
- package/src/force-app/main/default/webapplications/base-react-app/package.json +3 -3
- package/src/force-app/main/default/webapplications/base-react-app/vite.config.ts +17 -13
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
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.106.0](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.105.1...v1.106.0) (2026-03-17)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **data-skills:** Restructure data knowledge into composable skills ([#296](https://github.com/salesforce-experience-platform-emu/webapps/issues/296)) ([35e0223](https://github.com/salesforce-experience-platform-emu/webapps/commit/35e0223ac8e14c451f204fd206d5ca29fb5e684a))
|
|
11
|
+
|
|
6
12
|
## [1.105.1](https://github.com/salesforce-experience-platform-emu/webapps/compare/v1.105.0...v1.105.1) (2026-03-17)
|
|
7
13
|
|
|
8
14
|
**Note:** Version bump only for package @salesforce/webapp-template-base-react-app-experimental
|
package/package.json
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { resolve } from 'node:path';
|
|
3
|
+
import { fileURLToPath } from 'node:url';
|
|
4
|
+
import { dirname } from 'node:path';
|
|
1
5
|
import js from '@eslint/js';
|
|
2
6
|
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
3
7
|
import tsparser from '@typescript-eslint/parser';
|
|
@@ -7,7 +11,11 @@ import reactRefresh from 'eslint-plugin-react-refresh';
|
|
|
7
11
|
import globals from 'globals';
|
|
8
12
|
import graphqlPlugin from '@graphql-eslint/eslint-plugin';
|
|
9
13
|
|
|
10
|
-
|
|
14
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
15
|
+
const schemaPath = resolve(__dirname, '../../../../../schema.graphql');
|
|
16
|
+
const schemaExists = existsSync(schemaPath);
|
|
17
|
+
|
|
18
|
+
const config = [
|
|
11
19
|
// Global ignores
|
|
12
20
|
{
|
|
13
21
|
ignores: ['build/**/*', 'dist/**/*', 'coverage/**/*'],
|
|
@@ -111,31 +119,38 @@ export default [
|
|
|
111
119
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
112
120
|
},
|
|
113
121
|
},
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
122
|
+
];
|
|
123
|
+
|
|
124
|
+
// Only add GraphQL rules when schema exists (e.g. after graphql:schema).
|
|
125
|
+
// In CI or when schema is not checked in, skip so lint succeeds.
|
|
126
|
+
if (schemaExists) {
|
|
127
|
+
config.push(
|
|
128
|
+
{
|
|
129
|
+
files: ['**/*.{ts,tsx}'],
|
|
130
|
+
processor: graphqlPlugin.processor,
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
files: ['**/*.graphql'],
|
|
134
|
+
languageOptions: {
|
|
135
|
+
parser: graphqlPlugin.parser,
|
|
136
|
+
parserOptions: {
|
|
137
|
+
graphQLConfig: {
|
|
138
|
+
schema: '../../../../../schema.graphql',
|
|
139
|
+
},
|
|
127
140
|
},
|
|
128
141
|
},
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
|
|
142
|
+
plugins: {
|
|
143
|
+
'@graphql-eslint': graphqlPlugin,
|
|
144
|
+
},
|
|
145
|
+
rules: {
|
|
146
|
+
'@graphql-eslint/no-anonymous-operations': 'error',
|
|
147
|
+
'@graphql-eslint/no-duplicate-fields': 'error',
|
|
148
|
+
'@graphql-eslint/known-fragment-names': 'error',
|
|
149
|
+
'@graphql-eslint/no-undefined-variables': 'error',
|
|
150
|
+
'@graphql-eslint/no-unused-variables': 'error',
|
|
151
|
+
},
|
|
152
|
+
}
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export default config;
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"graphql:schema": "node scripts/get-graphql-schema.mjs"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@salesforce/sdk-data": "^1.
|
|
19
|
-
"@salesforce/webapp-experimental": "^1.
|
|
18
|
+
"@salesforce/sdk-data": "^1.106.0",
|
|
19
|
+
"@salesforce/webapp-experimental": "^1.106.0",
|
|
20
20
|
"@tailwindcss/vite": "^4.1.17",
|
|
21
21
|
"class-variance-authority": "^0.7.1",
|
|
22
22
|
"clsx": "^2.1.1",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@graphql-eslint/eslint-plugin": "^4.1.0",
|
|
41
41
|
"@graphql-tools/utils": "^11.0.0",
|
|
42
42
|
"@playwright/test": "^1.49.0",
|
|
43
|
-
"@salesforce/vite-plugin-webapp-experimental": "^1.
|
|
43
|
+
"@salesforce/vite-plugin-webapp-experimental": "^1.106.0",
|
|
44
44
|
"@testing-library/jest-dom": "^6.6.3",
|
|
45
45
|
"@testing-library/react": "^16.1.0",
|
|
46
46
|
"@testing-library/user-event": "^14.5.2",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
1
2
|
import { defineConfig } from 'vite';
|
|
2
3
|
import react from '@vitejs/plugin-react';
|
|
3
4
|
import path from 'path';
|
|
@@ -6,26 +7,29 @@ import tailwindcss from '@tailwindcss/vite';
|
|
|
6
7
|
import salesforce from '@salesforce/vite-plugin-webapp-experimental';
|
|
7
8
|
import codegen from 'vite-plugin-graphql-codegen';
|
|
8
9
|
|
|
10
|
+
const schemaPath = resolve(__dirname, '../../../../../schema.graphql');
|
|
11
|
+
const schemaExists = existsSync(schemaPath);
|
|
12
|
+
|
|
9
13
|
export default defineConfig(({ mode }) => {
|
|
10
14
|
return {
|
|
11
15
|
base: './',
|
|
12
|
-
// Type assertion avoids Plugin type mismatch when dist has its own node_modules (vite/rollup)
|
|
13
16
|
plugins: [
|
|
14
17
|
tailwindcss(),
|
|
15
18
|
react(),
|
|
16
19
|
salesforce(),
|
|
17
|
-
codegen(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
20
|
+
// Only add codegen when schema exists (e.g. after `npm run graphql:schema`).
|
|
21
|
+
// In CI or when schema is not checked in, skip codegen so build succeeds.
|
|
22
|
+
...(schemaExists
|
|
23
|
+
? [
|
|
24
|
+
codegen({
|
|
25
|
+
configFilePathOverride: resolve(__dirname, 'codegen.yml'),
|
|
26
|
+
runOnStart: true,
|
|
27
|
+
runOnBuild: true,
|
|
28
|
+
enableWatcher: true,
|
|
29
|
+
throwOnBuild: true,
|
|
30
|
+
}),
|
|
31
|
+
]
|
|
32
|
+
: []),
|
|
29
33
|
] as import('vite').PluginOption[],
|
|
30
34
|
|
|
31
35
|
// Build configuration for MPA
|