Skip to content

Commit

Permalink
Update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
wvanderp committed May 15, 2024
1 parent 0cced80 commit 8dc3e2e
Show file tree
Hide file tree
Showing 9 changed files with 1,728 additions and 10,449 deletions.
4 changes: 4 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"cSpell.words": [
"ABCE",
"adams",
"Autobuild",
"batchcomplete",
"calendarmodel",
Expand Down Expand Up @@ -40,13 +41,16 @@
"sitelink",
"Sitelinks",
"snak",
"snaks",
"Snaks",
"snaktype",
"sonarjs",
"stringification",
"verschil",
"Wbeditentity",
"wikibase",
"wikidata",
"wikipedia",
"wmde",
"wvdp"
]
Expand Down
2 changes: 1 addition & 1 deletion DEPLOY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ This guide will instruct you on how to deploy iwf

## Pre-commit

First, run `npm run lint` and `npm run test` to lint and test the project.
First, run `npm run lint` and `npm run test` and `npm run test:all` to lint and test the project.

See if the results are acceptable. Then, push the result to Github.

Expand Down
6 changes: 3 additions & 3 deletions FUTURE.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Future development of IWF

## things that could need some improvement
## Things that could need some improvement

- [ ] the way we work with the wikidata api is kinda messy, we should make it more consistent
- [ ] the way we work with the Wikidata api is kinda messy, we should make it more consistent

## things that could be added
## Things that could be added

- [ ] most of the input validation missing and assumes that the developer knows what they are doing. We could use some trust but verify.
12,105 changes: 1,687 additions & 10,418 deletions package-lock.json

Large diffs are not rendered by default.

46 changes: 23 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,47 +22,47 @@
">0.3%, last 2 versions, not dead, not op_mini all"
],
"devDependencies": {
"@babel/preset-env": "^7.23.7",
"@babel/preset-typescript": "^7.23.3",
"@babel/preset-env": "^7.24.5",
"@babel/preset-typescript": "^7.24.1",
"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/deep-diff": "^1.0.5",
"@types/jest": "^29.5.11",
"@types/node": "^20.10.6",
"@types/qs": "^6.9.11",
"@types/uuid": "^9.0.7",
"@typescript-eslint/eslint-plugin": "^6.18.0",
"@typescript-eslint/parser": "^6.18.0",
"dotenv": "^16.3.1",
"@types/jest": "^29.5.12",
"@types/node": "^20.12.12",
"@types/qs": "^6.9.15",
"@types/uuid": "^9.0.8",
"@typescript-eslint/eslint-plugin": "^7.9.0",
"@typescript-eslint/parser": "^7.9.0",
"dotenv": "^16.4.5",
"eslint": "^8.56.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-airbnb-typescript": "^17.1.0",
"eslint-config-airbnb-typescript": "^18.0.0",
"eslint-import-resolver-typescript": "^3.6.1",
"eslint-plugin-compat": "^4.2.0",
"eslint-plugin-cypress": "^2.15.1",
"eslint-plugin-cypress": "^3.2.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jest": "^27.6.1",
"eslint-plugin-jsdoc": "^48.0.2",
"eslint-plugin-jsonc": "^2.11.2",
"eslint-plugin-no-secrets": "^0.8.9",
"eslint-plugin-jest": "^28.5.0",
"eslint-plugin-jsdoc": "^48.2.5",
"eslint-plugin-jsonc": "^2.15.1",
"eslint-plugin-no-secrets": "^1.0.2",
"eslint-plugin-pii": "^1.0.2",
"eslint-plugin-ramda": "^2.5.1",
"eslint-plugin-sonarjs": "^0.23.0",
"eslint-plugin-unicorn": "^50.0.1",
"eslint-plugin-sonarjs": "^0.25.1",
"eslint-plugin-unicorn": "^53.0.0",
"eslint-plugin-woke": "^1.0.1",
"jest": "^29.7.0",
"npm-run-all": "^4.1.5",
"rimraf": "^5.0.5",
"rimraf": "^5.0.7",
"source-map-support": "^0.5.21",
"ts-node": "10.9.2",
"typedoc": "^0.25.6",
"typescript": "^5.3.3"
"typedoc": "^0.25.13",
"typescript": "^5.4.5"
},
"dependencies": {
"@aws-crypto/sha256-js": "^5.2.0",
"@wmde/wikibase-datamodel-types": "git+https://github.com/wvanderp/WikibaseDataModelTypes.git",
"axios": "1.6.5",
"axios": "1.6.8",
"diff-arrays-of-objects": "git+https://github.com/wvanderp/diff-arrays-of-objects.git",
"qs": "^6.11.2",
"qs": "^6.12.1",
"uuid": "^9.0.1",
"wikidata-properties": "git+https://github.com/wvanderp/wikidata-properties.git"
},
Expand All @@ -72,7 +72,7 @@
"lint": "npm-run-all -c -s tsc eslint lint:browser",
"lint:browser": "cd tests/browser && npm run lint && cd ../..",
"tsc": "tsc --noEmit",
"eslint": "eslint --ext ts,js src/ tests/integration tests/unit",
"eslint": "eslint --ext ts --ext js src/ tests/integration tests/unit",
"prepare": "cd tests/browser && npm install && cd ../..",
"prepublishOnly": "npm run build",
"test": "jest --testPathIgnorePatterns=\"integration/\"",
Expand Down
6 changes: 6 additions & 0 deletions tests/integration/upload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ describe('uploading to wikidata', () => {
it(
'should upload a item when requested',
async function () {
// check if the credentials are set in the environment
expect(typeof process.env.WIKIDATA_USERNAME).toBe('string');
expect(typeof process.env.WIKIDATA_PASSWORD).toBe('string');
expect(process.env.WIKIDATA_USERNAME).not.toEqual('');
expect(process.env.WIKIDATA_PASSWORD).not.toEqual('');

// setup the tokens
const token = await getToken(
process.env.WIKIDATA_USERNAME,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/Snaks/MathSnak.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const mathSnak = {
snaktype: 'value' as const,
property: 'P2534',
datavalue: {
value: 'k = \\frac{R}{N_\\text{A}}',
value: String.raw`k = \frac{R}{N_\text{A}}`,
type: 'string' as const
},
datatype: 'math' as const
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/Statement.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ describe('Statement', () => {
});

it('should not equal if the qualifiersOrder is changed', () => {
const a = new Statement(JSON.parse(JSON.stringify(statementJson)));
const b = new Statement(JSON.parse(JSON.stringify(statementJson)));
const a = new Statement(structuredClone(statementJson));
const b = new Statement(structuredClone(statementJson));

b.qualifiersOrder.pop();

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/testUtils/examples/snaks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ const musicalNotationJson: WikidataMusicalNotationSnak = {
snaktype: 'value',
property: 'P6883',
datavalue: {
value: "\\relative c' {c d e f g a b c}",
value: String.raw`\relative c' {c d e f g a b c}`,
type: 'string'
},
datatype: 'musical-notation'
Expand Down

0 comments on commit 8dc3e2e

Please sign in to comment.