Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
GeorgDangl committed May 14, 2020
2 parents 8d00854 + 0a54bd2 commit b49b3a2
Show file tree
Hide file tree
Showing 30 changed files with 13,704 additions and 3,933 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,5 @@ docs/index.md
*.coverageresults

output/

src/ng-lightquery/projects/ng-lightquery/karma-results.xml
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

All notable changes to **LightQuery** are documented here.

## v1.8.1:
- The Angular library was updateds to be compatible with Angular v9.1

## v1.8.0:
- Add a `thenSort` parameter to specify a second sort option. This translates to something like `queryable.OrderBy(sort).ThenBy(thenSort)`
- Fix C# client not cancelling previous requests when query parameters in the `PaginationBaseService` were changed. If a new request is started due to parameter changes while another request is still en-route, the previous request is discarded and no event is emitted for when the previous request completes
Expand Down
11 changes: 6 additions & 5 deletions build/Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -359,22 +359,23 @@ string GetFrameworkNameFromFilename(string filename)
DeleteFile(ngAppDir / "karma-results.xml");
Npm("ci", ngAppDir);
Npm("run test", ngAppDir);
Npm("run test:ci", ngAppDir);
});

Target NgLibraryPublish => _ => _
.Executes(() =>
{
var ngAppDir = SourceDirectory / "ng-lightquery";
var ngLibraryDir = ngAppDir / "dist" / "ng-lightquery";
DeleteDirectory(ngAppDir / "dist");
Npm("ci", ngAppDir);
Npm("run build", ngAppDir);
Npm("run buildLibrary", ngAppDir);
Npm($"version {GitVersion.NuGetVersion}", ngAppDir);
Npm($"version {GitVersion.NuGetVersion}", ngLibraryDir);
var srcReadmePath = RootDirectory / "README.md";
var destReadmePath = ngAppDir / "README.md";
var destReadmePath = ngLibraryDir / "README.md";
if (File.Exists(destReadmePath))
{
File.Delete(destReadmePath);
Expand All @@ -385,6 +386,6 @@ string GetFrameworkNameFromFilename(string filename)
? "latest"
: "next";
Npm($"publish --tag={npmTag}", ngAppDir);
Npm($"publish --tag={npmTag}", ngLibraryDir);
});
}
12 changes: 4 additions & 8 deletions src/LightQuery.Client/PaginationBaseService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,18 +102,14 @@ public void Dispose()
private void SetupQuerySubscription()
{
_querySubscription = Observable.Merge(_forceRefreshSource, _requestUrl.DistinctUntilChanged())
.Where(url => url != null)
.Select(url =>
{
return Observable.DeferAsync(async token =>
{
HttpResponseMessage httpResponse = null;
if (url != null)
{
_requestRunningSource.OnNext(true);
httpResponse = await _getHttpAsync(url, token);
}
return Observable.Return(httpResponse);
_requestRunningSource.OnNext(true);
var response = await _getHttpAsync(url, token);
return Observable.Return(response);
});
})
.Switch()
Expand Down
16 changes: 16 additions & 0 deletions src/ng-lightquery/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true

[*.ts]
quote_type = single

[*.md]
max_line_length = off
trim_trailing_whitespace = false
51 changes: 46 additions & 5 deletions src/ng-lightquery/.gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,46 @@
dist/**/*
node_modules/**/*
coverage/**/*
karma-results.xml
README.md
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
/dist
/tmp
/out-tsc
# Only exists if Bazel was run
/bazel-out

# dependencies
/node_modules

# profiling files
chrome-profiler-events*.json
speed-measure-plugin*.json

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
.history/*

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db
11 changes: 0 additions & 11 deletions src/ng-lightquery/.npmignore

This file was deleted.

27 changes: 27 additions & 0 deletions src/ng-lightquery/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# NgLightqueryWorkspace

This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 9.1.6.

## Development server

Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.

## Code scaffolding

Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.

## Build

Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.

## Running unit tests

Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).

## Running end-to-end tests

Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).

## Further help

To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
47 changes: 47 additions & 0 deletions src/ng-lightquery/angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": "projects",
"projects": {
"ng-lightquery": {
"projectType": "library",
"root": "projects/ng-lightquery",
"sourceRoot": "projects/ng-lightquery/src",
"prefix": "lib",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "projects/ng-lightquery/tsconfig.lib.json",
"project": "projects/ng-lightquery/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/ng-lightquery/tsconfig.lib.prod.json"
}
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "projects/ng-lightquery/src/test.ts",
"tsConfig": "projects/ng-lightquery/tsconfig.spec.json",
"karmaConfig": "projects/ng-lightquery/karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"projects/ng-lightquery/tsconfig.lib.json",
"projects/ng-lightquery/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}},
"defaultProject": "ng-lightquery"
}
2 changes: 0 additions & 2 deletions src/ng-lightquery/index.ts

This file was deleted.

84 changes: 0 additions & 84 deletions src/ng-lightquery/karma.conf.js

This file was deleted.

Loading

0 comments on commit b49b3a2

Please sign in to comment.