Skip to content

Commit

Permalink
Reset old code
Browse files Browse the repository at this point in the history
  • Loading branch information
ndaidong committed Jun 24, 2024
1 parent e3b9aff commit dda378d
Show file tree
Hide file tree
Showing 64 changed files with 31 additions and 11,376 deletions.
67 changes: 22 additions & 45 deletions .github/workflows/ci-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,50 +12,27 @@ jobs:

strategy:
matrix:
node_version: [18.x, 20.x, 22.x]
deno-version: [1.44.4]

steps:
- uses: actions/checkout@v4

- name: setup Node.js v${{ matrix.node_version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node_version }}

- name: run npm scripts
env:
FACEBOOK_APP_ID: ${{ secrets.FACEBOOK_APP_ID }}
FACEBOOK_CLIENT_TOKEN: ${{ secrets.FACEBOOK_CLIENT_TOKEN }}
PROXY_SERVER: ${{ secrets.PROXY_SERVER }}
run: |
npm install
npm run lint
npm run build --if-present
npm run test
- name: Coveralls Parallel
uses: coverallsapp/github-action@v2
with:
flag-name: run-${{ join(matrix.*, '-') }}
parallel: true
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: cache node modules
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
finish:
needs: test
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: coverallsapp/github-action@v2
with:
parallel-finished: true
carryforward: "run-18.x,run-20.x,run-21.x"

- name: Git Checkout Deno Module
uses: actions/checkout@v4
- name: Use Deno Version ${{ matrix.deno-version }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}
- name: format check
run: deno fmt --check mod.ts utils/* scripts/* tests/*
- name: run linter
run: deno lint mod.ts utils/* scripts/* tests/*
- name: run test
run: deno test --allow-all --coverage=cov/

- name: Generate coverage report
run: deno coverage --lcov cov > cov.lcov

- name: Upload coverage to Coveralls.io
uses: coverallsapp/github-action@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: cov.lcov
11 changes: 0 additions & 11 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
Expand Down
8 changes: 6 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ logs

node_modules
coverage
coverage.lcov
.nyc_output

yarn.lock
pnpm-lock.yaml
coverage.lcov
package-lock.json
pnpm-lock.yaml
deno.lock

npm
cov
cov.lcov
8 changes: 0 additions & 8 deletions .npmignore

This file was deleted.

35 changes: 2 additions & 33 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,48 +6,17 @@ Collaborations and pull requests are always welcomed, though larger proposals sh

As an OSS, it's better to follow the Unix philosophy: "do one thing and do it well".


## Third-party libraries

Please avoid using libaries other than those available in the standard library, unless necessary.

This library needs to be simple and flexible to run on multiple platforms such as Deno, Bun, or even browser.


## Coding convention

Make sure your code lints before opening a pull request.


```bash
cd oembed-extractor

# check coding convention issue
npm run lint

# auto fix coding convention issue
npm run lint:fix
```

*When you run `npm test`, the linting process will be triggered at first.*


## Testing

Be sure to run the unit test suite before opening a pull request. An example test run is shown below.

```bash
cd oembed-extractor
npm test
```

![oembed-extractor unit test](https://i.imgur.com/Nr5BgUx.png)

If test coverage decreased, please check test scripts and try to improve this number.


## Documentation

If you've changed APIs, please update README and [the examples](examples).
If you've changed APIs, please update README.


## Clean commit histories
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ Description above is a general rule and may be altered on case by case basis.

You can report low severity vulnerabilities as GitHub issues.

More severe vulnerabilities should be reported to email extractus.security@skiff.com.
More severe vulnerabilities should be reported to email extractus@pwshub.com.

---
129 changes: 0 additions & 129 deletions eslint.config.js

This file was deleted.

25 changes: 0 additions & 25 deletions eval.js

This file was deleted.

17 changes: 0 additions & 17 deletions examples/browser-oembed-parser/.gitignore

This file was deleted.

33 changes: 0 additions & 33 deletions examples/browser-oembed-parser/README.md

This file was deleted.

12 changes: 0 additions & 12 deletions examples/browser-oembed-parser/package.json

This file was deleted.

1 change: 0 additions & 1 deletion examples/browser-oembed-parser/public/chota.min.css

This file was deleted.

Loading

0 comments on commit dda378d

Please sign in to comment.