Skip to content

Commit

Permalink
feat: #514 check NPM package install status in vite HMR plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
ascott18 committed Jan 30, 2025
1 parent 5ee184a commit 8e1cd3e
Show file tree
Hide file tree
Showing 6 changed files with 399 additions and 239 deletions.
6 changes: 2 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
- `ViewModel.$getErrors` now returns a `string[]` instead of a `Generator<string>`.
- `StandardBehaviors.AfterDelete` is now `AfterDeleteAsync` and has a different signature and semantics. Instead of modifying the resulting `item` and `includeTree` with `ref` parameters, these values can be optionally overridden by returning an ItemResult with its `Object` and `IncludeTree` properties populated with non-null values.

## Major Changes

- All endpoints with bodies are now send as JSON instead of form data, with the exception of those endpoints with file parameters and only scalar parameters (no complex parameters) beyond the file parameters.

## Features

- All endpoints with bodies are now send as JSON instead of form data, with the exception of those endpoints with file parameters and only scalar parameters (no complex parameters) beyond the file parameters.
- Added `$search`, `$filter`, and `$orderBy` shorthands to ListViewModel.
- Coalesce's Vite middleware (`UseViteDevelopmentServer`) now checks if your installed NPM packages match what's defined in package.json and package-lock.json, presenting an in-browser warning if they do not. This helps avoid forgetting to reinstall packages after pulling down changes in multi-developer projects.

# 5.3.1

Expand Down
14 changes: 10 additions & 4 deletions playground/Coalesce.Domain/AppDbContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Linq;
using System.Security.Cryptography;

// [assembly: CoalesceConfiguration(NoAutoInclude = true)]

Expand Down Expand Up @@ -43,10 +44,15 @@ protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
.UseCoalesceAuditLogging<AuditLog>(x => x
.WithAugmentation<OperationContext>()
.WithMergeWindow(TimeSpan.FromSeconds(15))
.ConfigureAudit(x => x
// Just a random example of audit config:
.ExcludeProperty<Person>(p => p.ProfilePic)
)
.ConfigureAudit(config =>
{
static string ShaString(byte[]? bytes) => bytes is null ? "" : "SHA1:" + Convert.ToBase64String(SHA1.HashData(bytes));

config
.FormatType<byte[]>(ShaString)
// Just a random example of audit config:
.ExcludeProperty<Person>(p => p.ProfilePic);
})
);
}

Expand Down
26 changes: 13 additions & 13 deletions playground/Coalesce.Web.Vue3/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion playground/Coalesce.Web.Vue3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"vue": "^3.5.4",
"vue-facing-decorator": "^2.0.4",
"vue-router": "^4.4.4",
"vuetify": "^3.7.1"
"vuetify": "3.7.1"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "5.4.0",
Expand Down
Loading

0 comments on commit 8e1cd3e

Please sign in to comment.