Skip to content

Commit 2f45985

Browse files
committed
Modernize project structure
BREAKING CHANGE: The project now exports an ECMAScript module by default, albeit with an UMD fallback, ships with types, the dist/ directory no longer exists in version control, and Closure Compiler externs have been removed.
1 parent 7e2e93a commit 2f45985

Some content is hidden

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

48 files changed

+3046
-3519
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
github: dcodeIO

.github/workflows/publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Publish
2+
on:
3+
workflow_dispatch:
4+
jobs:
5+
publish:
6+
name: Publish
7+
if: github.repository == 'dcodeIO/bcrypt.js'
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v4
11+
with:
12+
ref: master
13+
- uses: actions/setup-node@v4
14+
with:
15+
node-version: current
16+
- name: Install dependencies
17+
run: npm ci
18+
- name: Build
19+
run: npm run build
20+
- name: Run tests
21+
run: npm test
22+
- name: Publish
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
26+
run: |
27+
VERSION=$(npx aspublish --version)
28+
if [ -z "$VERSION" ]; then
29+
echo "Changes do not trigger a release"
30+
else
31+
echo "Publishing new version: $VERSION"
32+
npx aspublish
33+
fi

.github/workflows/test.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
workflow_dispatch:
8+
jobs:
9+
test:
10+
name: Test
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
node_version: ["current", "lts_latest"]
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version: ${{ matrix.node_version }}
20+
- name: Install dependencies
21+
run: npm ci --no-audit
22+
- name: Build
23+
run: npm run build
24+
- name: Run tests
25+
run: npm test

.gitignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
node_modules/
2-
npm-debug.log
3-
debug.log
4-
doco/
2+
npm-debug.*
3+
umd/index.js

.npmignore

Lines changed: 0 additions & 7 deletions
This file was deleted.

.travis.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.vscode/settings.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

LICENSE

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ bcrypt.js
22
---------
33
Copyright (c) 2012 Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
44
Copyright (c) 2012 Shane Girish <shaneGirish@gmail.com>
5-
Copyright (c) 2014 Daniel Wirtz <dcode@dcode.io>
6-
5+
Copyright (c) 2025 Daniel Wirtz <dcode@dcode.io>
6+
77
Redistribution and use in source and binary forms, with or without
88
modification, are permitted provided that the following conditions
99
are met:
@@ -25,26 +25,3 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
2525
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
2626
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
2727
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28-
29-
isaac.js
30-
--------
31-
Copyright (c) 2012 Yves-Marie K. Rinquin
32-
33-
Permission is hereby granted, free of charge, to any person obtaining
34-
a copy of this software and associated documentation files (the
35-
"Software"), to deal in the Software without restriction, including
36-
without limitation the rights to use, copy, modify, merge, publish,
37-
distribute, sublicense, and/or sell copies of the Software, and to
38-
permit persons to whom the Software is furnished to do so, subject to
39-
the following conditions:
40-
41-
The above copyright notice and this permission notice shall be
42-
included in all copies or substantial portions of the Software.
43-
44-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
45-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
46-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
47-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
48-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
49-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
50-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0 commit comments

Comments
 (0)