forked from ashi009/node-fast-html-parser
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple fixes #161
Merged
Merged
Multiple fixes #161
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
f45dc46
test: Added test for prototype pollution (closes #129)
nonara 5a2dd0c
fix: blockTextElements incorrectly matching partial tag (detail) (fix…
nonara a80c907
fix: Add null to return type for HTMLElement#querySelector (closes #157)
nonara 5a2fc80
feat!: Add esm named export support (closes #160 closes #139)
nonara f64fc4d
build(github): Added CI workflows
nonara e626686
build: Dropped travis config & replaced badge with GH actions
nonara 75280a8
build(deps): Added standard-version to devDeps
nonara f41f77c
feat: Improved parsing performance + matching (closes #164)
nonara 2c23eec
refactor: Organized tests + added ability to test src or dist
nonara 7ff5ee1
Merge remote-tracking branch 'upstream/main' into fixes
nonara File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
test/ | ||
dist/ | ||
node_modules/ | ||
esm/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: Build (CI) | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
types: [ opened, synchronize, closed ] | ||
push: | ||
branches: [ master ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
matrix: | ||
node-version: [ 12.x, 14.x, 16.x ] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Determine Yarn Cache Path | ||
id: yarn-cache-dir-path | ||
run: echo "::set-output name=dir::$(yarn cache dir)" | ||
|
||
- uses: actions/cache@v1 | ||
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | ||
with: | ||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | ||
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | ||
restore-keys: | | ||
${{ runner.os }}-yarn- | ||
|
||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
|
||
- name: Install Packages | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
env: | ||
CI: true | ||
|
||
- name: Test | ||
run: yarn run test | ||
env: | ||
CI: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- v*.*.* | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js 12.x to publish to npmjs.org | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- name: Install Packages | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: Build | ||
run: yarn build | ||
env: | ||
CI: true | ||
|
||
- name: Test | ||
run: yarn run test | ||
env: | ||
CI: true | ||
|
||
- name: Generate Release Body | ||
run: npx extract-changelog-release > RELEASE_BODY.md | ||
|
||
- name: Publish to NPM | ||
run: yarn publish --non-interactive | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
bodyFile: "RELEASE_BODY.md" | ||
token: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
require: blanket,should,spec | ||
require: blanket,should,spec,"ts-node/register" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import nhp from '../dist/index.js' | ||
|
||
export const CommentNode = nhp.CommentNode; | ||
export const HTMLElement = nhp.HTMLElement; | ||
export const parse = nhp.parse; | ||
export const valid = nhp.valid; | ||
export const Node = nhp.Node; | ||
export const TextNode = nhp.TextNode; | ||
export const NodeType = nhp.NodeType; | ||
|
||
export default nhp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"type": "module" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why remove the
npm run build
prepare script?this is required for "install from git" (#125),
cd test && yarn install
is notfixed in #253