diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 1eafe33..0000000 --- a/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -test/mock diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index f10341d..57d2a41 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -4,7 +4,7 @@ To maintain a high standard of quality in our releases, before merging every pull request we ask that you've completed the following: -- [ ] Forked the repo and created your branch from `master` +- [ ] Forked the repo and created your branch from `main` - [ ] Made sure tests pass (run `npm it` from the repo root) - [ ] Expanded test coverage related to your changes: - [ ] Added and/or updated unit tests (if appropriate) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 30ce786..bc16cf0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -21,10 +21,10 @@ jobs: # Go steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} @@ -40,7 +40,14 @@ jobs: - name: Install run: npm install + - name: Test (Node.js <= 16.x) + if: matrix.node-version <= '16.x' + run: npm run test:nolint + env: + CI: true + - name: Test + if: matrix.node-version > '16.x' run: npm test env: CI: true @@ -67,10 +74,10 @@ jobs: # Go steps: - name: Check out repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set up Node.js - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: lts/* registry-url: https://registry.npmjs.org/ diff --git a/changelog.md b/changelog.md index 81052b4..fa2ae39 100644 --- a/changelog.md +++ b/changelog.md @@ -2,6 +2,15 @@ --- +## [4.0.5] 2024-04-29 + +### Changed + +- Updated dependencies +- Updated `package.json` `engines.node` property to reflect changes from v4 + +--- + ## [4.0.3 - 4.0.4] 2024-03-25 ### Changed diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..d0d57c8 --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,10 @@ +const arc = require('@architect/eslint-config') + +module.exports = [ + ...arc, + { + ignores: [ + 'test/mock', + ], + }, +] diff --git a/package.json b/package.json index b0c6cb0..70f6cd5 100644 --- a/package.json +++ b/package.json @@ -9,6 +9,7 @@ "scripts": { "lint": "eslint . --fix", "test": "npm run lint && npm run coverage", + "test:nolint": "npm run coverage", "test:unit": "cross-env tape 'test/unit/**/*-test.js' | tap-arc", "coverage": "cross-env nyc --reporter=lcov --reporter=text npm run test:unit", "test:integration": "cross-env tape test/integration/**/*-test.js | tap-arc", @@ -16,34 +17,31 @@ }, "license": "Apache-2.0", "engines": { - "node": ">=14" + "node": ">=16" }, "repository": { "type": "git", "url": "https://github.com/architect/destroy.git" }, "dependencies": { - "@architect/inventory": "~4.0.4", - "@architect/utils": "~4.0.4", - "@aws-lite/client": "^0.20.0", - "@aws-lite/cloudformation": "^0.0.4", + "@architect/inventory": "~4.0.5", + "@architect/utils": "~4.0.6", + "@aws-lite/client": "^0.21.1", + "@aws-lite/cloudformation": "^0.0.5", "@aws-lite/cloudwatch-logs": "^0.0.4", - "@aws-lite/s3": "^0.1.20", + "@aws-lite/s3": "^0.1.21", "@aws-lite/ssm": "^0.2.3", "minimist": "~1.2.8", "run-parallel": "~1.2.0", "run-waterfall": "~1.1.7" }, "devDependencies": { - "@architect/deploy": "~5.0.3", - "@architect/eslint-config": "^2.1.2", + "@architect/deploy": "~5.0.5", + "@architect/eslint-config": "^3.0.0", "cross-env": "~7.0.3", - "eslint": "~8.57.0", + "eslint": "~9.1.1", "nyc": "~15.1.0", "tap-arc": "~1.2.2", "tape": "~5.7.5" - }, - "eslintConfig": { - "extends": "@architect/eslint-config" } } diff --git a/src/_delete-bucket.js b/src/_delete-bucket.js index 5def209..f01eef1 100644 --- a/src/_delete-bucket.js +++ b/src/_delete-bucket.js @@ -59,6 +59,6 @@ module.exports = function deleteBucketContents ({ aws, bucket: Bucket }, callbac .catch(err => callback(err)) } else callback() - } + }, ], callback) } diff --git a/src/_ssm.js b/src/_ssm.js index 49f362e..96e8961 100644 --- a/src/_ssm.js +++ b/src/_ssm.js @@ -7,7 +7,7 @@ module.exports = { getDeployBucket: function getDeployBucket (aws, appname, callback) { aws.ssm.GetParameter({ Name: `/${appname}/deploy/bucket`, - WithDecryption: true + WithDecryption: true, }) .then(data => { let value = data?.Parameter?.Value ? data.Parameter.Value : null @@ -24,7 +24,7 @@ module.exports = { aws.ssm.GetParametersByPath({ Path: rootPath, Recursive: true, - paginate: true + paginate: true, }) .then(data => { if (data?.Parameters?.length) { @@ -63,5 +63,5 @@ module.exports = { deleteThings() } }) - } + }, } diff --git a/src/cli.js b/src/cli.js index 4a04edf..672deb1 100755 --- a/src/cli.js +++ b/src/cli.js @@ -35,7 +35,7 @@ async function main (opts = {}) { now: args.now, retries: args.timeout ? 15 : 999, stackname: args.name, - update + update, } update.status(`Destroying ${env} environment`) diff --git a/src/index.js b/src/index.js index 5c13a2d..eb4d119 100644 --- a/src/index.js +++ b/src/index.js @@ -234,7 +234,7 @@ module.exports = function destroy (params, callback) { }) } check() - } + }, ], callback)