@parse/sqs-mq-adapter 1.3.8 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,14 @@
1
+ # Dependabot dependency updates
2
+ # Docs: https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
3
+
4
+ version: 2
5
+ updates:
6
+ - package-ecosystem: "npm"
7
+ # Location of package-lock.json
8
+ directory: "/"
9
+ # Check daily for updates
10
+ schedule:
11
+ interval: "daily"
12
+ commit-message:
13
+ # Set commit message prefix
14
+ prefix: "refactor"
@@ -7,28 +7,43 @@ on:
7
7
  branches:
8
8
  - '**'
9
9
  jobs:
10
+ check-lint:
11
+ name: Lint
12
+ timeout-minutes: 5
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - uses: actions/setup-node@v4
17
+ with:
18
+ node-version: 22
19
+ cache: npm
20
+ - run: npm ci
21
+ - run: npm run lint
10
22
  test:
23
+ name: Node ${{ matrix.node }}
11
24
  runs-on: ubuntu-latest
12
25
  strategy:
13
26
  matrix:
14
- node: [ '12', '14', '15', '16', '17', '18' ]
27
+ node: [ '18', '20', '22' ]
15
28
  timeout-minutes: 30
16
- env:
17
- COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
18
- COVERAGE_OPTION: ./node_modules/.bin/nyc
19
29
  steps:
20
- - uses: actions/checkout@v2
21
- - name: Use Node.js
22
- uses: actions/setup-node@v2
30
+ - uses: actions/checkout@v4
31
+ - uses: actions/setup-node@v4
23
32
  with:
24
33
  node-version: ${{ matrix.node }}
25
- - name: Cache Node.js modules
26
- uses: actions/cache@v2
27
- with:
28
- path: ~/.npm
29
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
30
- restore-keys: |
31
- ${{ runner.os }}-node-
32
- - run: npm ci
34
+ cache: npm
35
+ - name: Install dependencies
36
+ run: npm ci
33
37
  - run: npm run coverage
34
- - run: bash <(curl -s https://codecov.io/bash)
38
+ env:
39
+ CI: true
40
+ - name: Upload code coverage
41
+ uses: codecov/codecov-action@v4
42
+ with:
43
+ fail_ci_if_error: false
44
+ token: ${{ secrets.CODECOV_TOKEN }}
45
+ env:
46
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
47
+ concurrency:
48
+ group: ${{ github.workflow }}-${{ github.ref }}
49
+ cancel-in-progress: true
@@ -1,26 +1,20 @@
1
1
  name: release-automated
2
2
  on:
3
3
  push:
4
- branches: [ main, master, release, alpha, beta ]
4
+ branches: [ main, master, release, alpha, beta, next-major ]
5
5
  jobs:
6
6
  release:
7
7
  runs-on: ubuntu-latest
8
8
  steps:
9
9
  - name: Checkout repository
10
- uses: actions/checkout@v2
10
+ uses: actions/checkout@v4
11
11
  with:
12
12
  persist-credentials: false
13
13
  - name: Setup Node
14
- uses: actions/setup-node@v2
14
+ uses: actions/setup-node@v4
15
15
  with:
16
- node-version: 18
17
- - name: Cache Node.js modules
18
- uses: actions/cache@v2
19
- with:
20
- path: ~/.npm
21
- key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
22
- restore-keys: |
23
- ${{ runner.os }}-node-
16
+ node-version: 22
17
+ cache: 'npm'
24
18
  - name: Install dependencies
25
19
  run: npm ci
26
20
  - name: Run semantic-release
@@ -28,4 +22,5 @@ jobs:
28
22
  env:
29
23
  GH_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
30
24
  GITHUB_TOKEN: ${{ secrets.RELEASE_GITHUB_TOKEN }}
25
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
31
26
  NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,3 +1,22 @@
1
+ # [2.0.0](https://github.com/parse-community/parse-server-sqs-mq-adapter/compare/1.4.0...2.0.0) (2025-07-05)
2
+
3
+
4
+ ### Features
5
+
6
+ * Remove support for Node 12, 14, 15, 16, 17 ([#158](https://github.com/parse-community/parse-server-sqs-mq-adapter/issues/158)) ([26c114e](https://github.com/parse-community/parse-server-sqs-mq-adapter/commit/26c114e77e4d6e64085f513c54899e44fc5c3a61))
7
+
8
+
9
+ ### BREAKING CHANGES
10
+
11
+ * Removes support for outdated Node versions 12, 14, 15, 16, 17. ([26c114e](26c114e))
12
+
13
+ # [1.4.0](https://github.com/parse-community/parse-server-sqs-mq-adapter/compare/1.3.8...1.4.0) (2024-09-26)
14
+
15
+
16
+ ### Features
17
+
18
+ * Add support for Node 20 and 22 ([#101](https://github.com/parse-community/parse-server-sqs-mq-adapter/issues/101)) ([d19b0c2](https://github.com/parse-community/parse-server-sqs-mq-adapter/commit/d19b0c2e12d0a5bff48524f8aee1c2d2a232baa9))
19
+
1
20
  ## [1.3.8](https://github.com/parse-server-modules/parse-server-sqs-mq-adapter/compare/1.3.7...1.3.8) (2023-10-18)
2
21
 
3
22
 
@@ -0,0 +1,41 @@
1
+ import js from '@eslint/js';
2
+ import globals from 'globals';
3
+
4
+ export default [
5
+ js.configs.recommended,
6
+ {
7
+ files: ['**/*.js'],
8
+ ignores: ['node_modules/**'],
9
+ languageOptions: {
10
+ ecmaVersion: 6,
11
+ sourceType: 'module',
12
+ globals: {
13
+ ...globals.node,
14
+ Parse: 'readonly'
15
+ }
16
+ },
17
+ rules: {
18
+ indent: ['error', 2, { SwitchCase: 1 }],
19
+ 'linebreak-style': ['error', 'unix'],
20
+ 'no-trailing-spaces': 2,
21
+ 'eol-last': 2,
22
+ 'space-in-parens': ['error', 'never'],
23
+ 'no-multiple-empty-lines': 1,
24
+ 'prefer-const': 'error',
25
+ 'space-infix-ops': 'error',
26
+ 'no-useless-escape': 'off',
27
+ 'require-atomic-updates': 'off',
28
+ 'object-curly-spacing': ['error', 'always']
29
+ }
30
+ },
31
+ {
32
+ files: ['spec/**/*.js'],
33
+ languageOptions: {
34
+ globals: {
35
+ ...globals.node,
36
+ ...globals.jasmine,
37
+ Parse: 'readonly'
38
+ }
39
+ }
40
+ }
41
+ ];
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@parse/sqs-mq-adapter",
3
- "version": "1.3.8",
3
+ "version": "2.0.0",
4
4
  "description": "Spread work queue across cluster of parse servers using SQS",
5
5
  "main": "index.js",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "git+https://github.com/parse-server-modules/parse-server-sqs-mq-adapter.git"
8
+ "url": "git+https://github.com/parse-community/parse-server-sqs-mq-adapter.git"
9
9
  },
10
10
  "author": "Parse Platform",
11
11
  "license": "Apache-2.0",
@@ -17,25 +17,26 @@
17
17
  "parse-server": "*"
18
18
  },
19
19
  "devDependencies": {
20
- "@semantic-release/changelog": "5.0.1",
21
- "@semantic-release/commit-analyzer": "8.0.1",
22
- "@semantic-release/git": "9.0.0",
23
- "@semantic-release/github": "7.2.3",
24
- "@semantic-release/npm": "7.1.3",
25
- "@semantic-release/release-notes-generator": "9.0.3",
26
- "eslint": "8.29.0",
27
- "eslint-config-airbnb-base": "12.1.0",
28
- "eslint-plugin-import": "2.26.0",
20
+ "@semantic-release/changelog": "6.0.3",
21
+ "@semantic-release/commit-analyzer": "13.0.1",
22
+ "@semantic-release/git": "10.0.1",
23
+ "@semantic-release/github": "11.0.3",
24
+ "@semantic-release/npm": "12.0.1",
25
+ "@semantic-release/release-notes-generator": "14.0.3",
26
+ "eslint": "9.30.1",
29
27
  "jasmine": "2.99.0",
30
28
  "nyc": "15.1.0",
31
- "parse-server": "5.5.5",
32
- "semantic-release": "21.0.1",
29
+ "parse-server": "5.5.6",
30
+ "semantic-release": "24.2.5",
33
31
  "sinon": "14.0.0"
34
32
  },
35
33
  "scripts": {
36
- "lint": "eslint ./index.js ./lib/** ./spec/**",
37
- "pretest": "npm run lint",
34
+ "lint": "eslint --cache ./index.js ./lib/** ./spec/**/*.js",
35
+ "lint-fix": "eslint --cache --fix ./index.js ./lib/** ./spec/**/*.js",
38
36
  "test": "jasmine",
39
37
  "coverage": "nyc jasmine"
38
+ },
39
+ "engines": {
40
+ "node": ">=18.20.4 <19.0.0 || >=20.18.0 <21.0.0 || >=22.12.0 <23.0.0"
40
41
  }
41
42
  }
package/release.config.js CHANGED
@@ -2,8 +2,14 @@
2
2
  * Semantic Release Config
3
3
  */
4
4
 
5
- const fs = require('fs').promises;
6
- const path = require('path');
5
+ // For CommonJS use:
6
+ const { readFile } = require('fs').promises;
7
+ const { resolve } = require('path');
8
+
9
+ // For ES6 modules use:
10
+ // import { readFile } from 'fs/promises';
11
+ // import { resolve, dirname } from 'path';
12
+ // import { fileURLToPath } from 'url';
7
13
 
8
14
  // Get env vars
9
15
  const ref = process.env.GITHUB_REF;
@@ -24,9 +30,9 @@ const templates = {
24
30
  async function config() {
25
31
 
26
32
  // Get branch
27
- const branch = ref.split('/').pop();
33
+ const branch = ref?.split('/')?.pop()?.split('-')[0] || '(current branch could not be determined)';
28
34
  console.log(`Running on branch: ${branch}`);
29
-
35
+
30
36
  // Set changelog file
31
37
  //const changelogFile = `./changelogs/CHANGELOG_${branch}.md`;
32
38
  const changelogFile = `./CHANGELOG.md`;
@@ -38,9 +44,11 @@ async function config() {
38
44
  const config = {
39
45
  branches: [
40
46
  'main',
41
- // { name: 'alpha', prerelease: true },
42
- // { name: 'beta', prerelease: true },
43
- // 'next-major',
47
+ 'master',
48
+ 'release',
49
+ { name: 'alpha', prerelease: true },
50
+ { name: 'beta', prerelease: true },
51
+ 'next-major',
44
52
  // Long-Term-Support branches
45
53
  // { name: 'release-1', range: '1.x.x', channel: '1.x' },
46
54
  // { name: 'release-2', range: '2.x.x', channel: '2.x' },
@@ -59,13 +67,13 @@ async function config() {
59
67
  { scope: 'no-release', release: false },
60
68
  ],
61
69
  parserOpts: {
62
- noteKeywords: [ 'BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING' ],
70
+ noteKeywords: [ 'BREAKING CHANGE' ],
63
71
  },
64
72
  }],
65
73
  ['@semantic-release/release-notes-generator', {
66
74
  preset: 'angular',
67
75
  parserOpts: {
68
- noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING']
76
+ noteKeywords: [ 'BREAKING CHANGE' ]
69
77
  },
70
78
  writerOpts: {
71
79
  commitsSort: ['subject', 'scope'],
@@ -87,7 +95,7 @@ async function config() {
87
95
  ['@semantic-release/github', {
88
96
  successComment: getReleaseComment(),
89
97
  labels: ['type:ci'],
90
- releasedLabels: ['state:released<%= nextRelease.channel ? `-${nextRelease.channel}` : "" %>']
98
+ releasedLabels: ['state:released<%= nextRelease.channel ? `-\${nextRelease.channel}` : "" %>']
91
99
  }],
92
100
  ],
93
101
  };
@@ -97,19 +105,24 @@ async function config() {
97
105
 
98
106
  async function loadTemplates() {
99
107
  for (const template of Object.keys(templates)) {
100
- const text = await readFile(path.resolve(__dirname, resourcePath, templates[template].file));
108
+ // For ES6 modules use:
109
+ // const fileUrl = import.meta.url;
110
+ // const __dirname = dirname(fileURLToPath(fileUrl));
111
+
112
+ const filePath = resolve(__dirname, resourcePath, templates[template].file);
113
+ const text = await readFile(filePath, 'utf-8');
101
114
  templates[template].text = text;
102
115
  }
103
116
  }
104
117
 
105
- async function readFile(filePath) {
106
- return await fs.readFile(filePath, 'utf-8');
107
- }
108
-
109
118
  function getReleaseComment() {
110
119
  const url = repositoryUrl + '/releases/tag/${nextRelease.gitTag}';
111
120
  let comment = '🎉 This change has been released in version [${nextRelease.version}](' + url + ')';
112
121
  return comment;
113
122
  }
114
123
 
124
+ // For CommonJS use:
115
125
  module.exports = config();
126
+
127
+ // For ES6 modules use:
128
+ // export default config();
package/.eslintrc DELETED
@@ -1,9 +0,0 @@
1
- {
2
- "extends": "airbnb-base",
3
- "env": {
4
- "node": true,
5
- "jasmine": true
6
- },
7
- "rules": {
8
- }
9
- }
package/spec/.eslintrc DELETED
@@ -1,5 +0,0 @@
1
- {
2
- "rules": {
3
- "no-console": 1
4
- }
5
- }
@@ -1,11 +0,0 @@
1
- {
2
- "spec_dir": "spec",
3
- "spec_files": [
4
- "**/*[sS]pec.js"
5
- ],
6
- "helpers": [
7
- "helpers/**/*.js"
8
- ],
9
- "stopSpecOnExpectationFailure": false,
10
- "random": false
11
- }