Skip to content

Commit

Permalink
Revert "Merge in upstream v1.3.5 (#78)" (#82)
Browse files Browse the repository at this point in the history
This reverts commit 96334e0.
  • Loading branch information
varney authored Apr 9, 2024
1 parent 96334e0 commit bead596
Show file tree
Hide file tree
Showing 7 changed files with 2,208 additions and 2,330 deletions.
74 changes: 0 additions & 74 deletions .github/workflows/codeql.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version: [16.x,18.x]

steps:
- uses: actions/checkout@v2
Expand All @@ -24,13 +24,14 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci
run: yarn install --frozen-lockfile
env:
CI: true
NODE_ENV: "test"

- name: Run Tests
run: npm test
shell: 'script -q -e -c "bash {0}"'
run: yarn test
env:
NODE_ENV: "test"
CI: true
2 changes: 1 addition & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
test
logo
.editorconfig
.github
.travis.yml
lint
scripts
30 changes: 15 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,48 @@ lint:

.PHONY: test
test:
npx mocha test/apple.js -R spec -b --timeout=5000 --path=false
npx mocha test/google.js -R spec -b --path=false --pk=false
npx mocha test/amazon.js -R spec -b --timeout=5000 --sharedKey=false --path=false
npx mocha test/windows.js -R spec -b --timeout=5000 --path=false
#npx mocha test/facebook.js -R spec -b --timeout=5000 --appAccessToken=false --path=false
./node_modules/mocha/bin/_mocha test/apple.js -R spec -b --timeout=5000 --path=false
./node_modules/mocha/bin/_mocha test/google.js -R spec -b --path=false --pk=false
./node_modules/mocha/bin/_mocha test/amazon.js -R spec -b --timeout=5000 --sharedKey=false --path=false
./node_modules/mocha/bin/_mocha test/windows.js -R spec -b --timeout=5000 --path=false
#./node_modules/mocha/bin/_mocha test/facebook.js -R spec -b --timeout=5000 --appAccessToken=false --path=false

.PHONY: aptest
aptest:
npx mocha test/apple.js -R spec -b --timeout=5000 --path=false
./node_modules/mocha/bin/_mocha test/apple.js -R spec -b --timeout=5000 --path=false

.PHONY: gotest
gotest:
npx mocha test/google.js -R spec -b --path=false --pk=false
./node_modules/mocha/bin/_mocha test/google.js -R spec -b --path=false --pk=false

.PHONY: amtest
amtest:
npx mocha test/amazon.js -R spec -b --timeout=5000 --sharedKey=false --path=false
./node_modules/mocha/bin/_mocha test/amazon.js -R spec -b --timeout=5000 --sharedKey=false --path=false

.PHONY: witest
witest:
npx mocha test/windows.js -R spec -b --timeout=5000 --path=false
./node_modules/mocha/bin/_mocha test/windows.js -R spec -b --timeout=5000 --path=false

.PHONY: fatest
witest:
npx mocha test/facebook.js -R spec -b --timeout=5000 --appAccessToken=false --path=false
./node_modules/mocha/bin/_mocha test/facebook.js -R spec -b --timeout=5000 --appAccessToken=false --path=false

.PHONY: test-apple
test-apple:
npx mocha test/apple.js -R spec -b --timeout=5000 --path=$(path)
./node_modules/mocha/bin/_mocha test/apple.js -R spec -b --timeout=5000 --path=$(path)

.PHONY: test-google
test-google:
npx mocha test/google.js -R spec -b --path=$(path) --pk=$(pk)
./node_modules/mocha/bin/_mocha test/google.js -R spec -b --path=$(path) --pk=$(pk)

.PHONY: test-windows
test-windows:
npx mocha test/windows.js -R spec -b --timeout=5000 --path=$(path)
./node_modules/mocha/bin/_mocha test/windows.js -R spec -b --timeout=5000 --path=$(path)

.PHONY: test-amazon
test-amazon:
npx mocha test/amazon.js -R spec -b --timeout=5000 --sharedKey=$(sharedKey) --path=$(path)
./node_modules/mocha/bin/_mocha test/amazon.js -R spec -b --timeout=5000 --sharedKey=$(sharedKey) --path=$(path)

.PHONY: test-facebook
test-facebook:
npx mocha test/facebook.js -R spec -b --timeout=5000 --appAccessToken=$(appAccessToken) --path=$(path)
./node_modules/mocha/bin/_mocha test/facebook.js -R spec -b --timeout=5000 --appAccessToken=$(appAccessToken) --path=$(path)
2 changes: 1 addition & 1 deletion lib/amazon2.js
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ module.exports.validatePurchase = function (dSecret, receipt, cb) {
};

function _isSandbox(path) {
return !path.startsWith(`${VALIDATION_HOST}/`);
return !path.startsWith(VALIDATION_HOST + '/');
}

module.exports.getPurchaseData = function (purchase, options) {
Expand Down
Loading

0 comments on commit bead596

Please sign in to comment.