Skip to content

Commit ad98d7d

Browse files
authored
Upgrade dependencies
1 parent 30c39e8 commit ad98d7d

File tree

6 files changed

+1314
-1655
lines changed

6 files changed

+1314
-1655
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ jobs:
55
lint:
66
runs-on: ubuntu-latest
77
steps:
8-
- uses: actions/checkout@v2
9-
- uses: actions/cache@v2
8+
- uses: actions/checkout@v3
9+
- uses: actions/cache@v3
1010
with:
1111
path: '**/node_modules'
1212
key: ${{ runner.os }}-lint-modules-${{ hashFiles('**/yarn.lock') }}
13-
- uses: actions/setup-node@v2
13+
- uses: actions/setup-node@v3
1414
with:
15-
node-version: 14.x
15+
node-version: 18.x
1616
- run: yarn install
1717
- run: yarn run lint
1818

@@ -25,16 +25,17 @@ jobs:
2525
- 12.x
2626
- 14.x
2727
- 16.x
28+
- 18.x
2829
steps:
2930
- name: Use Node.js ${{ matrix.node-version }}
30-
uses: actions/setup-node@v2
31+
uses: actions/setup-node@v3
3132
with:
3233
node-version: ${{ matrix.node-version }}
3334
- name: Ensure line endings are consistent
3435
run: git config --global core.autocrlf input
3536
- name: Check out repository
36-
uses: actions/checkout@v2
37-
- uses: actions/cache@v2
37+
uses: actions/checkout@v3
38+
- uses: actions/cache@v3
3839
with:
3940
path: '**/node_modules'
4041
key: ${{ runner.os }}-test-modules-${{ hashFiles('**/yarn.lock') }}
@@ -69,14 +70,15 @@ jobs:
6970
- 12.x
7071
- 14.x
7172
- 16.x
73+
- 18.x
7274
steps:
7375
- name: Use Node.js ${{ matrix.node-version }}
74-
uses: actions/setup-node@v2
76+
uses: actions/setup-node@v3
7577
with:
7678
node-version: ${{ matrix.node-version }}
7779
- name: Check out repository
78-
uses: actions/checkout@v2
79-
- uses: actions/cache@v2
80+
uses: actions/checkout@v3
81+
- uses: actions/cache@v3
8082
with:
8183
path: |
8284
**/node_modules

lib/RdfaParser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export class RdfaParser extends Transform implements RDF.Sink<EventEmitter, RDF.
7474
}
7575

7676
public _transform(chunk: any, encoding: string, callback: TransformCallback): void {
77-
this.parser.write(chunk);
77+
this.parser.write(chunk.toString());
7878
callback();
7979
}
8080

package.json

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
],
3030
"dependencies": {
3131
"@rdfjs/types": "*",
32-
"htmlparser2": "^7.0.0",
32+
"htmlparser2": "^8.0.0",
3333
"rdf-data-factory": "^1.1.0",
3434
"relative-to-absolute-iri": "^1.0.2"
3535
},
@@ -41,8 +41,8 @@
4141
"devDependencies": {
4242
"@types/jest": "^28.0.0",
4343
"@types/jest-each": "^24.3.0",
44-
"@types/node": "^16.0.0",
45-
"arrayify-stream": "^1.0.0",
44+
"@types/node": "^18.0.0",
45+
"arrayify-stream": "^2.0.0",
4646
"coveralls": "^3.0.0",
4747
"jest": "^28.0.0",
4848
"jest-each": "^28.0.0",
@@ -60,7 +60,7 @@
6060
"jest": {
6161
"globals": {
6262
"ts-jest": {
63-
"tsConfig": "test/tsconfig.json"
63+
"tsconfig": "test/tsconfig.json"
6464
}
6565
},
6666
"setupFilesAfterEnv": [
@@ -123,8 +123,5 @@
123123
"spec-1-xml-earl": "rdf-test-suite spec/parser.js http://rdfa.info/test-suite/test-cases/rdfa1.0/xml/manifest.ttl -i '{ \"profile\": \"xml\" }' -c .rdf-test-suite-cache/ -o earl -p spec/earl-meta.json > spec/earl-1-rdfastreamingparser-xml.ttl",
124124
"spec-clean": "rm -r .rdf-test-suite-cache/"
125125
},
126-
"resolutions": {
127-
"@types/rdf-js": "^4.0.0"
128-
},
129126
"sideEffects": false
130127
}

spec/parser.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
const { RdfaParser } = require("..");
2-
const { ErrorSkipped } = require('rdf-test-suite');
32

43
module.exports = {
54
parse: function (data, baseIRI, options) {
6-
return require('arrayify-stream')(require('streamify-string')(data)
5+
return require('arrayify-stream').default(require('streamify-string')(data)
76
.pipe(new RdfaParser(Object.assign({ baseIRI }, options))));
87
},
98
};

test/RdfParser-test.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@ import * as RDF from "@rdfjs/types";
44
import {PassThrough} from "stream";
55
import {RdfaParser} from "../lib/RdfaParser";
66
import {RDFA_FEATURES} from "../lib/RdfaProfile";
7+
import arrayifyStream from "arrayify-stream";
8+
79
const streamifyString = require('streamify-string');
8-
const arrayifyStream = require('arrayify-stream');
910
const quad = require('rdf-quad');
1011

1112
const DF = new DataFactory();

0 commit comments

Comments
 (0)