@akinon/projectzero 1.91.0-rc.1 → 1.91.0-rc.3
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 +12 -0
- package/app-template/CHANGELOG.md +119 -0
- package/app-template/package.json +18 -18
- package/app-template/tailwind.config.js +2 -6
- package/codemods/update-tailwind-config/index.js +30 -0
- package/codemods/update-tailwind-config/transform.js +102 -0
- package/commands/codemod.ts +0 -1
- package/dist/commands/codemod.js +0 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @akinon/projectzero
|
|
2
2
|
|
|
3
|
+
## 1.91.0-rc.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 64699d3f: ZERO-2761: Fix invalid import for plugin module
|
|
8
|
+
- e974d8e8: ZERO-3406: Fix rc build
|
|
9
|
+
- 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
|
|
10
|
+
- 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
|
|
11
|
+
- 942490f2: ZERO-3295: move third party tailwind content list to akinon-next
|
|
12
|
+
|
|
13
|
+
## 1.91.0-rc.2
|
|
14
|
+
|
|
3
15
|
## 1.91.0-rc.1
|
|
4
16
|
|
|
5
17
|
## 1.91.0-rc.0
|
|
@@ -1,5 +1,124 @@
|
|
|
1
1
|
# projectzeronext
|
|
2
2
|
|
|
3
|
+
## 1.91.0-rc.3
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 63774a6a: ZERO-3351: Add commerce redirection ignore list functionality and related utility
|
|
8
|
+
- 4434c510: ZERO-3321: remove csp test script
|
|
9
|
+
- 82174637: ZERO-2887: Add LoaderSpinner to Filters component
|
|
10
|
+
- 3670f522: ZERO-3301 :Upgrade react-number-format to the latest version
|
|
11
|
+
- 64699d3f: ZERO-2761: Fix invalid import for plugin module
|
|
12
|
+
- e974d8e8: ZERO-3406: Fix rc build
|
|
13
|
+
- 7727ae55: ZERO-3073: Refactor basket page to use server-side data fetching and simplify component structure
|
|
14
|
+
- 448adefb: ZERO-3321: move csp test to akinon-next
|
|
15
|
+
- e9ce5edb: ZERO-3321: check last CSP header in test
|
|
16
|
+
- 33377cfd: ZERO-3267: Refactor import statement for ROUTES in error-page component
|
|
17
|
+
- 942490f2: ZERO-3295: move third party tailwind content list to akinon-next
|
|
18
|
+
- 100f03a9: ZERO-3321: add test for Content-Security-Policy header in Next.js config
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- Updated dependencies [5dfeea04]
|
|
23
|
+
- Updated dependencies [823d82f9]
|
|
24
|
+
- Updated dependencies [63774a6a]
|
|
25
|
+
- Updated dependencies [2d9b2b2c]
|
|
26
|
+
- Updated dependencies [5e1feca6]
|
|
27
|
+
- Updated dependencies [d8fad39f]
|
|
28
|
+
- Updated dependencies [72bfcbf2]
|
|
29
|
+
- Updated dependencies [40a46853]
|
|
30
|
+
- Updated dependencies [68bbcb27]
|
|
31
|
+
- Updated dependencies [2ba89b3c]
|
|
32
|
+
- Updated dependencies [1e53e17a]
|
|
33
|
+
- Updated dependencies [25524867]
|
|
34
|
+
- Updated dependencies [f49bb74f]
|
|
35
|
+
- Updated dependencies [155cd231]
|
|
36
|
+
- Updated dependencies [e9541a13]
|
|
37
|
+
- Updated dependencies [ad0bec92]
|
|
38
|
+
- Updated dependencies [9b7d0de6]
|
|
39
|
+
- Updated dependencies [72fd4d67]
|
|
40
|
+
- Updated dependencies [c53ef7b9]
|
|
41
|
+
- Updated dependencies [f8e4cac6]
|
|
42
|
+
- Updated dependencies [310556ec]
|
|
43
|
+
- Updated dependencies [64699d3f]
|
|
44
|
+
- Updated dependencies [832bee36]
|
|
45
|
+
- Updated dependencies [e974d8e8]
|
|
46
|
+
- Updated dependencies [b31333ed]
|
|
47
|
+
- Updated dependencies [28a59d49]
|
|
48
|
+
- Updated dependencies [8feabe9a]
|
|
49
|
+
- Updated dependencies [bf354de4]
|
|
50
|
+
- Updated dependencies [7727ae55]
|
|
51
|
+
- Updated dependencies [d552629f]
|
|
52
|
+
- Updated dependencies [448adefb]
|
|
53
|
+
- Updated dependencies [17f87524]
|
|
54
|
+
- Updated dependencies [65d3b862]
|
|
55
|
+
- Updated dependencies [bbe18b9f]
|
|
56
|
+
- Updated dependencies [17bfadc4]
|
|
57
|
+
- Updated dependencies [4920742c]
|
|
58
|
+
- Updated dependencies [b6e5b624]
|
|
59
|
+
- Updated dependencies [6c3629c2]
|
|
60
|
+
- Updated dependencies [6bc260be]
|
|
61
|
+
- Updated dependencies [7e56d6b6]
|
|
62
|
+
- Updated dependencies [dfaceffd]
|
|
63
|
+
- Updated dependencies [33377cfd]
|
|
64
|
+
- Updated dependencies [43c182ee]
|
|
65
|
+
- Updated dependencies [943a239e]
|
|
66
|
+
- Updated dependencies [068dc394]
|
|
67
|
+
- Updated dependencies [942490f2]
|
|
68
|
+
- Updated dependencies [eeb20bea]
|
|
69
|
+
- Updated dependencies [fec9638a]
|
|
70
|
+
- Updated dependencies [3bf63c8a]
|
|
71
|
+
- Updated dependencies [9be2c081]
|
|
72
|
+
- Updated dependencies [f2c92d5c]
|
|
73
|
+
- Updated dependencies [7bd3d992]
|
|
74
|
+
- Updated dependencies [b6d5bda2]
|
|
75
|
+
- Updated dependencies [fdd255ee]
|
|
76
|
+
- Updated dependencies [07248e09]
|
|
77
|
+
- Updated dependencies [acf03209]
|
|
78
|
+
- Updated dependencies [387356b6]
|
|
79
|
+
- Updated dependencies [49eeebfa]
|
|
80
|
+
- Updated dependencies [3f9b8d7e]
|
|
81
|
+
- Updated dependencies [b2ee69b9]
|
|
82
|
+
- Updated dependencies [0cabbda3]
|
|
83
|
+
- @akinon/next@1.91.0-rc.3
|
|
84
|
+
- @akinon/pz-basket-gift-pack@1.91.0-rc.3
|
|
85
|
+
- @akinon/pz-tamara-extension@1.91.0-rc.3
|
|
86
|
+
- @akinon/pz-masterpass@1.91.0-rc.3
|
|
87
|
+
- @akinon/pz-credit-payment@1.91.0-rc.3
|
|
88
|
+
- @akinon/pz-checkout-gift-pack@1.91.0-rc.3
|
|
89
|
+
- @akinon/pz-one-click-checkout@1.91.0-rc.3
|
|
90
|
+
- @akinon/pz-pay-on-delivery@1.91.0-rc.3
|
|
91
|
+
- @akinon/pz-click-collect@1.91.0-rc.3
|
|
92
|
+
- @akinon/pz-akifast@1.91.0-rc.3
|
|
93
|
+
- @akinon/pz-gpay@1.91.0-rc.3
|
|
94
|
+
- @akinon/pz-b2b@1.91.0-rc.3
|
|
95
|
+
- @akinon/pz-bkm@1.91.0-rc.3
|
|
96
|
+
- @akinon/pz-otp@1.91.0-rc.3
|
|
97
|
+
- @akinon/pz-tabby-extension@1.91.0-rc.3
|
|
98
|
+
- @akinon/pz-saved-card@1.91.0-rc.3
|
|
99
|
+
|
|
100
|
+
## 1.91.0-rc.2
|
|
101
|
+
|
|
102
|
+
### Patch Changes
|
|
103
|
+
|
|
104
|
+
- Updated dependencies [2552486]
|
|
105
|
+
- @akinon/next@1.91.0-rc.2
|
|
106
|
+
- @akinon/pz-akifast@1.91.0-rc.2
|
|
107
|
+
- @akinon/pz-b2b@1.91.0-rc.2
|
|
108
|
+
- @akinon/pz-basket-gift-pack@1.91.0-rc.2
|
|
109
|
+
- @akinon/pz-bkm@1.91.0-rc.2
|
|
110
|
+
- @akinon/pz-checkout-gift-pack@1.91.0-rc.2
|
|
111
|
+
- @akinon/pz-click-collect@1.91.0-rc.2
|
|
112
|
+
- @akinon/pz-credit-payment@1.91.0-rc.2
|
|
113
|
+
- @akinon/pz-gpay@1.91.0-rc.2
|
|
114
|
+
- @akinon/pz-masterpass@1.91.0-rc.2
|
|
115
|
+
- @akinon/pz-one-click-checkout@1.91.0-rc.2
|
|
116
|
+
- @akinon/pz-otp@1.91.0-rc.2
|
|
117
|
+
- @akinon/pz-pay-on-delivery@1.91.0-rc.2
|
|
118
|
+
- @akinon/pz-saved-card@1.91.0-rc.2
|
|
119
|
+
- @akinon/pz-tabby-extension@1.91.0-rc.2
|
|
120
|
+
- @akinon/pz-tamara-extension@1.91.0-rc.2
|
|
121
|
+
|
|
3
122
|
## 1.91.0-rc.1
|
|
4
123
|
|
|
5
124
|
### Patch Changes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "projectzeronext",
|
|
3
|
-
"version": "1.91.0-rc.
|
|
3
|
+
"version": "1.91.0-rc.3",
|
|
4
4
|
"private": true,
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -24,22 +24,22 @@
|
|
|
24
24
|
"test:middleware": "jest middleware-matcher.test.ts --bail"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@akinon/next": "1.91.0-rc.
|
|
28
|
-
"@akinon/pz-akifast": "1.91.0-rc.
|
|
29
|
-
"@akinon/pz-b2b": "1.91.0-rc.
|
|
30
|
-
"@akinon/pz-basket-gift-pack": "1.91.0-rc.
|
|
31
|
-
"@akinon/pz-bkm": "1.91.0-rc.
|
|
32
|
-
"@akinon/pz-checkout-gift-pack": "1.91.0-rc.
|
|
33
|
-
"@akinon/pz-click-collect": "1.91.0-rc.
|
|
34
|
-
"@akinon/pz-credit-payment": "1.91.0-rc.
|
|
35
|
-
"@akinon/pz-gpay": "1.91.0-rc.
|
|
36
|
-
"@akinon/pz-masterpass": "1.91.0-rc.
|
|
37
|
-
"@akinon/pz-one-click-checkout": "1.91.0-rc.
|
|
38
|
-
"@akinon/pz-otp": "1.91.0-rc.
|
|
39
|
-
"@akinon/pz-pay-on-delivery": "1.91.0-rc.
|
|
40
|
-
"@akinon/pz-saved-card": "1.91.0-rc.
|
|
41
|
-
"@akinon/pz-tabby-extension": "1.91.0-rc.
|
|
42
|
-
"@akinon/pz-tamara-extension": "1.91.0-rc.
|
|
27
|
+
"@akinon/next": "1.91.0-rc.3",
|
|
28
|
+
"@akinon/pz-akifast": "1.91.0-rc.3",
|
|
29
|
+
"@akinon/pz-b2b": "1.91.0-rc.3",
|
|
30
|
+
"@akinon/pz-basket-gift-pack": "1.91.0-rc.3",
|
|
31
|
+
"@akinon/pz-bkm": "1.91.0-rc.3",
|
|
32
|
+
"@akinon/pz-checkout-gift-pack": "1.91.0-rc.3",
|
|
33
|
+
"@akinon/pz-click-collect": "1.91.0-rc.3",
|
|
34
|
+
"@akinon/pz-credit-payment": "1.91.0-rc.3",
|
|
35
|
+
"@akinon/pz-gpay": "1.91.0-rc.3",
|
|
36
|
+
"@akinon/pz-masterpass": "1.91.0-rc.3",
|
|
37
|
+
"@akinon/pz-one-click-checkout": "1.91.0-rc.3",
|
|
38
|
+
"@akinon/pz-otp": "1.91.0-rc.3",
|
|
39
|
+
"@akinon/pz-pay-on-delivery": "1.91.0-rc.3",
|
|
40
|
+
"@akinon/pz-saved-card": "1.91.0-rc.3",
|
|
41
|
+
"@akinon/pz-tabby-extension": "1.91.0-rc.3",
|
|
42
|
+
"@akinon/pz-tamara-extension": "1.91.0-rc.3",
|
|
43
43
|
"@hookform/resolvers": "2.9.0",
|
|
44
44
|
"@next/third-parties": "14.1.0",
|
|
45
45
|
"@react-google-maps/api": "2.17.1",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"yup": "0.32.11"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@akinon/eslint-plugin-projectzero": "1.91.0-rc.
|
|
65
|
+
"@akinon/eslint-plugin-projectzero": "1.91.0-rc.3",
|
|
66
66
|
"@semantic-release/changelog": "6.0.2",
|
|
67
67
|
"@semantic-release/exec": "6.0.3",
|
|
68
68
|
"@semantic-release/git": "10.0.1",
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const getAkinonNextContent = require("@akinon/next/tailwind/content");
|
|
1
2
|
const deepMerge = require('@akinon/next/utils/deep-merge');
|
|
2
3
|
const defaultTheme = require('tailwindcss/defaultTheme');
|
|
3
4
|
const plugins = require('./src/plugins');
|
|
@@ -26,12 +27,7 @@ const defaultConfig = {
|
|
|
26
27
|
'./src/widgets/**/*.{js,ts,jsx,tsx}',
|
|
27
28
|
'./src/hooks/**/*.{js,ts,jsx,tsx}',
|
|
28
29
|
'./src/utils/**/*.{js,ts,jsx,tsx}',
|
|
29
|
-
...plugins
|
|
30
|
-
.map((plugin) => [
|
|
31
|
-
`./node_modules/@akinon/${plugin}/**/*.{js,ts,jsx,tsx}`,
|
|
32
|
-
`../../node_modules/@akinon/${plugin}/**/*.{js,ts,jsx,tsx}`
|
|
33
|
-
])
|
|
34
|
-
.flat()
|
|
30
|
+
...getAkinonNextContent(plugins)
|
|
35
31
|
],
|
|
36
32
|
theme: {
|
|
37
33
|
extend: {
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const jscodeshift = require('jscodeshift/src/Runner');
|
|
3
|
+
|
|
4
|
+
const codemodScript = path.resolve(__dirname, 'transform.js');
|
|
5
|
+
|
|
6
|
+
const transform = () => {
|
|
7
|
+
const workingDir = path.resolve(process.cwd());
|
|
8
|
+
|
|
9
|
+
jscodeshift
|
|
10
|
+
.run(codemodScript, [workingDir], {
|
|
11
|
+
verbose: 0,
|
|
12
|
+
dry: false,
|
|
13
|
+
print: false,
|
|
14
|
+
extensions: 'js',
|
|
15
|
+
ignorePattern: '**/node_modules/**',
|
|
16
|
+
filter: '**/tailwind.config.js'
|
|
17
|
+
})
|
|
18
|
+
.then(
|
|
19
|
+
(stats) => {
|
|
20
|
+
console.log(`Codemod completed. Stats:`, stats);
|
|
21
|
+
},
|
|
22
|
+
(error) => {
|
|
23
|
+
console.error(`Error executing codemod: ${error.message}`);
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
module.exports = {
|
|
29
|
+
transform
|
|
30
|
+
};
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
function transform(fileInfo, api) {
|
|
2
|
+
const j = api.jscodeshift;
|
|
3
|
+
const root = j(fileInfo.source);
|
|
4
|
+
|
|
5
|
+
if (!fileInfo.path.includes('tailwind.config.js')) {
|
|
6
|
+
return fileInfo.source;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
console.log(`Processing file: ${fileInfo.path}`);
|
|
10
|
+
|
|
11
|
+
const hasAkinonNextImport = root.find(j.VariableDeclarator, {
|
|
12
|
+
id: { name: 'getAkinonNextContent' }
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
if (hasAkinonNextImport.size() === 0) {
|
|
16
|
+
const requireStatement = j.variableDeclaration('const', [
|
|
17
|
+
j.variableDeclarator(
|
|
18
|
+
j.identifier('getAkinonNextContent'),
|
|
19
|
+
j.callExpression(j.identifier('require'), [
|
|
20
|
+
j.literal('@akinon/next/tailwind/content')
|
|
21
|
+
])
|
|
22
|
+
)
|
|
23
|
+
]);
|
|
24
|
+
|
|
25
|
+
root.get().node.program.body.unshift(requireStatement);
|
|
26
|
+
|
|
27
|
+
console.log(`Added getAkinonNextContent import to ${fileInfo.path}`);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const defaultConfig = root
|
|
31
|
+
.find(j.VariableDeclarator, {
|
|
32
|
+
id: { name: 'defaultConfig' },
|
|
33
|
+
init: { type: 'ObjectExpression' }
|
|
34
|
+
})
|
|
35
|
+
.paths()[0];
|
|
36
|
+
|
|
37
|
+
if (!defaultConfig) {
|
|
38
|
+
console.log(`No defaultConfig found in ${fileInfo.path}`);
|
|
39
|
+
return fileInfo.source;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const contentArray = defaultConfig.value.init.properties.find(
|
|
43
|
+
(prop) =>
|
|
44
|
+
prop.key.name === 'content' && prop.value.type === 'ArrayExpression'
|
|
45
|
+
);
|
|
46
|
+
|
|
47
|
+
if (!contentArray) {
|
|
48
|
+
console.log(`No content array found in defaultConfig`);
|
|
49
|
+
return fileInfo.source;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
const pluginsVarName = root
|
|
53
|
+
.find(j.VariableDeclarator, {
|
|
54
|
+
id: { name: 'plugins' },
|
|
55
|
+
init: {
|
|
56
|
+
type: 'CallExpression',
|
|
57
|
+
callee: { name: 'require' }
|
|
58
|
+
}
|
|
59
|
+
})
|
|
60
|
+
.paths()[0]?.value.id.name;
|
|
61
|
+
|
|
62
|
+
if (!pluginsVarName) {
|
|
63
|
+
console.log(`No plugins variable found in ${fileInfo.path}`);
|
|
64
|
+
return fileInfo.source;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
const contentElements = contentArray.value.elements;
|
|
68
|
+
|
|
69
|
+
const filteredElements = contentElements.filter((element) => {
|
|
70
|
+
if (element.type === 'SpreadElement') {
|
|
71
|
+
if (
|
|
72
|
+
element.argument.type === 'CallExpression' &&
|
|
73
|
+
element.argument.callee.object?.callee.object.name === 'plugins'
|
|
74
|
+
) {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
if (
|
|
79
|
+
element.argument.type === 'CallExpression' &&
|
|
80
|
+
element.argument.callee.name === 'getAkinonNextContent'
|
|
81
|
+
) {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return true;
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
filteredElements.push(
|
|
89
|
+
j.spreadElement(
|
|
90
|
+
j.callExpression(j.identifier('getAkinonNextContent'), [
|
|
91
|
+
j.identifier(pluginsVarName)
|
|
92
|
+
])
|
|
93
|
+
)
|
|
94
|
+
);
|
|
95
|
+
|
|
96
|
+
contentArray.value.elements = filteredElements;
|
|
97
|
+
|
|
98
|
+
console.log(`Successfully updated ${fileInfo.path}`);
|
|
99
|
+
return root.toSource();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
module.exports = transform;
|
package/commands/codemod.ts
CHANGED
package/dist/commands/codemod.js
CHANGED
|
@@ -8,7 +8,6 @@ const yargs = require('yargs/yargs');
|
|
|
8
8
|
const { hideBin } = require('yargs/helpers');
|
|
9
9
|
const args = yargs(hideBin(process.argv)).argv;
|
|
10
10
|
exports.default = () => {
|
|
11
|
-
const workingDir = path_1.default.resolve(process.cwd());
|
|
12
11
|
const codemodName = args.codemod;
|
|
13
12
|
const codemodPath = path_1.default.resolve(__dirname, `../../codemods/${codemodName}/index.js`);
|
|
14
13
|
const codemod = require(codemodPath);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/projectzero",
|
|
3
|
-
"version": "1.91.0-rc.
|
|
3
|
+
"version": "1.91.0-rc.3",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "CLI tool to manage your Project Zero Next project",
|
|
6
6
|
"bin": {
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
"@types/temp": "0.9.4"
|
|
20
20
|
},
|
|
21
21
|
"dependencies": {
|
|
22
|
+
"jscodeshift": "^0.15.1",
|
|
22
23
|
"@inquirer/prompts": "7.5.0",
|
|
23
24
|
"loading-spinner": "1.2.1",
|
|
24
25
|
"semver": "7.6.2",
|