Skip to content

Commit

Permalink
chore: update dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Oct 20, 2022
1 parent 35da902 commit 8610eb9
Show file tree
Hide file tree
Showing 6 changed files with 61 additions and 83 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/documentationjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Build documentation
uses: zakodium/documentationjs-action@v1
- name: Deploy to GitHub pages
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:

jobs:
nodejs:
# Documentation: https://github.com/zakodium/workflows#nodejs-ci
uses: zakodium/workflows/.github/workflows/nodejs.yml@nodejs-v1
with:
node-version-matrix: '[14, 16, 18]'
lint-check-types: true
37 changes: 8 additions & 29 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,33 +5,12 @@ on:
branches:
- main

env:
NODE_VERSION: 16.x

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- name: Get package name
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.BOT_TOKEN }}
release-type: node
package-name: ${{ env.PACKAGE_NAME }}
bump-minor-pre-major: Yes
- uses: actions/checkout@v2
# These if statements ensure that a publication only occurs when a new release is created
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-node@v2
with:
node-version: ${{ env.NODE_VERSION }}
registry-url: 'https://registry.npmjs.org'
if: ${{ steps.release.outputs.release_created }}
- run: npm install
if: ${{ steps.release.outputs.release_created }}
- run: npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOT_TOKEN }}
if: ${{ steps.release.outputs.release_created }}
release:
# Documentation: https://github.com/zakodium/workflows#release
uses: zakodium/workflows/.github/workflows/release.yml@release-v1
with:
npm: true
secrets:
github-token: ${{ secrets.BOT_TOKEN }}
npm-token: ${{ secrets.NPM_BOT_TOKEN }}
19 changes: 9 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@
"prepack": "npm run tsc",
"prettier": "prettier --check src",
"prettier-write": "prettier --write src",
"test": "npm run test-coverage && npm run eslint && npm run prettier && npm run check-types",
"test-coverage": "jest --coverage",
"test-only": "jest",
"test": "npm run test-only && npm run eslint && npm run prettier && npm run check-types",
"test-only": "jest --coverage",
"tsc": "npm run clean && npm run tsc-cjs && npm run tsc-esm",
"tsc-cjs": "tsc --project tsconfig.cjs.json",
"tsc-esm": "tsc --project tsconfig.esm.json"
Expand All @@ -39,18 +38,18 @@
"homepage": "https://github.com/cheminfo/arraybuffer-xml-parser#readme",
"devDependencies": {
"@types/he": "^1.1.2",
"@types/jest": "^28.1.7",
"@types/jest": "^29.2.0",
"cheminfo-build": "^1.1.11",
"eslint": "^8.22.0",
"eslint-config-cheminfo-typescript": "^11.0.1",
"eslint": "^8.25.0",
"eslint-config-cheminfo-typescript": "^11.1.0",
"he": "^1.2.0",
"iobuffer": "^5.1.0",
"jest": "^28.1.3",
"iobuffer": "^5.2.1",
"jest": "^29.2.1",
"pako": "^2.0.4",
"prettier": "^2.7.1",
"rimraf": "^3.0.2",
"ts-jest": "^28.0.8",
"typescript": "^4.7.4",
"ts-jest": "^29.0.3",
"typescript": "^4.8.4",
"uint8-base64": "^0.1.1"
},
"dependencies": {
Expand Down
56 changes: 28 additions & 28 deletions src/__tests__/parseStream.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ describe('parseStream', () => {
});

const results = [];
//@ts-expect-error feature is too new
const readableStream = file.readableWebStream();
for await (let entry of parseStream(
// @ts-expect-error Incompatibility between node and web types.
readableStream.pipeThrough(transformStream),
'address',
)) {
Expand All @@ -33,33 +33,33 @@ describe('parseStream', () => {
await file.close();

expect(results).toMatchInlineSnapshot(`
Array [
Object {
"buildingNo": 1,
"city": "New York",
"flatNo": 1,
"street": "Park Ave",
},
Object {
"buildingNo": 33,
"city": "Boston",
"flatNo": 24,
"street": "Centre St",
},
Object {
"buildingNo": 1,
"city": "Moscow",
"flatNo": 2,
"street": "Kahovka",
},
Object {
"buildingNo": 3,
"city": "Tula",
"flatNo": 78,
"street": "Lenina",
},
]
`);
[
{
"buildingNo": 1,
"city": "New York",
"flatNo": 1,
"street": "Park Ave",
},
{
"buildingNo": 33,
"city": "Boston",
"flatNo": 24,
"street": "Centre St",
},
{
"buildingNo": 1,
"city": "Moscow",
"flatNo": 2,
"street": "Kahovka",
},
{
"buildingNo": 3,
"city": "Tula",
"flatNo": 78,
"street": "Lenina",
},
]
`);
}
});
});
28 changes: 14 additions & 14 deletions src/bufferUtils/arrayIndexOf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@ export function arrayIndexOf(
}
found++;
} else if (found > 0) {
let j = 0;
for (
;
j <= found && array[foundIndex + j] === array[foundIndex + found];
j++
);
if (j < found + 1) {
foundIndex = -1;
found = 0;
} else {
foundIndex++;
}
} else {
found = 0;
let j = 0;
for (
;
j <= found && array[foundIndex + j] === array[foundIndex + found];
j++
);
if (j < found + 1) {
foundIndex = -1;
found = 0;
} else {
foundIndex++;
}
} else {
found = 0;
foundIndex = -1;
}
}
if (found !== referenceArray.length) {
foundIndex = -1;
Expand Down

0 comments on commit 8610eb9

Please sign in to comment.