Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ const filePath = `${tempDir}/config/package-solution.json`;
### Template and Example Standards

- **Sort `dependencies` and `devDependencies` alphabetically** in `package.json`.
- **Don't include direct dependencies that come from the rig** (e.g., `css-loader`, `@typescript-eslint/parser`, `@types/webpack-env`, `@types/heft-jest`, `@microsoft/spfx-heft-plugins`).
- **Don't include direct dependencies that come from the rig** (e.g., `css-loader`, `@typescript-eslint/parser`, `@types/webpack-env`, `@types/jest`, `@microsoft/spfx-heft-plugins`).
- **Remove config files that are redundant with `rig.json`** (e.g., `config/sass.json`, `config/typescript.json` when their values are defaults).
- **Localize hardcoded UI strings** using the `loc/` pattern.
- **Use `import` for images**, not `require()`.
Expand Down
8 changes: 4 additions & 4 deletions api/spfx-template-api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"_phase:test": "heft run --only test -- --clean"
},
"dependencies": {
"@microsoft/spfx-heft-plugins": "1.23.0-beta.2",
"@rushstack/node-core-library": "~5.21.0",
"@rushstack/terminal": "~0.22.4",
"@microsoft/spfx-heft-plugins": "1.23.0-rc.1",
"@rushstack/node-core-library": "~5.23.1",
"@rushstack/terminal": "~0.23.0",
"adm-zip": "^0.5.16",
"cli-table3": "^0.6.5",
"ejs": "^3.1.10",
Expand All @@ -23,7 +23,7 @@
},
"devDependencies": {
"@microsoft/spfx-cli-build-rig": "workspace:*",
"@rushstack/heft": "^1.2.9",
"@rushstack/heft": "^1.2.15",
"@types/adm-zip": "^0.5.5",
"@types/ejs": "^3.1.5",
"@types/lodash": "^4.17.18",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`PublicGitHubRepositorySource _buildDownloadUrl should build GHE REST API URL for non-github.com hosts 1`] = `Array []`;

Expand Down
4 changes: 2 additions & 2 deletions api/spfx-template-api/src/templating/SPFxBuiltInContext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface ISPFxBuiltInContext {
libraryName: string;
/** SPFx version from the template manifest (e.g. "1.22.2"). */
spfxVersion: string;
/** SPFx version with hyphens escaped for shields.io badge URLs (e.g. "1.23.0--beta.2"). */
/** SPFx version with hyphens escaped for shields.io badge URLs (e.g. "1.23.0--rc.1"). */
spfxVersionForBadgeUrl: string;
/** Random (or deterministic in CI mode) GUID identifying the component. */
componentId: string;
Expand Down Expand Up @@ -145,7 +145,7 @@ export function buildBuiltInContext(
spfxVersion,
// The shields.io badge URL uses hyphens as separators, so hyphens in version
// numbers need to be escaped as double-hyphens to avoid ambiguity.
// For example, "1.23.0-beta.2" becomes "1.23.0--beta.2".
// For example, "1.23.0-rc.1" becomes "1.23.0--rc.1".
spfxVersionForBadgeUrl: spfxVersion.replace(/-/g, '--'),
componentId,
featureId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,9 +102,9 @@ describe(buildBuiltInContext.name, () => {
it('should escape hyphens for pre-release versions', () => {
const ctx: ISPFxBuiltInContext = buildBuiltInContext({
...DEFAULT_INPUTS,
spfxVersion: '1.23.0-beta.2'
spfxVersion: '1.23.0-rc.1'
});
expect(ctx.spfxVersionForBadgeUrl).toBe('1.23.0--beta.2');
expect(ctx.spfxVersionForBadgeUrl).toBe('1.23.0--rc.1');
});
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`writePackageManagerToPackageJsonEnginesAsync detects version and writes for npm: terminal output 1`] = `Array []`;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`SPFxTemplateWriter scaffold log integration should record a "merged" file-write event with mergeHelper name 1`] = `
Array [
Expand Down
8 changes: 4 additions & 4 deletions apps/spfx-cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
},
"dependencies": {
"@microsoft/spfx-template-api": "workspace:*",
"@rushstack/node-core-library": "~5.21.0",
"@rushstack/ts-command-line": "~5.3.4",
"@rushstack/terminal": "~0.22.4",
"@rushstack/node-core-library": "~5.23.1",
"@rushstack/ts-command-line": "~5.3.8",
"@rushstack/terminal": "~0.23.0",
"zod": "^4.1.5"
},
"devDependencies": {
"@microsoft/spfx-cli-build-rig": "workspace:*",
"@rushstack/heft": "^1.2.9",
"@rushstack/heft": "^1.2.15",
"eslint": "9.37.0"
}
}
6 changes: 3 additions & 3 deletions apps/spfx-cli/src/cli/actions/tests/CreateAction.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -526,12 +526,12 @@ describe('CreateAction', () => {

describe('spfxVersionForBadgeUrl', () => {
it('escapes hyphens in prerelease versions for shields.io badge URLs', async () => {
mockTemplate.spfxVersion = '1.23.0-beta.2';
mockTemplate.spfxVersion = '1.23.0-rc.1';
await runCreateAsync();
expect(mockTemplate.renderAsync).toHaveBeenCalledWith(
expect.objectContaining({
spfxVersion: '1.23.0-beta.2',
spfxVersionForBadgeUrl: '1.23.0--beta.2'
spfxVersion: '1.23.0-rc.1',
spfxVersionForBadgeUrl: '1.23.0--rc.1'
}),
expect.anything()
);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`CreateAction --package-manager calls writePackageManagerToPackageJsonEnginesAsync after a successful install 1`] = `
Array [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`ListTemplatesAction --local-source (additive) adds LocalFileSystemRepositorySource AND still includes the default GitHub source 1`] = `
Array [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
// Jest Snapshot v1, https://jestjs.io/docs/snapshot-testing

exports[`CommandLineHelp prints the help: create 1`] = `
"usage: spfx create [-h] [--template-url URL] [--spfx-version VERSION]
Expand Down
2 changes: 1 addition & 1 deletion common/autoinstallers/plugins/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
"version": "1.0.0",
"private": true,
"dependencies": {
"@rushstack/rush-published-versions-json-plugin": "0.1.2"
"@rushstack/rush-published-versions-json-plugin": "0.1.8"
}
}
Loading