apostrophe 3.58.0 → 3.58.1
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.
- package/CHANGELOG.md +16 -0
- package/DEVELOPMENT.md +0 -12
- package/modules/@apostrophecms/asset/index.js +0 -7
- package/modules/@apostrophecms/asset/lib/webpack/apos/webpack.config.js +1 -8
- package/modules/@apostrophecms/asset/lib/webpack/apos/webpack.vue.js +1 -1
- package/modules/@apostrophecms/asset/lib/webpack/src/webpack.config.js +1 -7
- package/modules/@apostrophecms/doc-type/index.js +2 -1
- package/package.json +3 -4
- package/test/pieces.js +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 3.58.1 (2023-10-18)
|
|
4
|
+
|
|
5
|
+
### Security
|
|
6
|
+
|
|
7
|
+
* Update `uploadfs` to guarantee users get a fix for a [potential security vulnerability in `sharp`](https://security.snyk.io/vuln/SNYK-JS-SHARP-5922108).
|
|
8
|
+
This was theoretically exploitable only by users with permission to upload media to Apostrophe
|
|
9
|
+
* Remove the webpack bundle analyzer feature, which had been nonfunctional for some time, to address a harmless npm audit warning
|
|
10
|
+
* Note: there is one remaining `npm audit` warning regarding `postcss`. This is not a true vulnerability because only developers
|
|
11
|
+
with access to the entire codebase can modify styles passed to `postcss` by Apostrophe, but we are working with upstream
|
|
12
|
+
developers to determine the best steps to clear the warning
|
|
13
|
+
|
|
14
|
+
### Fixes
|
|
15
|
+
|
|
16
|
+
* Automatically add `type` to the projection only if there are no exclusions in the projection. Needed to prevent `Cannot do
|
|
17
|
+
exclusion on field in inclusion projection` error.
|
|
18
|
+
|
|
3
19
|
## 3.58.0 (2023-10-12)
|
|
4
20
|
|
|
5
21
|
### Fixes
|
package/DEVELOPMENT.md
CHANGED
|
@@ -10,15 +10,3 @@ We generally aim to follow [Vue best practices](https://vuejs.org/v2/style-guide
|
|
|
10
10
|
### UI component styles
|
|
11
11
|
|
|
12
12
|
As a rule, all user interface components should have their styles scoped (using the `scoped` attribute). This helps us write simpler CSS selectors and avoide a certain amount of style "bleed" across components. Global styles, and styles for top level Vue apps (e.g., `TheAposNotifications`), should be in `.scss` files and imported into the import file: `/modules/@apostrophecms/ui/ui/apos/scss/imports.scss`.
|
|
13
|
-
|
|
14
|
-
## Analyzing bundle size
|
|
15
|
-
|
|
16
|
-
It is possible to analyze the size of the admin UI webpack bundle:
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
APOS_BUNDLE_ANALYZER=1 node app @apostrophecms/asset:build
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
This will display a visualization in your browser.
|
|
23
|
-
|
|
24
|
-
As of this writing, we are not optimizing the webpack build for production, so expect to see big numbers.
|
|
@@ -253,13 +253,6 @@ module.exports = {
|
|
|
253
253
|
|
|
254
254
|
await deploy(deployFiles);
|
|
255
255
|
|
|
256
|
-
if (process.env.APOS_BUNDLE_ANALYZER) {
|
|
257
|
-
return new Promise((resolve, reject) => {
|
|
258
|
-
// Intentionally never resolve it, so the task never exits
|
|
259
|
-
// and the UI stays up
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
|
|
263
256
|
async function moduleOverrides(modulesDir, source, pnpmPaths) {
|
|
264
257
|
await fs.remove(modulesDir);
|
|
265
258
|
await fs.mkdirp(modulesDir);
|
|
@@ -4,12 +4,6 @@ const scss = require('./webpack.scss');
|
|
|
4
4
|
const vue = require('./webpack.vue');
|
|
5
5
|
const js = require('./webpack.js');
|
|
6
6
|
|
|
7
|
-
let BundleAnalyzerPlugin;
|
|
8
|
-
|
|
9
|
-
if (process.env.APOS_BUNDLE_ANALYZER) {
|
|
10
|
-
BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
7
|
module.exports = ({
|
|
14
8
|
importFile,
|
|
15
9
|
modulesDir,
|
|
@@ -84,8 +78,7 @@ module.exports = ({
|
|
|
84
78
|
],
|
|
85
79
|
symlinks: false
|
|
86
80
|
},
|
|
87
|
-
stats: 'verbose'
|
|
88
|
-
plugins: process.env.APOS_BUNDLE_ANALYZER ? [ new BundleAnalyzerPlugin() ] : []
|
|
81
|
+
stats: 'verbose'
|
|
89
82
|
};
|
|
90
83
|
|
|
91
84
|
return merge(config, ...tasks);
|
|
@@ -3,12 +3,6 @@ const merge = require('webpack-merge').merge;
|
|
|
3
3
|
const scssTask = require('./webpack.scss');
|
|
4
4
|
const srcBuildNames = [ 'src-build', 'src-es5-build' ];
|
|
5
5
|
|
|
6
|
-
let BundleAnalyzerPlugin;
|
|
7
|
-
|
|
8
|
-
if (process.env.APOS_BUNDLE_ANALYZER) {
|
|
9
|
-
BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
6
|
module.exports = ({
|
|
13
7
|
importFile,
|
|
14
8
|
modulesDir,
|
|
@@ -99,7 +93,7 @@ module.exports = ({
|
|
|
99
93
|
symlinks: false
|
|
100
94
|
},
|
|
101
95
|
stats: 'verbose',
|
|
102
|
-
plugins:
|
|
96
|
+
plugins: []
|
|
103
97
|
};
|
|
104
98
|
|
|
105
99
|
if (es5) {
|
|
@@ -1626,7 +1626,8 @@ module.exports = {
|
|
|
1626
1626
|
const remove = [];
|
|
1627
1627
|
|
|
1628
1628
|
// Add type in projection by default
|
|
1629
|
-
|
|
1629
|
+
const hasExclusion = Object.values(projection).some(value => !value);
|
|
1630
|
+
if (!_.isEmpty(projection) && !hasExclusion) {
|
|
1630
1631
|
add.push('type');
|
|
1631
1632
|
}
|
|
1632
1633
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "apostrophe",
|
|
3
|
-
"version": "3.58.
|
|
3
|
+
"version": "3.58.1",
|
|
4
4
|
"description": "The Apostrophe Content Management System.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"tinycolor2": "^1.4.2",
|
|
131
131
|
"tough-cookie": "^4.0.0",
|
|
132
132
|
"underscore.string": "^3.3.4",
|
|
133
|
-
"uploadfs": "^1.22.
|
|
133
|
+
"uploadfs": "^1.22.3",
|
|
134
134
|
"v-tooltip": "^2.0.3",
|
|
135
135
|
"vue": "^2.6.14",
|
|
136
136
|
"vue-advanced-cropper": "^1.10.1",
|
|
@@ -157,8 +157,7 @@
|
|
|
157
157
|
"stylelint": "^14.6.1",
|
|
158
158
|
"stylelint-declaration-strict-value": "^1.8.0",
|
|
159
159
|
"stylelint-order": "^5.0.0",
|
|
160
|
-
"vue-eslint-parser": "^7.1.1"
|
|
161
|
-
"webpack-bundle-analyzer": "^3.9.0"
|
|
160
|
+
"vue-eslint-parser": "^7.1.1"
|
|
162
161
|
},
|
|
163
162
|
"browserslist": [
|
|
164
163
|
"ie >= 10"
|
package/test/pieces.js
CHANGED
|
@@ -1005,6 +1005,21 @@ describe('Pieces', function() {
|
|
|
1005
1005
|
assert([ '_id', 'type', 'title' ].every(expectedKey => keys.includes(expectedKey)));
|
|
1006
1006
|
});
|
|
1007
1007
|
|
|
1008
|
+
it('can GET a single product using projections with fields omission', async function() {
|
|
1009
|
+
const response = await apos.http.get(`/api/v1/product/${relatedProductId}`, {
|
|
1010
|
+
qs: {
|
|
1011
|
+
project: {
|
|
1012
|
+
highSearchText: 0,
|
|
1013
|
+
highSearchWords: 0,
|
|
1014
|
+
lowSearchText: 0,
|
|
1015
|
+
searchSummary: 0
|
|
1016
|
+
}
|
|
1017
|
+
}
|
|
1018
|
+
});
|
|
1019
|
+
|
|
1020
|
+
assert(response);
|
|
1021
|
+
});
|
|
1022
|
+
|
|
1008
1023
|
it('can GET a single article with reverse relationships', async function() {
|
|
1009
1024
|
const response = await apos.http.get(`/api/v1/article/${relatedArticleId}`);
|
|
1010
1025
|
assert(response);
|