Skip to content

Commit

Permalink
release(workspace): v8.16.0 release
Browse files Browse the repository at this point in the history
refactor: lint-fix

build: updated nx to v14.5.5

refactor: updated setup-project build config

refactor: removed deprecated functions

BREAKING CHANGE

feat: updated to angular 14 (#15)

* build: update dependencies

* build: ran nx migrations

* build: angular build fixes

* build: nest build fixes

* build: nx build config fix

- added targetDefaults

* build: nx build config fix

* build: nx build cache fixes

* fix: test fix

* build: nx build fix

* build: angular-calendar jest fix

* build: setup-script.sh update

- test-setup-script now runs in parallel with tests

* build: changed build target structure

- "build" target no longer attempts to build children, aside from the "safe" build-base. Projects that need to be built should have build called on them directly.
- added "build-all" target to workspace to facilitate building all components first before deploying.

* build: ideal build

BREAKING CHANGES:
- angular 14
- nestjs 9
refactor: refactored expandUniqueDateBlocksFunction()

- fixed scenario that was not previously properly tested
- refactored expandUniqueDateBlocksFunction() to allow for defining a second set of blocks that are always treated as "next"
- added additional scenarios
  • Loading branch information
ci committed Aug 13, 2022
1 parent 3ac566e commit 659fc56
Show file tree
Hide file tree
Showing 178 changed files with 26,452 additions and 13,275 deletions.
15 changes: 9 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defaults: &defaults
# https://circleci.com/blog/config-best-practices-dependency-caching/

orbs:
nx: nrwl/nx@1.1.3
nx: nrwl/nx@1.6.0
node: circleci/[email protected]
jobs:
build:
Expand All @@ -21,8 +21,10 @@ jobs:
- node/install-packages
# initialize nx
- nx/set-shas
# build content
- run: npx nx affected --base=$NX_BASE --target=build --parallel --max-parallel=2
# builds everything in the project in order
- run:
name: build
command: npx nx run workspace:build-all
# persist builds to workspace
- persist_to_workspace:
root: ~/code
Expand Down Expand Up @@ -116,8 +118,11 @@ jobs:
name: run setup-project.sh script
command: cd setup && ./setup-project.sh myprojectapp myproject myproject 9200 ~/setup-test
- run:
name: replace test project's @dereekb in node_modules with generated packages
name: replace test project's @dereekb in node_modules with generated packages (we don't want symlinks)
command: rm -r ~/setup-test/myproject/node_modules/@dereekb && cp -r dist/packages ~/setup-test/myproject/node_modules/@dereekb
- run:
name: Try build components
command: cd ~/setup-test/myproject && npx nx run-many --target=build-base --projects=myproject-firebase,myproject-components
- run:
name: Try build
command: cd ~/setup-test/myproject && npx -y nx build myproject && npx -y nx build myproject-api
Expand Down Expand Up @@ -203,8 +208,6 @@ workflows:
- test-setup-script:
requires:
- build
- test-with-node
- test-with-node-firebase
- run-release-and-push-to-main:
requires:
- build
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [8.16.0](https://github.com/dereekb/dbx-components/compare/v8.15.2-dev...v8.16.0) (2022-08-13)


### Features

* updated to angular 14 ([#15](https://github.com/dereekb/dbx-components/issues/15)) ([739726e](https://github.com/dereekb/dbx-components/commit/739726eabdf49007b096dbb892054887268c7732))



## [8.15.2](https://github.com/dereekb/dbx-components/compare/v8.15.1-dev...v8.15.2) (2022-08-11)


Expand Down
9 changes: 9 additions & 0 deletions apps/demo-api/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [8.16.0](https://github.com/dereekb/dbx-components/compare/v8.15.2-dev...v8.16.0) (2022-08-13)


### Features

* updated to angular 14 ([#15](https://github.com/dereekb/dbx-components/issues/15)) ([739726e](https://github.com/dereekb/dbx-components/commit/739726eabdf49007b096dbb892054887268c7732))



## [8.15.2](https://github.com/dereekb/dbx-components/compare/v8.15.1-dev...v8.15.2) (2022-08-11)


Expand Down
1 change: 1 addition & 0 deletions apps/demo-api/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
(global as any).appTestType = 'firebase';

module.exports = {
Expand Down
14 changes: 2 additions & 12 deletions apps/demo-api/project.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/demo-api/src",
"projectType": "application",
"targets": {
"build": {
"executor": "@nrwl/workspace:run-commands",
"outputs": ["dist/apps/demo-api"],
"options": {
"command": "npx nx run demo-api:build-base",
"color": true
Expand All @@ -12,12 +14,6 @@
"build-base": {
"executor": "@nrwl/node:webpack",
"outputs": ["{options.outputPath}"],
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"outputPath": "dist/apps/demo-api",
"main": "apps/demo-api/src/main.ts",
Expand Down Expand Up @@ -101,12 +97,6 @@
},
"ci-deploy": {
"executor": "@nrwl/workspace:run-commands",
"dependsOn": [
{
"target": "build",
"projects": "self"
}
],
"options": {
"commands": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,14 @@ export function guestbookEntryUpdateEntryFactory({ firebaseServerActionTransform
// perform the change in a transaction
await guestbookCollection.firestoreContext.runTransaction(async (transaction) => {
const parentGuestbook = guestbookCollection.documentAccessorForTransaction(transaction).loadDocument(document.parent);
const guestbookSnapshot = await parentGuestbook.snapshot();
const guestbookData = guestbookSnapshot.data();
const guestbookEntryDocument = guestbookEntryCollectionFactory(parentGuestbook).documentAccessorForTransaction(transaction).loadDocument(documentRef);
const [guestbook, guestbookEntry] = await Promise.all([parentGuestbook.snapshotData(), guestbookEntryDocument.snapshotData()]);

if (!guestbookData) {
if (!guestbook) {
throw new Error('The guestbook could not be found.');
} else if (guestbookData.locked) {
} else if (guestbook.locked) {
throw new Error('The guestbook has been locked.');
} else {
const documentInTransaction = guestbookEntryCollectionFactory(parentGuestbook).documentAccessorForTransaction(transaction).loadDocument(documentRef);

const set: Partial<GuestbookEntry> = {
message,
signed,
Expand All @@ -72,7 +70,11 @@ export function guestbookEntryUpdateEntryFactory({ firebaseServerActionTransform
};

// create or update the value
await documentInTransaction.createOrUpdate(set);
if (guestbookEntry == null) {
await guestbookEntryDocument.create(set as GuestbookEntry);
} else {
await guestbookEntryDocument.update(set);
}
}
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { userHasNoProfileError } from '../../common';
import { profileForUserRequest } from './profile.util';

/**
* @deprecated use updateProfileUsername instead.
* @deprecated use updateProfileUsername's pattern with update functions instead.
*/
export const profileSetUsername = onCallWithDemoNestContext<SetProfileUsernameParams>(
inAuthContext(async (request) => {
Expand Down
3 changes: 2 additions & 1 deletion apps/demo-api/src/test/fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ export const demoGuestbookEntryContextFactory = () =>
const guestbookEntry = instance.document;

if (params.init !== false) {
await guestbookEntry.createOrUpdate({
await guestbookEntry.accessor.set({
uid: params.u.uid,
message: params.message ?? 'test',
signed: params.signed ?? 'test',
published: params.published ?? true,
Expand Down
9 changes: 9 additions & 0 deletions apps/demo-e2e/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [8.16.0](https://github.com/dereekb/dbx-components/compare/v8.15.2-dev...v8.16.0) (2022-08-13)


### Features

* updated to angular 14 ([#15](https://github.com/dereekb/dbx-components/issues/15)) ([739726e](https://github.com/dereekb/dbx-components/commit/739726eabdf49007b096dbb892054887268c7732))



## [8.15.2](https://github.com/dereekb/dbx-components/compare/v8.15.1-dev...v8.15.2) (2022-08-11)


Expand Down
1 change: 1 addition & 0 deletions apps/demo-e2e/project.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "apps/demo-e2e/src",
"projectType": "application",
"targets": {
Expand Down
9 changes: 9 additions & 0 deletions apps/demo/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).

# [8.16.0](https://github.com/dereekb/dbx-components/compare/v8.15.2-dev...v8.16.0) (2022-08-13)


### Features

* updated to angular 14 ([#15](https://github.com/dereekb/dbx-components/issues/15)) ([739726e](https://github.com/dereekb/dbx-components/commit/739726eabdf49007b096dbb892054887268c7732))



## [8.15.2](https://github.com/dereekb/dbx-components/compare/v8.15.1-dev...v8.15.2) (2022-08-11)


Expand Down
1 change: 1 addition & 0 deletions apps/demo/jest.config.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
(global as any).appTestType = 'angular';

module.exports = {
Expand Down
22 changes: 3 additions & 19 deletions apps/demo/project.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"projectType": "application",
"sourceRoot": "apps/demo/src",
"prefix": "app",
"targets": {
"build": {
"executor": "@nrwl/workspace:run-commands",
"outputs": ["dist/apps/demo"],
"options": {
"command": "npx nx run demo:build-base",
"color": true
Expand All @@ -13,12 +15,6 @@
"build-base": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"dependsOn": [
{
"target": "build",
"projects": "dependencies"
}
],
"options": {
"outputPath": "dist/apps/demo",
"index": "apps/demo/src/index.html",
Expand All @@ -36,7 +32,7 @@
"output": "assets/dbx-firebase"
}
],
"allowedCommonJsDependencies": ["validator", "date-fns-tz"],
"allowedCommonJsDependencies": ["lodash", "make-error", "validator", "date-fns-tz"],
"stylePreprocessorOptions": {
"includePaths": ["packages"]
},
Expand Down Expand Up @@ -114,24 +110,12 @@
},
"deploy": {
"executor": "@nrwl/workspace:run-commands",
"dependsOn": [
{
"target": "build",
"projects": "self"
}
],
"options": {
"command": "npx firebase --project=default deploy --only hosting"
}
},
"ci-deploy": {
"executor": "@nrwl/workspace:run-commands",
"dependsOn": [
{
"target": "build",
"projects": "self"
}
],
"options": {
"command": "npx firebase --project=default deploy --only hosting --token \"$FIREBASE_TOKEN\""
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OnInit, Component } from '@angular/core';
import { Component } from '@angular/core';
import { AbstractDbxWidgetComponent } from '@dereekb/dbx-web';

export const DOC_EXTENSION_WIDGET_EXAMPLE_TYPE = 'widgetExample';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OnInit, Component } from '@angular/core';
import { Component } from '@angular/core';
import { AbstractDbxWidgetComponent } from '@dereekb/dbx-web';

export const DOC_EXTENSION_WIDGET_ICON_EXAMPLE_TYPE = 'widgetIconExample';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { OnInit, Component } from '@angular/core';
import { Component } from '@angular/core';
import { DbxWidgetDataPair } from '@dereekb/dbx-web';
import { ListLoadingState, successResult } from '@dereekb/rxjs';
import { map, Observable, of } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h4>With Icon</h4>
<dbx-button icon="settings" text="Test Button"></dbx-button>

<h4>With Custom Content</h4>
<dbx-button (buttonClick)="clickBar1()" icon="settings" [working]="barButtonOptionsActiveState">
<dbx-button (buttonClick)="clickBar1()" icon="settings" [working]="barButtonOptionsWorkingState">
<div style="width: 400px">
<p>A</p>
<p>B</p>
Expand Down Expand Up @@ -53,7 +53,7 @@ <h3>Progress Buttons</h3>
</doc-feature-example>

<doc-feature-example header="dbx-bar-button" hint="Component that displays a button and implements the DbxButton directive directly and wraps a dbx-spinner-button.">
<dbx-bar-button (btnClick)="clickBar1()" [options]="demoButton1" [working]="barButtonOptionsActiveState" [disabled]="false"></dbx-bar-button>
<dbx-bar-button (btnClick)="clickBar1()" [options]="demoButton1" [working]="barButtonOptionsWorkingState" [disabled]="false"></dbx-bar-button>
<dbx-button-spacer></dbx-button-spacer>
<dbx-bar-button (btnClick)="clickBar2()" [options]="barButtonOptions1"></dbx-bar-button>
<dbx-button-spacer></dbx-button-spacer>
Expand Down
Loading

0 comments on commit 659fc56

Please sign in to comment.