apostrophe 2.227.4 → 2.227.6

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,43 @@
1
+ name: Tests
2
+
3
+ # Controls when the action will run.
4
+ on:
5
+ push:
6
+ branches: ["main"]
7
+ pull_request:
8
+ branches: ["*"]
9
+
10
+ # Allows you to run this workflow manually from the Actions tab
11
+ workflow_dispatch:
12
+
13
+ # A workflow run is made up of one or more jobs that can run sequentially or in parallel
14
+ jobs:
15
+ # This workflow contains a single job called "build"
16
+ build:
17
+ # The type of runner that the job will run on
18
+ runs-on: ubuntu-latest
19
+ strategy:
20
+ matrix:
21
+ node-version: [18, 20]
22
+ mongodb-version: [4.4, 5.0, 6.0, 7.0]
23
+
24
+ # Steps represent a sequence of tasks that will be executed as part of the job
25
+ steps:
26
+ - name: Git checkout
27
+ uses: actions/checkout@v2
28
+
29
+ - name: Use Node.js ${{ matrix.node-version }}
30
+ uses: actions/setup-node@v1
31
+ with:
32
+ node-version: ${{ matrix.node-version }}
33
+
34
+ - name: Start MongoDB
35
+ uses: supercharge/mongodb-github-action@1.3.0
36
+ with:
37
+ mongodb-version: ${{ matrix.mongodb-version }}
38
+
39
+ - run: npm install
40
+
41
+ - run: npm test
42
+ env:
43
+ CI: true
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.227.6 (2024-04-29)
4
+
5
+ ### Changes
6
+
7
+ * Replace `autocomplete="off"`, which modern browsers ignore, with `autocomplete="new-password"`
8
+ so that (1) admin user's password is not stuffed into password fields when editing an entirely
9
+ different user and (2) the admin user's username is not stuffed into the text field preceding
10
+ it. Browser autocomplete is quite aggressive in 2024.
11
+
12
+ ## 2.227.5 (2024-04-18)
13
+
14
+ ### Changes
15
+
16
+ * Update `emulate-mongo-2-driver`dependency to keep supporting `mongodb@2.x` queries while using `mongodb@6.x`.
17
+
3
18
  ## 2.227.4 2023-09-27
4
19
 
5
20
  ### Fixes
@@ -87,7 +87,7 @@
87
87
  {%- endmacro -%}
88
88
 
89
89
  {%- macro passwordBody(field, options) -%}
90
- <input id="{{ options.id }}" class="apos-field-input apos-field-input-text{% if options.fieldClasses %} {{ options.fieldClasses }}{% endif %}" name="{{ field.name }}" autocomplete="off" type="password"{% if field.readOnly %} disabled{% endif %}{% if options.fieldAttributes %} {{ options.fieldAttributes }}{% endif %}>
90
+ <input id="{{ options.id }}" class="apos-field-input apos-field-input-text{% if options.fieldClasses %} {{ options.fieldClasses }}{% endif %}" name="{{ field.name }}" autocomplete="new-password" type="password"{% if field.readOnly %} disabled{% endif %}{% if options.fieldAttributes %} {{ options.fieldAttributes }}{% endif %}>
91
91
  {%- endmacro -%}
92
92
 
93
93
  {%- macro tags(field) -%}
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "apostrophe",
3
- "version": "2.227.4",
3
+ "version": "2.227.6",
4
4
  "description": "The Apostrophe Content Management System.",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
- "test": "npm run build-test-package-json && npm run lint && npm run audit && mocha --timeout 50000",
7
+ "test": "npm run build-test-package-json && npm run lint && mocha --timeout 50000",
8
8
  "audit": "npm audit --production",
9
9
  "lint": "eslint .",
10
10
  "build-test-package-json": "node ./test-lib/build-test-package-json.js"
@@ -39,7 +39,7 @@
39
39
  "credentials": "^3.0.2",
40
40
  "cuid": "^1.3.8",
41
41
  "diff": "^4.0.1",
42
- "emulate-mongo-2-driver": "^1.2.3",
42
+ "emulate-mongo-2-driver": "^1.3.3",
43
43
  "express": "^4.17.1",
44
44
  "express-session": "^1.17.0",
45
45
  "glob": "^5.0.15",
@@ -13,6 +13,12 @@ describe('APOS_BASE_URL environment variable', function() {
13
13
  apos = require('../index.js')({
14
14
  root: module,
15
15
  shortName: 'test',
16
+ modules: {
17
+ 'apostrophe-express': {
18
+ secret: 'xxx',
19
+ port: 7900
20
+ }
21
+ },
16
22
  afterInit: function(callback) {
17
23
  // In tests this will be the name of the test file,
18
24
  // so override that in order to get apostrophe to