Skip to content

Commit

Permalink
removed the legacy BaseModel.isNew getter
Browse files Browse the repository at this point in the history
  • Loading branch information
ganigeorgiev committed May 1, 2023
1 parent afa44ae commit bde1d4c
Show file tree
Hide file tree
Showing 17 changed files with 17 additions and 34 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.14.4-rc

- Removed the legacy aliased `BaseModel.isNew` getter since it could conflict with similarly named record fields ([pocketbase#2385](https://github.com/pocketbase/pocketbase/discussions/2385)).
This helper is primarly used in the Admin UI, but if you are also using in your code, it is advised to replace it with the `$` prefixed version, aka. `BaseModel.$isNew`.


## 0.14.3

- Added `OAuth2AuthConfig.query` prop to send optional query parameters with the `authWithOAuth2(config)` call.
Expand Down
4 changes: 0 additions & 4 deletions dist/pocketbase.cjs.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ declare abstract class BaseModel {
$load(data: {
[key: string]: any;
}): void;
/**
* Alias of this.$isNew.
*/
get isNew(): boolean;
/**
* Returns whether the current loaded data represent a stored db record.
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/pocketbase.cjs.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pocketbase.cjs.js.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions dist/pocketbase.es.d.mts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ declare abstract class BaseModel {
$load(data: {
[key: string]: any;
}): void;
/**
* Alias of this.$isNew.
*/
get isNew(): boolean;
/**
* Returns whether the current loaded data represent a stored db record.
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/pocketbase.es.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pocketbase.es.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pocketbase.es.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pocketbase.es.mjs.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions dist/pocketbase.iife.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ declare abstract class BaseModel {
$load(data: {
[key: string]: any;
}): void;
/**
* Alias of this.$isNew.
*/
get isNew(): boolean;
/**
* Returns whether the current loaded data represent a stored db record.
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/pocketbase.iife.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pocketbase.iife.js.map

Large diffs are not rendered by default.

4 changes: 0 additions & 4 deletions dist/pocketbase.umd.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@ declare abstract class BaseModel {
$load(data: {
[key: string]: any;
}): void;
/**
* Alias of this.$isNew.
*/
get isNew(): boolean;
/**
* Returns whether the current loaded data represent a stored db record.
*/
Expand Down
2 changes: 1 addition & 1 deletion dist/pocketbase.umd.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/pocketbase.umd.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.14.3",
"version": "0.14.4-rc",
"name": "pocketbase",
"description": "PocketBase JavaScript SDK",
"author": "Gani Georgiev",
Expand Down
7 changes: 0 additions & 7 deletions src/models/utils/BaseModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,6 @@ export default abstract class BaseModel {
this.updated = typeof data.updated !== 'undefined' ? data.updated : '';
}

/**
* Alias of this.$isNew.
*/
get isNew(): boolean {
return this.$isNew
}

/**
* Returns whether the current loaded data represent a stored db record.
*/
Expand Down

0 comments on commit bde1d4c

Please sign in to comment.