Skip to content

Commit 4fe44a2

Browse files
authored
Update Packages (#156)
* Updating mocha package * Updating spacing, updating eslint, removing documentation, fixing lint issues * Updating * Use mocha globals * Fixing ESlint * Fixing ESlint * Updating Docs * Updating CodeQL * Updating style * Updating checkout action --------- Co-authored-by: Sean Thomas Burke <[email protected]>
1 parent 5c66722 commit 4fe44a2

24 files changed

+3883
-9073
lines changed

Diff for: .eslintrc.js

-13
This file was deleted.

Diff for: .github/workflows/codeql-analysis.yml

+29-29
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,14 @@
1010
# supported CodeQL languages.
1111
# ******** NOTE ********
1212

13-
name: "CodeQL"
13+
name: 'CodeQL'
1414

1515
on:
1616
push:
17-
branches: [ master ]
17+
branches: [master]
1818
pull_request:
1919
# The branches below must be a subset of the branches above
20-
branches: [ master ]
20+
branches: [master]
2121
schedule:
2222
- cron: '34 0 * * 1'
2323

@@ -29,40 +29,40 @@ jobs:
2929
strategy:
3030
fail-fast: false
3131
matrix:
32-
language: [ 'javascript' ]
32+
language: ['javascript']
3333
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
3434
# Learn more...
3535
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
3636

3737
steps:
38-
- name: Checkout repository
39-
uses: actions/checkout@v2
38+
- name: Checkout repository
39+
uses: actions/checkout@v4
4040

41-
# Initializes the CodeQL tools for scanning.
42-
- name: Initialize CodeQL
43-
uses: github/codeql-action/init@v1
44-
with:
45-
languages: ${{ matrix.language }}
46-
# If you wish to specify custom queries, you can do so here or in a config file.
47-
# By default, queries listed here will override any specified in a config file.
48-
# Prefix the list here with "+" to use these queries and those in the config file.
49-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
41+
# Initializes the CodeQL tools for scanning.
42+
- name: Initialize CodeQL
43+
uses: github/codeql-action/init@v2
44+
with:
45+
languages: ${{ matrix.language }}
46+
# If you wish to specify custom queries, you can do so here or in a config file.
47+
# By default, queries listed here will override any specified in a config file.
48+
# Prefix the list here with "+" to use these queries and those in the config file.
49+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
5050

51-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
52-
# If this step fails, then you should remove it and run the build manually (see below)
53-
- name: Autobuild
54-
uses: github/codeql-action/autobuild@v1
51+
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
52+
# If this step fails, then you should remove it and run the build manually (see below)
53+
- name: Autobuild
54+
uses: github/codeql-action/autobuild@v2
5555

56-
# ℹ️ Command-line programs to run using the OS shell.
57-
# 📚 https://git.io/JvXDl
56+
# ℹ️ Command-line programs to run using the OS shell.
57+
# 📚 https://git.io/JvXDl
5858

59-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
60-
# and modify them (or add more) to build your code if your project
61-
# uses a compiled language
59+
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
60+
# and modify them (or add more) to build your code if your project
61+
# uses a compiled language
6262

63-
#- run: |
64-
# make bootstrap
65-
# make release
63+
#- run: |
64+
# make bootstrap
65+
# make release
6666

67-
- name: Perform CodeQL Analysis
68-
uses: github/codeql-action/analyze@v1
67+
- name: Perform CodeQL Analysis
68+
uses: github/codeql-action/analyze@v2

Diff for: .github/workflows/test.yml

+10-11
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,24 @@ name: test
55

66
on:
77
push:
8-
branches: [ master ]
8+
branches: [master]
99
pull_request:
10-
branches: [ master ]
10+
branches: [master]
1111

1212
jobs:
1313
build:
14-
1514
runs-on: ubuntu-latest
1615

1716
strategy:
1817
matrix:
1918
node-version: [16.x, 18.x, 20.x]
2019

2120
steps:
22-
- uses: actions/checkout@v4
23-
- name: Use Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v4
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
- run: npm ci
28-
- run: npm run build --if-present
29-
- run: npm test
21+
- uses: actions/checkout@v4
22+
- name: Use Node.js ${{ matrix.node-version }}
23+
uses: actions/setup-node@v4
24+
with:
25+
node-version: ${{ matrix.node-version }}
26+
- run: npm ci
27+
- run: npm run build --if-present
28+
- run: npm test

Diff for: .github/workflows/version-bump.yml

+25-25
Original file line numberDiff line numberDiff line change
@@ -15,32 +15,32 @@ jobs:
1515
outputs:
1616
nodeVersion: ${{ steps.bump_version.outputs.version }}
1717
steps:
18-
- uses: actions/checkout@v4
19-
- name: Use Node.js 20
20-
uses: actions/setup-node@v4
21-
with:
22-
node-version: '20'
23-
- name: bump version
24-
id: bump_version
25-
run: |
26-
git config --local user.email "[email protected]"
27-
git config --local user.name "GitHub Action"
28-
echo "::set-output name=version::$(echo $(node -p "require('./package.json').version.trim()"))"
29-
npm version patch
30-
git push
18+
- uses: actions/checkout@v4
19+
- name: Use Node.js 20
20+
uses: actions/setup-node@v4
21+
with:
22+
node-version: '20'
23+
- name: bump version
24+
id: bump_version
25+
run: |
26+
git config --local user.email "[email protected]"
27+
git config --local user.name "GitHub Action"
28+
echo "::set-output name=version::$(echo $(node -p "require('./package.json').version.trim()"))"
29+
npm version patch
30+
git push
3131
release:
3232
runs-on: ubuntu-latest
3333
needs: build
3434
steps:
35-
- name: draft release
36-
id: draft_release
37-
uses: actions/create-release@v1
38-
env:
39-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
40-
with:
41-
tag_name: ${{ needs.build.outputs.nodeVersion }}
42-
release_name: Release ${{ needs.build.outputs.nodeVersion }}
43-
body: |
44-
Releasing version ${{ needs.build.outputs.nodeVersion }} to NPM
45-
draft: true
46-
prerelease: false
35+
- name: draft release
36+
id: draft_release
37+
uses: actions/create-release@v1
38+
env:
39+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
40+
with:
41+
tag_name: ${{ needs.build.outputs.nodeVersion }}
42+
release_name: Release ${{ needs.build.outputs.nodeVersion }}
43+
body: |
44+
Releasing version ${{ needs.build.outputs.nodeVersion }} to NPM
45+
draft: true
46+
prerelease: false

Diff for: .prettierignore

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
node_modules
2+
dist
3+
build
4+
coverage
5+
package-lock.json

Diff for: .prettierrc.js

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
module.exports = {
2+
semi: true,
3+
trailingComma: 'es5',
4+
singleQuote: true,
5+
printWidth: 80,
6+
tabWidth: 2,
7+
endOfLine: 'lf',
8+
};

Diff for: .travis.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
language: node_js
22
node_js:
3-
- "14.15.0"
4-
- "12.13.0"
5-
- "10"
3+
- '14.15.0'
4+
- '12.13.0'
5+
- '10'
66
after_success:
77
- bash <(curl -s https://codecov.io/bash)

Diff for: CONTRIBUTING.md

+11-3
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
## Contributing
22

3-
The files to modify are under the `src` folder. `src/assets` are JavaScript files written in es6 that get compiled
3+
The files to modify are under the `src` folder. `src/assets` are JavaScript files written in JavaScript that get compiled
44
through babel into `lib/sitemapper.js`.
55

66
### Build
77

88
To build the `lib` directory with the compiled assets use this command
9+
910
```bash
1011
npm run build
1112
```
12-
This uses [Babel](http://babeljs.io/) to compile the files. Make sure to run `npm run build` before submitting a pull request.
13+
14+
This uses [Babel](http://babeljs.io/) to compile the files. The prepack step will run `npm run build` when submitting a pull request.
1315

1416
```bash
1517
# Run examples/index.js
@@ -19,16 +21,19 @@ npm start
1921
### Testing
2022

2123
Make sure all tests pass using
24+
2225
```bash
2326
npm test
2427
```
28+
2529
This will run [Mocha](https://mochajs.org/) for testing and [ESLint](http://eslint.org/) for style guides
2630
The tests run will be `mocha` and `eslint`.
2731
Make sure your style follows the style guide in `.eslintrc`
2832

2933
### Style Guide
3034

3135
To see if your code passes the linter use
36+
3237
```bash
3338
npm run lint
3439
```
@@ -53,7 +58,10 @@ src/
5358
assets/
5459
sitemapper.js
5560
examples/
61+
google.js
5662
index.js
5763
tests/
5864
test.js
59-
````
65+
test.ts.ts
66+
tsconfig.json
67+
```

0 commit comments

Comments
 (0)