Using renovate to update TYPO3 installations minor/patches only - automation

I have been experimenting with Renovate and would like to use it to auto update TYPO3 to the latest version. v10.4.x - where Renovate should only create MR's whenever the is an update available for the 'X' part.
I am using the following configuration:
config.js
module.exports = {
endpoint: 'https://gitlab.companyname/api/v4/',
token: '**gitlab_token**',
platform: 'gitlab',
baseBranches: ["master"],
assignees: ["Me"],
enabledManagers: "composer",
onboardingConfig: {
extends: ['config:base'],
},
repositories: [
{
repository: 'CMS/sitetemplate',
},
],
};
renovate.json in the project CMS/sitetemplate
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
":disableDependencyDashboard",
":separatePatchReleases"
],
"prHourlyLimit": 0,
"prConcurrentLimit": 0,
"baseBranches": [
"master"
],
"enabledManagers": [
"composer"
],
"commitMessagePrefix": "[TASK] ",
"commitMessageTopic": "{{depName}}",
"commitMessageExtra": " ({{{displayFrom}}} => {{{displayTo}}})",
"rangeStrategy": "update-lockfile",
"packageRules": [
{
"matchUpdateTypes": [
"patch"
],
"matchPackagePrefixes": [
"typo3/cms-"
],
"excludePackageNames": [
"typo3/cms-cli",
"typo3/cms-composer-installers"
],
"groupName": "TYPO3 CMS",
"labels": [
"typo3"
]
},
{
"matchUpdateTypes": [
"minor",
"pin",
"digest",
"major"
],
"enabled": false
}
]
}
.gitlab-ci.yaml
Update Web Project:
rules:
- if: $RENOVATE_APPLICATION_TOKEN
when: never
- if: $RENOVATE_WEB_TOKEN
when: manual
variables:
RENOVATE_TOKEN: $RENOVATE_WEB_TOKEN
script:
- renovate $RENOVATE_EXTRA_FLAGS
when: manual
I have played around with the config a bit and it will create MR's, issues etc when i have other settings. So its working. However with the current configuration it does not create a PR.
The sitetemplate currently has TYPO3 V10.4.25 (in lock file) and i want it to create a PR so it will update all typo3/cms-* packages to the lastest TYPO3 V10.4.32
It should only update the lock file.
Currently when i run the CI i get no MR's and the following output
The CI output
PASTEBIN since it was to large
Anyone has any expirience with this, what configuration am i doing wrong?

https://github.com/renovatebot/renovate/discussions/17939
Confirmed working:
At a quick glance I think you're missing a setting of separateMinorPatch=true. You could turn that on globally (if you want to separate patch updates from minor for all packages) or specifically for certain packages by using packageRules.

Related

babel-import-plugin doesn't seem to reduce ant-design-vue size after use nuxt build config

According to the doc Docs It was recommended to use the modularized antd in order to ensure optimization and reduce the app size. However, I tried using the exact code in my nuxt build config but the app size remains the same before and after build using yarn build
Below is my nuxt build config and the screenshot to the before and after build
build: {
analyze: true, // Remove this mode before deployment
babel: {
plugins: [
[
"import",
{
libraryName: "ant-design-vue",
libraryDirectory: "es",
style: "css"
},
]
]
}
}
Here is the build before and after adding the babel-import-plugin
i just got this fixed and reduced the size drastically to this by only removing the ant-design plugin from the nuxt config.
Initially my plug look something like this
plugins: [
"#/plugins/antd-ui",
{ src: "#/plugins/vue-carousel", ssr: false }
// "#/plugins/axios"
],
Then I removed the plugin to have something like this
plugins: [
{ src: "#/plugins/vue-carousel", ssr: false }
// "#/plugins/axios"
],
Now i have this minimal size

How can i custom config CHANGELOG.md using standard-version npm package?

I'm using the command standard-version each time I want to publish new version, but the yielded changes in the CHANGELOG.md look like this:
### [10.1.9](https://github.com/my-project-name/compare/v10.1.8...v10.1.9) (2021-03-29)
### [10.1.8](https://github.com/my-project-name/compare/v10.1.7...v10.1.8) (2021-03-29)
### [10.1.7](https://github.com/my-project-name/compare/v10.1.6...v10.1.7) (2021-03-29)
first the links do not work - the github url is not correct and i want to configure it to the right url, and second, I'd like to configure the link that's shown in the changeslog file (there are some types)
I tried to use this documentation but didn't find anything that can help me
https://github.com/conventional-changelog/conventional-changelog
so how do I configure the way standard-version works on the CHANGELOG.md ? can someone provide example?
yes.
according to doc:
You can configure standard-version either by:
Placing a standard-version stanza in your package.json (assuming your project is JavaScript).
Creating a .versionrc, .versionrc.json or .versionrc.js.
If you are using a .versionrc.js your default export must be a configuration object, or a function returning a configuration object.
Any of the command line parameters accepted by standard-version can instead be provided via configuration.
Please refer to the conventional-changelog-config-spec for details on available configuration options.
example:
.versionrc
{
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "chore",
"hidden": true
},
{
"type": "docs",
"hidden": true
},
{
"type": "style",
"hidden": true
},
{
"type": "refactor",
"section": "Refactor"
},
{
"type": "perf",
"section": "Performance"
},
{
"type": "test",
"hidden": true
}
]
}

Overwriting the CRA basic linting rules

I have an application created using the create-react-app.
I need to disable one rule from the default CRA Lint rules:
"react-hooks/exhaustive-deps": 0
After checking all of the resources about the topic and I'm still failing to disable that rule. I made an .env file with EXTEND_ESLINT=true
and I've included the following in my .eslintrc in the root directory
{
"eslintConfig": {
"extends": ["react-app"],
"overrides": [
{
"rules": {
"react-hooks/exhaustive-deps": 0
}
}
]
}
}
EDIT based on the comments suggestions:
Aditionally, moving the .eslintrc conents to package.json is not working either.
Package.json
"eslintConfig": {
"extends": [
"react-app",
"shared-config"
],
"rules": {
"react-hooks/exhaustive-deps": 0
}
},
Am i missing something ? Please advice if possible :)

Why TSLint problems are not shown in IntelliJ Idea?

I'm using IntelliJ Idea (Ultimate) and I'm trying to setup TSLint. What I have done so far:
created a new project
installed TS & TSLint npm i tslint typescript -D
enabled TSLint in Languages and Frameworks | TypeScript | TSLint | Enable (like suggested here)
added additional (rather random) tslint.json (see below)
applied it via right click | Apply TSLint Code Style Rules
created some ugly .ts file (see below)
but still none of the problems are highlighted. When I run tslint ugly.ts in console it shows many problems. TS problems are highlighted:
I've also checked highlighting settings:
And here's how TSLint settings look now (Enable checked, Automatic search is set):
Any ideas what could be wrong?
ugly.ts:
/* tslint:enable */
// npm i tslint typescript -D
function a (): void {
var b = 1;
if(b){var c=2; var d=5;}
var a =4
a+b
var s1 = 'haha'
, s2 ="ololo"
,s3 = `wow`
return ;;
}
function b(){return 9}
tslint.json:
{
"extends": ["tslint:recommended"],
"linterOptions": {
"exclude": [
"node_modules/**/*"
]
},
"rules": {
"quotemark": {
"single": true,
"severity": "error"
}, //"jsx-double"
"interface-name": false,
"whitespace": [ true, "check-module" ],
"max-classes-per-file": [ false ],
"member-access": false,
"object-literal-sort-keys": false,
"member-ordering": false,
"semicolon": [ true, "always", "ignore-bound-class-methods" ],
"variable-name": [ true, "check-format", "allow-leading-underscore", "allow-pascal-case" ],
"no-console": false,
"indent": [ true, "spaces", 2 ],
"no-empty-interface": false
}
}

How to workaround the "Unexpected Token Operator (>)" error when packaging a React app?

I am having some problems building the distributable package for a React app.
I'm trying to execute the following sentence:
rimraf dist && env-cmd .env cross-env NODE_ENV=production webpack -p --config ./config/webpack/prod.js
And receiving this error:
ERROR in a86e50ffd4893c44fdfd.app.js from UglifyJs Unexpected token:
operator (>) [a86e50ffd4893c44fdfd.app.js:10679,43]
The line indicated in that trace corresponds to one of the libraries being loaded as dependencies, and not to the actual code of my app. This is the line itself (line 10679 corresponds to the declaration of the const method with the arrow function):
const DEFAULT_DISPLAY_LABEL_FOR_NULL_VALUES = '';
/* unused harmony export DEFAULT_DISPLAY_LABEL_FOR_NULL_VALUES */
const getAllColumnLabels = (columnLabels) => {
const columnNames = [];
columnLabels.forEach((value) => {
columnNames.push(value.label);
});
return columnNames;
};
At first I thought it could be related to Babel config, but it is identical to another project which is building correctly. The content of my .babelrc file is shown below, loaded using babel-preset-env:
{
"presets": [
[
"env", {
"modules": false,
"targets": {
"browsers": [
"Chrome >= 52",
"FireFox >= 44",
"Safari >= 7",
"Explorer 11",
"last 4 Edge versions"
]
},
"useBuiltIns": true
}
]
]
}
An additional test to rule out some possibilities has been done using the default presets for Babel, though no success was achieved with this test.
{
"presets": [
[
"env",
{
"modules": false
}
]
]
}
The settings in tsconfig.json could also be of interest, so i'm showing them here even though they also are identical to the ones in this another project mentioned above, which builds correctly:
{
"compilerOptions": {
"target": "es6",
"module": "es6",
"lib": ["dom", "es2017"],
"moduleResolution": "node",
"declaration": false,
"noImplicitAny": false,
"sourceMap": true,
"jsx": "react",
"noLib": false,
"allowJs": true,
"suppressImplicitAnyIndexErrors": true,
"skipLibCheck": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
},
"compileOnSave": true,
"exclude": [
"node_modules",
"**/*.spec.ts"
]
}
I've tried to delete node_modules and re-install the dependencies, also played setting uglify to false in the env for Babelrc, but surprisingly (at least, to me!) it didnt help.
There is a thread in the webpack-contrib Github site which is marked as closed but I didnt find anything that helped me.
Any ideas? I have some experience with npm but this issue certainly is blocking me.
Thanks!
Updating webpack to version 4 (currently 4.17) solved the problem. A few other dependencies needed to be updated to work properly with webpack 4, most importantly the Extract Text Webpack Plugin hasn't at this moment a stable release that works with webpack4, but the 4.0.0-beta works around the issue and may be used until a better replacement is found.