@netlify/config 16.0.5 → 16.0.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.
- package/package.json +2 -2
- package/src/redirects.js +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/config",
|
|
3
|
-
"version": "16.0.
|
|
3
|
+
"version": "16.0.6",
|
|
4
4
|
"description": "Netlify config module",
|
|
5
5
|
"main": "src/main.js",
|
|
6
6
|
"bin": {
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"map-obj": "^4.0.0",
|
|
66
66
|
"netlify": "^10.0.0",
|
|
67
67
|
"netlify-headers-parser": "^5.0.0",
|
|
68
|
-
"netlify-redirect-parser": "^
|
|
68
|
+
"netlify-redirect-parser": "^13.0.0",
|
|
69
69
|
"omit.js": "^2.0.2",
|
|
70
70
|
"p-locate": "^5.0.0",
|
|
71
71
|
"path-exists": "^4.0.0",
|
package/src/redirects.js
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
const { resolve } = require('path')
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
// TODO: use static `import` after migrating this repository to pure ES modules
|
|
6
|
+
const netlifyRedirectParser = import('netlify-redirect-parser')
|
|
6
7
|
|
|
7
8
|
const { warnRedirectsParsing } = require('./log/messages')
|
|
8
9
|
|
|
@@ -15,6 +16,7 @@ const REDIRECTS_FILENAME = '_redirects'
|
|
|
15
16
|
|
|
16
17
|
// Add `config.redirects`
|
|
17
18
|
const addRedirects = async function ({ redirects: configRedirects, ...config }, redirectsPath, logs) {
|
|
19
|
+
const { parseAllRedirects } = await netlifyRedirectParser
|
|
18
20
|
const { redirects, errors } = await parseAllRedirects({
|
|
19
21
|
redirectsFiles: [redirectsPath],
|
|
20
22
|
configRedirects,
|