From 5572fb5bbf27b217c2e8ea4879ead3e9e66eaf13 Mon Sep 17 00:00:00 2001 From: shinoni Date: Fri, 13 Feb 2026 18:00:08 -0800 Subject: [PATCH 1/2] fix: allow WebApplication app name in any case, add tests - Use appName (from folder) instead of source.name to preserve case - Add tests for MyApp, myapp, MYAPP Co-authored-by: Cursor --- .../adapters/webApplicationsSourceAdapter.ts | 2 +- .../webApplicationsSourceAdapter.test.ts | 52 ++++++++++++++++++- 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/src/resolve/adapters/webApplicationsSourceAdapter.ts b/src/resolve/adapters/webApplicationsSourceAdapter.ts index 1bdeb6aeeb..edd1c0d321 100644 --- a/src/resolve/adapters/webApplicationsSourceAdapter.ts +++ b/src/resolve/adapters/webApplicationsSourceAdapter.ts @@ -52,7 +52,7 @@ export class WebApplicationsSourceAdapter extends BundleSourceAdapter { ? source : new SourceComponent( { - name: source.name, + name: appName, type: source.type, content: source.content, xml: expectedXmlPath, diff --git a/test/resolve/adapters/webApplicationsSourceAdapter.test.ts b/test/resolve/adapters/webApplicationsSourceAdapter.test.ts index 2c4940696b..8e1531f9b9 100644 --- a/test/resolve/adapters/webApplicationsSourceAdapter.test.ts +++ b/test/resolve/adapters/webApplicationsSourceAdapter.test.ts @@ -16,7 +16,7 @@ import { join } from 'node:path'; import { assert, expect } from 'chai'; import { Messages, SfError } from '@salesforce/core'; -import { ForceIgnore, RegistryAccess, SourceComponent, VirtualTreeContainer, registry } from '../../../src'; +import { ForceIgnore, RegistryAccess, SourceComponent, VirtualDirectory, VirtualTreeContainer, registry } from '../../../src'; import { WebApplicationsSourceAdapter } from '../../../src/resolve/adapters'; import { RegistryTestUtil } from '../registryTestUtil'; @@ -152,4 +152,54 @@ describe('WebApplicationsSourceAdapter', () => { ); testUtil.restore(); }); + + describe('app name case', () => { + const buildAdapterWithAppName = (appName: string) => { + const appPath = join(BASE_PATH, appName); + const metaFile = join(appPath, `${appName}.webapplication-meta.xml`); + const config = { outputDir: 'src', routing: { trailingSlash: 'auto', fallback: '/index.html' } }; + const vfs: VirtualDirectory[] = [ + { + dirPath: appPath, + children: [ + `${appName}.webapplication-meta.xml`, + { name: 'webapplication.json', data: Buffer.from(JSON.stringify(config)) }, + 'src', + ], + }, + { dirPath: join(appPath, 'src'), children: ['index.html'] }, + ]; + const t = new VirtualTreeContainer(vfs); + return { + adapter: new WebApplicationsSourceAdapter(registry.types.webapplication, registryAccess, forceIgnore, t), + appPath, + metaFile, + }; + }; + + it('should preserve mixed-case app name (MyApp)', () => { + const { adapter, appPath, metaFile } = buildAdapterWithAppName('MyApp'); + const comp = adapter.getComponent(appPath); + expect(comp).to.not.be.undefined; + expect(comp!.name).to.equal('MyApp'); + expect(comp!.fullName).to.equal('MyApp'); + expect(comp!.xml).to.equal(metaFile); + }); + + it('should preserve lowercase app name (myapp)', () => { + const { adapter, appPath } = buildAdapterWithAppName('myapp'); + const comp = adapter.getComponent(appPath); + expect(comp).to.not.be.undefined; + expect(comp!.name).to.equal('myapp'); + expect(comp!.fullName).to.equal('myapp'); + }); + + it('should preserve uppercase app name (MYAPP)', () => { + const { adapter, appPath } = buildAdapterWithAppName('MYAPP'); + const comp = adapter.getComponent(appPath); + expect(comp).to.not.be.undefined; + expect(comp!.name).to.equal('MYAPP'); + expect(comp!.fullName).to.equal('MYAPP'); + }); + }); }); From 594699dde8340108939ce5b5e513fe3275ffae27 Mon Sep 17 00:00:00 2001 From: shinoni Date: Wed, 18 Feb 2026 13:20:58 -0800 Subject: [PATCH 2/2] Bumping up @salesforce/core Co-authored-by: Cursor --- package.json | 2 +- yarn.lock | 69 ++++++++++++++++++++++++++-------------------------- 2 files changed, 36 insertions(+), 35 deletions(-) diff --git a/package.json b/package.json index dbf7deba07..e521495e50 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,7 @@ "node": ">=18.0.0" }, "dependencies": { - "@salesforce/core": "^8.24.0", + "@salesforce/core": "^8.26.2", "@salesforce/kit": "^3.2.4", "@salesforce/ts-types": "^2.0.12", "@salesforce/types": "^1.6.0", diff --git a/yarn.lock b/yarn.lock index 8e3f6e6218..c4480b1e53 100644 --- a/yarn.lock +++ b/yarn.lock @@ -609,6 +609,22 @@ node-fetch "^2.6.1" xml2js "^0.6.2" +"@jsforce/jsforce-node@^3.10.13": + version "3.10.14" + resolved "https://registry.yarnpkg.com/@jsforce/jsforce-node/-/jsforce-node-3.10.14.tgz#e6429626118a86247605f14b2466026f7180cff8" + integrity sha512-p8Ug1SypcAT7Q0zZA0+7fyBmgUpB/aXkde4Bxmu0S/O4p28CVwgYvKyFd9vswmHIhFabd/QqUCrlYuVhYdr2Ew== + dependencies: + "@sindresorhus/is" "^4" + base64url "^3.0.1" + csv-parse "^5.5.2" + csv-stringify "^6.6.0" + faye "^1.4.0" + form-data "^4.0.4" + https-proxy-agent "^5.0.0" + multistream "^3.1.0" + node-fetch "^2.6.1" + xml2js "^0.6.2" + "@jsforce/jsforce-node@^3.10.4": version "3.10.7" resolved "https://registry.yarnpkg.com/@jsforce/jsforce-node/-/jsforce-node-3.10.7.tgz#9a377e8da925d1eec713ca43ea0bc1ba6aafd7f6" @@ -735,15 +751,15 @@ semver "^7.6.3" ts-retry-promise "^0.8.1" -"@salesforce/core@^8.24.0": - version "8.24.0" - resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.24.0.tgz#13426f9f3b5ed0ec126b8009e5eda68e03db0401" - integrity sha512-8Ra5RT95bRkmHmaaFgABwkXbnHNSNS7l9gbJzJgO6VQpaEeytGPPyymnAE7TcTM2xp/QwlXn+PgX4biX7Lb7JA== +"@salesforce/core@^8.26.2": + version "8.26.2" + resolved "https://registry.yarnpkg.com/@salesforce/core/-/core-8.26.2.tgz#1b82f7bc8e8598ba1ed8779759a5188b74841445" + integrity sha512-P1otybl1d+sXg5FORl3PD82TzaOOP5aH1j0UVkpGf1p4BLw6VD0mJekS4mDc0pz6UKK2iIt0CFxXAEMKa/YtBA== dependencies: - "@jsforce/jsforce-node" "^3.10.10" + "@jsforce/jsforce-node" "^3.10.13" "@salesforce/kit" "^3.2.4" "@salesforce/ts-types" "^2.0.12" - ajv "^8.17.1" + ajv "^8.18.0" change-case "^4.1.2" fast-levenshtein "^3.0.0" faye "^1.4.1" @@ -1272,6 +1288,16 @@ ajv@^8.11.0, ajv@^8.17.1: json-schema-traverse "^1.0.0" require-from-string "^2.0.2" +ajv@^8.18.0: + version "8.18.0" + resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.18.0.tgz#8864186b6738d003eb3a933172bb3833e10cefbc" + integrity sha512-PlXPeEWMXMZ7sPYOHqmDyCJzcfNrUr3fGNKtezX14ykXOEIvyK81d+qydx89KY5O71FKMPaQ2vBfBFI5NHR63A== + dependencies: + fast-deep-equal "^3.1.3" + fast-uri "^3.0.1" + json-schema-traverse "^1.0.0" + require-from-string "^2.0.2" + ansi-colors@^4.1.3: version "4.1.3" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" @@ -5507,16 +5533,7 @@ srcset@^5.0.0: resolved "https://registry.yarnpkg.com/srcset/-/srcset-5.0.0.tgz#9df6c3961b5b44a02532ce6ae4544832609e2e3f" integrity sha512-SqEZaAEhe0A6ETEa9O1IhSPC7MdvehZtCnTR0AftXk3QhY2UNgb+NApFOUPZILXk/YTDfFxMTNJOBpzrJsEdIA== -"string-width-cjs@npm:string-width@^4.2.0": - version "4.2.3" - resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" - integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== - dependencies: - emoji-regex "^8.0.0" - is-fullwidth-code-point "^3.0.0" - strip-ansi "^6.0.1" - -string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: +"string-width-cjs@npm:string-width@^4.2.0", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3: version "4.2.3" resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010" integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g== @@ -5575,14 +5592,7 @@ string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" -"strip-ansi-cjs@npm:strip-ansi@^6.0.1": - version "6.0.1" - resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" - integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== - dependencies: - ansi-regex "^5.0.1" - -strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: +"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@6.0.1, strip-ansi@^6.0.0, strip-ansi@^6.0.1: version "6.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9" integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A== @@ -6088,7 +6098,7 @@ workerpool@^9.2.0: resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-9.3.3.tgz#e75281fe62e851afb21cdeef8fa85f6a62ec3583" integrity sha512-slxCaKbYjEdFT/o2rH9xS1hf4uRDch1w7Uo+apxhZ+sf/1d9e0ZVkn42kPNGP2dgjIx6YFvSevj0zHvbWe2jdw== -"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0": +"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== @@ -6106,15 +6116,6 @@ wrap-ansi@^6.2.0: string-width "^4.1.0" strip-ansi "^6.0.0" -wrap-ansi@^7.0.0: - version "7.0.0" - resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43" - integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q== - dependencies: - ansi-styles "^4.0.0" - string-width "^4.1.0" - strip-ansi "^6.0.0" - wrap-ansi@^8.1.0: version "8.1.0" resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"