Skip to content

Commit 5e30718

Browse files
committed
Merge extractus/main into merge-extractus-main (prefer upstream)
2 parents 4aca0a7 + 9fa9d66 commit 5e30718

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2622
-919
lines changed

.github/workflows/ci-test.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,40 +8,33 @@ on: [push, pull_request]
88
jobs:
99
test:
1010

11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-latest
1212

1313
strategy:
1414
matrix:
15-
node_version: [14.x, 15.x, 16.x, 17.x, 18.x]
15+
node_version: [20.x, 22.x, 24.x]
1616

1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919

2020
- name: setup Node.js v${{ matrix.node_version }}
21-
uses: actions/setup-node@v2
21+
uses: actions/setup-node@v4
2222
with:
2323
node-version: ${{ matrix.node_version }}
2424

2525
- name: run npm scripts
26+
env:
27+
PROXY_SERVER: ${{ secrets.PROXY_SERVER }}
2628
run: |
27-
npm i -g standard
2829
npm install
2930
npm run lint
3031
npm run build --if-present
3132
npm run test
3233
33-
- name: sync to coveralls
34-
uses: coverallsapp/github-action@v1.1.2
35-
with:
36-
github-token: ${{ secrets.GITHUB_TOKEN }}
37-
3834
- name: cache node modules
39-
uses: actions/cache@v2
35+
uses: actions/cache@v4
4036
with:
4137
path: ~/.npm
4238
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
4339
restore-keys: |
4440
${{ runner.os }}-node-
45-
46-
47-

.github/workflows/codeql-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838

3939
steps:
4040
- name: Checkout repository
41-
uses: actions/checkout@v3
41+
uses: actions/checkout@v4
4242

4343
# Initializes the CodeQL tools for scanning.
4444
- name: Initialize CodeQL

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,8 @@ coverage
1515
yarn.lock
1616
coverage.lcov
1717
pnpm-lock.yaml
18+
lcov.info
1819

19-
dist/
20+
deno.lock
21+
22+
evaluation

.npmignore

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,7 @@
1-
node_modules/
2-
src/
3-
test-data/
4-
.idea/
5-
coverage/
6-
.vscode/
7-
8-
.DS_Store
9-
yarn.lock
10-
coverage.lcov
1+
node_modules
2+
coverage
3+
.github
114
pnpm-lock.yaml
12-
13-
*.js
14-
*.cjs
15-
*.js.map
16-
17-
!dist/**/*.js
18-
!index.js
5+
examples
6+
test-data
7+
lcov.info

CONTRIBUTING.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Contributing to `@extractus/article-extractor`
2+
3+
Glad to see you here.
4+
5+
Collaborations and pull requests are always welcomed, though larger proposals should be discussed first.
6+
7+
As an OSS, it's better to follow the Unix philosophy: "do one thing and do it well".
8+
9+
## Third-party libraries
10+
11+
Please avoid using libaries other than those available in the standard library, unless necessary.
12+
13+
This library needs to be simple and flexible to run on multiple platforms such as Deno, Bun, or even browser.
14+
15+
16+
## Coding convention
17+
18+
Make sure your code lints before opening a pull request.
19+
20+
21+
```bash
22+
cd article-extractor
23+
24+
# check coding convention issue
25+
npm run lint
26+
27+
# auto fix coding convention issue
28+
npm run lint:fix
29+
```
30+
31+
*When you run `npm test`, the linting process will be triggered at first.*
32+
33+
34+
## Testing
35+
36+
Be sure to run the unit test suite before opening a pull request. An example test run is shown below.
37+
38+
```bash
39+
cd article-extractor
40+
npm test
41+
```
42+
43+
![article-extractor unit test](https://i.imgur.com/TbRCUSS.png?110222)
44+
45+
If test coverage decreased, please check test scripts and try to improve this number.
46+
47+
48+
## Documentation
49+
50+
If you've changed APIs, please update README and [the examples](examples).
51+
52+
53+
## Clean commit histories
54+
55+
When you open a pull request, please ensure the commit history is clean.
56+
Squash the commits into logical blocks, perhaps a single commit if that makes sense.
57+
58+
What you want to avoid is commits such as "WIP" and "fix test" in the history.
59+
This is so we keep history on master clean and straightforward.
60+
61+
For people new to git, please refer the following guides:
62+
63+
- [Writing good commit messages](https://github.com/erlang/otp/wiki/writing-good-commit-messages)
64+
- [Commit Message Guidelines](https://gist.github.com/robertpainsi/b632364184e70900af4ab688decf6f53)
65+
66+
67+
## License
68+
69+
By contributing to `@extractus/article-extractor`, you agree that your contributions will be licensed under its [MIT license](LICENSE).
70+
71+
---

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016 Dong Nguyen
3+
Copyright (c) 2016 Extractus
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)