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
12 changes: 6 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
Expand All @@ -28,7 +28,7 @@ jobs:
npm run test

- name: Upload build artifact
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v7
with:
name: dist
path: src/dist
Expand All @@ -46,9 +46,9 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
Expand All @@ -64,7 +64,7 @@ jobs:
git config --global user.email "ci@test.local"

- name: Download build artifact
uses: actions/download-artifact@v4
uses: actions/download-artifact@v8
with:
name: dist
path: src/dist
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ jobs:
environment: npm-publish

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v7

- uses: actions/setup-node@v4
- uses: actions/setup-node@v7
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
Expand Down
16 changes: 11 additions & 5 deletions src/engine/engine.gh-pages-integration.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,17 @@ vi.mock('../utils', async () => ({
}));

// Mock Git class from gh-pages to avoid spawning actual git processes
vi.mock('gh-pages/lib/git', () => ({
default: vi.fn().mockImplementation(() => ({
getRemoteUrl: vi.fn().mockResolvedValue('https://github.com/test/repo.git')
}))
}));
vi.mock('gh-pages/lib/git', () => {
class MockGit {
getRemoteUrl = vi.fn().mockResolvedValue(
'https://github.com/test/repo.git'
);
}

return {
default: MockGit
};
});

describe('engine - gh-pages integration', () => {
const logger = new logging.NullLogger();
Expand Down
4 changes: 3 additions & 1 deletion src/interfaces.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import type {GhPagesGit} from './engine/engine.prepare-options-helpers';

/**
* Angular outputPath configuration
* Can be either a string (path) or an object with base + browser properties
Expand Down Expand Up @@ -65,7 +67,7 @@ export interface PublishOptions {
cname?: string;
add?: boolean;
git?: string;
beforeAdd?: (git: unknown) => void | Promise<void>;
beforeAdd?: (git: GhPagesGit) => void | Promise<void>;
[key: string]: unknown; // Allow additional gh-pages options
}

Expand Down
2 changes: 1 addition & 1 deletion src/ng-add.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const ngAdd = (options: NgAddOptions) => async (
if (!options.project) {
if (workspace.projects.size === 1) {
// If there is only one project, return that one.
options.project = Array.from(workspace.projects.keys())[0];
options.project = Array.from(workspace.projects.keys())[0] as string;
} else {
throw new SchematicsException(
'There is more than one project in your workspace. Please select it manually by using the --project argument.'
Expand Down
Loading
Loading