datastore-api
Advanced tools
Comparing version 2.0.1 to 2.2.0
@@ -5,2 +5,19 @@ # Changelog | ||
## [2.2.0](https://github.com/mdornseif/datastore-api/compare/v2.0.1...v2.2.0) (2023-07-02) | ||
### Features | ||
* Add `Dstore.engine` identifier to allow debugging of nested stacks ([d5cba67](https://github.com/mdornseif/datastore-api/commit/d5cba6715a9e22e2cc5482347437f9b223be2c12)) | ||
### Bug Fixes | ||
* **CI:** added missint `lint` target ([0e23765](https://github.com/mdornseif/datastore-api/commit/0e2376583c1ab5dbbaded31bcfc1800b4807eed6)) | ||
* **CI:** use changed action for gcloud ([a7a280f](https://github.com/mdornseif/datastore-api/commit/a7a280fc32890ea5f6df18cc5b3dd9b869445ec2)) | ||
* **deps:** eslint ([0386f25](https://github.com/mdornseif/datastore-api/commit/0386f25f492a4b1d0aebd2b71a13437a51e3dad2)) | ||
* lint ([7f5cd36](https://github.com/mdornseif/datastore-api/commit/7f5cd36821e670b989e858482b751b4e74f1d4ef)) | ||
* Moch-Datastore TS nags ([ee496be](https://github.com/mdornseif/datastore-api/commit/ee496be3b6fcf5fd3e574dde06dc3411e4facc75)) | ||
* skip Tests with datastore-emulator ([f648718](https://github.com/mdornseif/datastore-api/commit/f6487189e3b9de912ad0b2b363b1a87e772b25e2)) | ||
### [2.0.1](https://github.com/mdornseif/datastore-api/compare/v2.0.0...v2.0.1) (2022-02-08) | ||
@@ -7,0 +24,0 @@ |
160
package.json
{ | ||
"name": "datastore-api", | ||
"version": "2.0.1", | ||
"description": "Simplified, more consitent API for Google Cloud Datastore", | ||
"main": "build/main/index.js", | ||
"typings": "build/main/index.d.ts", | ||
"module": "build/module/index.js", | ||
"repository": "https://github.com/mdornseif/datastore-api", | ||
"homepage": "http://mdornseif.io/datastore-api/", | ||
"license": "MIT", | ||
"keywords": [ | ||
"datastore" | ||
], | ||
"scripts": { | ||
"build": "run-p build:*", | ||
"build:main": "tsc -p tsconfig.json", | ||
"build:module": "tsc -p tsconfig.module.json", | ||
"fix": "run-s fix:*", | ||
"fix:prettier": "prettier \"src/**/*.ts\" --write", | ||
"fix:lint": "eslint src --ext .ts --fix", | ||
"test": "run-s build test:*", | ||
"test:lint": "eslint src --ext .ts", | ||
"test:prettier": "prettier \"src/**/*.ts\" --list-different", | ||
"test:spelling": "cspell \"{README.md,.github/*.md,src/**/*.ts}\"", | ||
"test:unit": "nyc ava --verbose", | ||
"check-cli": "run-s test diff-integration-tests check-integration-tests", | ||
"check-integration-tests": "run-s check-integration-test:*", | ||
"diff-integration-tests": "mkdir -p diff && rm -rf diff/test && cp -r test diff/test && rm -rf diff/test/test-*/.git && cd diff && git init --quiet && git add -A && git commit --quiet --no-verify --allow-empty -m 'WIP' && echo '\\n\\nCommitted most recent integration test output in the \"diff\" directory. Review the changes with \"cd diff && git diff HEAD\" or your preferred git diff viewer.'", | ||
"watch:build": "tsc -p tsconfig.json -w", | ||
"watch:test": "nyc --silent ava --watch", | ||
"cov": "run-s build test:unit cov:html cov:lcov && open-cli coverage/index.html", | ||
"cov:html": "nyc report --reporter=html", | ||
"cov:lcov": "nyc report --reporter=lcov", | ||
"cov:send": "run-s cov:lcov && codecov", | ||
"cov:check": "nyc report && nyc check-coverage --lines 50 --functions 20 --branches 20", | ||
"doc": "run-s doc:html && open-cli build/docs/index.html", | ||
"doc:html": "typedoc src/ --exclude **/*.spec.ts --out build/docs", | ||
"doc:json": "typedoc src/ --exclude **/*.spec.ts --json build/docs/typedoc.json", | ||
"doc:publish": "gh-pages -m \"[ci skip] Updates\" -d build/docs", | ||
"version": "standard-version", | ||
"reset-hard": "git clean -dfx && git reset --hard && yarn", | ||
"prepare-release": "run-s reset-hard test cov:check doc:html version doc:publish" | ||
"author": "Maximillian Dornseif", | ||
"ava": { | ||
"failFast": true, | ||
"files": [ | ||
"!build/module/**" | ||
], | ||
"timeout": "60s", | ||
"typescript": { | ||
"rewritePaths": { | ||
"src/": "build/main/" | ||
} | ||
} | ||
}, | ||
"engines": { | ||
"node": ">=16" | ||
"config": { | ||
"commitizen": { | ||
"path": "cz-conventional-changelog" | ||
} | ||
}, | ||
"dependencies": { | ||
"assertate": "^2.4.0", | ||
"assertate-debug": "^2.4.2", | ||
"google-datastore-emulator": "^5.1.0", | ||
"prom-client": "^14.0.1" | ||
}, | ||
"description": "Simplified, more consitent API for Google Cloud Datastore", | ||
"devDependencies": { | ||
"@ava/typescript": "^1.1.1", | ||
"@google-cloud/datastore": "^6.6.2", | ||
"@ava/typescript": "^4.0.0", | ||
"@google-cloud/datastore": "7.3", | ||
"@google-cloud/promisify": "^3.0.1", | ||
"@istanbuljs/nyc-config-typescript": "^1.0.1", | ||
"@size-limit/preset-small-lib": "^8.2.6", | ||
"@tsconfig/recommended": "^1.0.2", | ||
"@types/debug": "^4.1.8", | ||
"@types/is": "^0.0.22", | ||
"@types/node": "^17.0.0", | ||
"@typescript-eslint/eslint-plugin": "^4.0.1", | ||
"@typescript-eslint/parser": "^4.0.1", | ||
"ava": "^3.15.0", | ||
"ava": "^5.2.0", | ||
"codecov": "^3.5.0", | ||
@@ -64,7 +43,15 @@ "cspell": "5.14.0", | ||
"debug": "^4.3.3", | ||
"dts-cli": "^2.0.3", | ||
"eslint": "^7.8.0", | ||
"eslint-config-prettier": "^6.11.0", | ||
"eslint-plugin-eslint-comments": "^3.2.0", | ||
"eslint-plugin-flowtype": "^8.0.3", | ||
"eslint-plugin-import": "2.25.4", | ||
"eslint-plugin-jsx-a11y": "^6.7.1", | ||
"eslint-plugin-prettier": "^4.2.1", | ||
"eslint-plugin-react": "^7.32.2", | ||
"eslint-plugin-react-hooks": "^4.6.0", | ||
"gh-pages": "^3.1.0", | ||
"husky": "^8.0.3", | ||
"lint-staged": "^13.2.2", | ||
"npm-run-all": "^4.1.5", | ||
@@ -74,8 +61,15 @@ "nyc": "^15.1.0", | ||
"prettier": "^2.1.1", | ||
"size-limit": "^8.2.6", | ||
"sort-package-json": "^2.4.1", | ||
"standard-version": "^9.0.0", | ||
"ts-essentials": "9.1.2", | ||
"ts-node": "^10.4.0", | ||
"typedoc": "^0.22.10", | ||
"typescript": "^4.0.2" | ||
"tslib": "^2.6.0", | ||
"typedoc": "0.22.11", | ||
"typescript": "^4.0.2", | ||
"vitest": "^0.30.1" | ||
}, | ||
"engines": { | ||
"node": ">=16" | ||
}, | ||
"files": [ | ||
@@ -90,27 +84,29 @@ "build/main", | ||
], | ||
"ava": { | ||
"failFast": true, | ||
"timeout": "60s", | ||
"typescript": { | ||
"rewritePaths": { | ||
"src/": "build/main/" | ||
} | ||
}, | ||
"files": [ | ||
"!build/module/**" | ||
] | ||
}, | ||
"config": { | ||
"commitizen": { | ||
"path": "cz-conventional-changelog" | ||
"homepage": "http://github.com/mdornseif/datastore-api/", | ||
"husky": { | ||
"hooks": { | ||
"pre-commit": "lint-staged" | ||
} | ||
}, | ||
"prettier": { | ||
"singleQuote": true | ||
"keywords": [ | ||
"datastore", | ||
"google cloud" | ||
], | ||
"license": "MIT", | ||
"lint-staged": { | ||
"*{css,scss,md,markdown,json,yaml,yml,graphql,html}": "prettier -w", | ||
"*{js,jsx,ts,tsx}": [ | ||
"prettier -w", | ||
"eslint --cache --fix" | ||
], | ||
"package*json": "sort-package-json" | ||
}, | ||
"main": "build/main/index.js", | ||
"module": "build/module/index.js", | ||
"name": "datastore-api", | ||
"nyc": { | ||
"extends": "@istanbuljs/nyc-config-typescript", | ||
"exclude": [ | ||
"**/*.spec.js" | ||
] | ||
], | ||
"extends": "@istanbuljs/nyc-config-typescript" | ||
}, | ||
@@ -120,3 +116,29 @@ "peerDependencies": { | ||
"debug": "^4.3.3" | ||
} | ||
}, | ||
"prettier": { | ||
"printWidth": 110, | ||
"semi": false, | ||
"singleQuote": true, | ||
"trailingComma": "es5" | ||
}, | ||
"release": { | ||
"branches": [ | ||
"main", | ||
"master", | ||
"next" | ||
] | ||
}, | ||
"repository": "https://github.com/mdornseif/datastore-api", | ||
"scripts": { | ||
"analyze": "size-limit --why", | ||
"build": "dts build", | ||
"lint": "dts lint", | ||
"size": "size-limit", | ||
"start": "dts watch", | ||
"test": "vitest", | ||
"unimported": "npx unimported; npx findead src", | ||
"version": "standard-version" | ||
}, | ||
"typings": "build/main/index.d.ts", | ||
"version": "2.2.0" | ||
} |
@@ -26,7 +26,17 @@ [![version](https://img.shields.io/npm/v/datastore-api.svg?style=flat-square)](https://npmjs.org/datastore-api) | ||
- [keySerialize](http://mdornseif.io/datastore-api/classes/Dstore.html#keySerialize) is synchronous. 🦄 | ||
- Starting your code with the environment variable `DEBUG='ds:api'` allows you to trace API calls. | ||
Find the full documentation [here](http://mdornseif.io/datastore-api/classes/Dstore.html). In there also some of the idiosyncrasies of using the Datastore are explained. | ||
Find the full documentation [here](https://mdornseif.github.io/datastore-api/classes/Dstore.html). In there also some of the idiosyncrasies of using the Datastore are explained. | ||
See [the API documentation](http://mdornseif.io/datastore-api/classes/Dstore.html) for Details, [Github](https://github.com/mdornseif/datastore-api) for source. | ||
See [the API documentation](http://mdornseif.github.io/datastore-api/classes/Dstore.html) for Details, [Github](https://github.com/mdornseif/datastore-api) for source. | ||
## Major issues | ||
- The Javascript-Datastore Bindings use nanosecond-Timestamp Information stored in the Datasore and rounds it to milliseconds. Python at least retains microseconds. | ||
- the old `get_entity_group_version()` / `getEntityGroupVersion()` API has been retired. You can still for `key` query `{ path: [key.path[0], {'kind': '__entity_group__', 'id': 1}]}` to get a `__version__` property. The reliability of this data on FireStore is unknown. | ||
- Googles Javascript API decided to use `[Symbol(KEY)]` to represent the Key in an entity. This results in all kinds of confusion when serializing to JSON, e.g. for caching. This library adds the property `_keyStr` which will be transparently used to regenerate `[Symbol(KEY)]` when needed. | ||
- Many functions are somewhat polymorphic where the shape of the return value depends on the function parameters, e.g. if the API was called with a key or a list of keys. You are encouraged to alvais provide a list of parameters instead a single parameter, e.g. `get([key])` instead of `get(key)`. | ||
- `insert()` and `save()` sometimes return the key being written and sometimes not. So you might or might not get some data in `insertResponse?.[0].mutationResults?.[0]?.key?.path` - urgs. | ||
- Google avoids [BigInt](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt). So `key.id` is (usually but not always) returned as a String but you have to provide a Number to the API. | ||
## Metrics | ||
@@ -33,0 +43,0 @@ |
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Debug access
Supply chain riskUses debug, reflection and dynamic code execution features.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
No contributors or author data
MaintenancePackage does not specify a list of contributors or an author in package.json.
Found 1 instance in 1 package
0
81
0
16205
42
4
0
2
+ Addedassertate-debug@^2.4.2
+ Addedassertate-debug@2.4.2(transitive)
- Removedassertate@^2.4.0
- Removedassertate@2.4.0(transitive)