Skip to content

Commit

Permalink
Update dependencies for Angular 17.3 (#278)
Browse files Browse the repository at this point in the history
* Update dependencies for Angular 17.3

* Restore ng2-dragula dependency
  • Loading branch information
johnhwhite authored Apr 4, 2024
1 parent 2cdf747 commit 1774ada
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 10.0.1 (2024-04-04)

- Updated dependencies to work with Angular 17.3. [#278](https://github.com/blackbaud/skyux-docs-tools/pull/278)

## 10.0.0 (2024-03-27)

### ⚠ BREAKING CHANGES
Expand Down
2 changes: 1 addition & 1 deletion projects/docs-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@skyux/docs-tools",
"version": "10.0.0",
"version": "10.0.1",
"peerDependencies": {
"@angular/common": "^17.3.1",
"@angular/core": "^17.3.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,12 @@ describe('Code examples editor service', () => {
'@skyux/popovers': skyuxVersion,
'@skyux/router': skyuxVersion,
'@skyux/theme': skyuxVersion,
'@types/jasmine': '~4.3.1',
'ng2-dragula': '^5.0.1',
'@types/jasmine': '~5.1.4',
'ng2-dragula': '5.0.1',
rxjs: '^7',
tslib: '^2.5.0',
typescript: '~5.1.6',
'zone.js': '~0.13.1',
tslib: '^2.6.2',
typescript: '~5.3.3',
'zone.js': '~0.14.4',
'@skyux/foobar': skyuxVersion, // <-- Important
});
});
Expand All @@ -395,4 +395,9 @@ describe('Code examples editor service', () => {
`<link rel="stylesheet" type="text/css" href="https://sky.blackbaudcdn.net/static/skyux-icons/${SKY_UX_ICONS_VERSION.full}/assets/css/skyux-icons.min.css" crossorigin="anonymous">`,
);
});

it('should support node template', () => {
service.launchEditor(codeExample, 'node');
expect(stackblitzSpy.calls.mostRecent().args[0].template).toEqual('node');
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,20 @@ import { SkyDocsCodeExample } from './code-example';
import { SkyDocsCodeExampleModuleDependencies } from './code-example-module-dependencies';
import { SkyDocsCodeExampleTheme } from './code-example-theme';

type StackblitzTemplate = 'angular-cli' | 'node';

/**
* @internal
*/
@Injectable({
providedIn: 'root',
})
export class SkyDocsCodeExamplesEditorService {
public launchEditor(codeExample: SkyDocsCodeExample): void {
const project = this.#getPayload(codeExample);
public launchEditor(
codeExample: SkyDocsCodeExample,
template: StackblitzTemplate = 'angular-cli',
): void {
const project = this.#getPayload(codeExample, template);
const openFile: string[] = [];
if (project.files['src/app/demo.component.html']) {
openFile.push('src/app/demo.component.html');
Expand All @@ -35,7 +40,10 @@ export class SkyDocsCodeExamplesEditorService {
StackBlitzSDK.openProject(project, options);
}

#getPayload(codeExample: SkyDocsCodeExample): StackBlitzProject {
#getPayload(
codeExample: SkyDocsCodeExample,
template: StackblitzTemplate,
): StackBlitzProject {
const angularVersion = `^${ANGULAR_VERSION.major}`;
const skyuxVersion = `^${SKY_UX_VERSION.full}`;

Expand Down Expand Up @@ -66,12 +74,12 @@ export class SkyDocsCodeExamplesEditorService {
'@skyux/popovers': skyuxVersion,
'@skyux/router': skyuxVersion,
'@skyux/theme': skyuxVersion,
'@types/jasmine': '~4.3.1',
'ng2-dragula': '^5.0.1',
'@types/jasmine': '~5.1.4',
'ng2-dragula': '5.0.1',
rxjs: '^7',
tslib: '^2.5.0',
typescript: '~5.1.6',
'zone.js': '~0.13.1',
tslib: '^2.6.2',
typescript: '~5.3.3',
'zone.js': '~0.14.4',
};

const mergedDependencies = Object.assign(
Expand Down Expand Up @@ -106,8 +114,7 @@ export class SkyDocsCodeExamplesEditorService {
files,
title: 'SKY UX Demo',
description: 'SKY UX Demo',
template: 'angular-cli',
// template: 'node', // web-container
template,
dependencies: mergedDependencies,
settings: {
compile: {
Expand Down

0 comments on commit 1774ada

Please sign in to comment.