Skip to content

Commit

Permalink
Merge branch 'master' into ga4-campaign-data
Browse files Browse the repository at this point in the history
  • Loading branch information
kikoruiz committed Oct 16, 2024
2 parents 1d5ee77 + 12fd0f7 commit 32ac5f2
Show file tree
Hide file tree
Showing 22 changed files with 219 additions and 156 deletions.
102 changes: 22 additions & 80 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions packages/lint-repository-sui/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CHANGELOG

# 1.13.0 (2024-10-15)


### Features

* Add jest adoption rule to lint ([b631c23](https://github.com/SUI-Components/sui/commit/b631c2359091628a816098d2a3cc7f838cc47563))



# 1.12.0 (2024-06-10)


Expand Down
2 changes: 1 addition & 1 deletion packages/lint-repository-sui/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "lint-repository-sui",
"access": "public",
"version": "1.12.0",
"version": "1.13.0",
"description": "Set of sui lint rules to lint a repository",
"keywords": [],
"author": "Sui",
Expand Down
4 changes: 3 additions & 1 deletion packages/lint-repository-sui/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ const TSvsJS = require('./rules/ts-vs-js-files.js')
const Sass = require('./rules/sass-files.js')
const Spark = require('./rules/spark-adoption.js')
const ComponentsLocation = require('./rules/components-location.js')
const JestAdoption = require('./rules/jest-adoption.js')

// ------------------------------------------------------------------------------
// Plugin Definition
Expand All @@ -31,6 +32,7 @@ module.exports = {
'ts-vs-js-files': TSvsJS,
'sass-files': Sass,
'spark-adoption': Spark,
'components-location': ComponentsLocation
'components-location': ComponentsLocation,
'jest-adoption': JestAdoption
}
}
45 changes: 45 additions & 0 deletions packages/lint-repository-sui/src/rules/jest-adoption.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
const dedent = require('string-dedent')

module.exports = {
meta: {
type: 'problem',
docs: {
description: 'This metric reports the number component that use Jest',
recommended: true,
url: null
},
fixable: null,
schema: [],
messages: {
percentage: dedent`
Currently, {{percentage}}% of your components use Jest. We have {{totalKarmaTests}}% tests in Karma and {{totalJestTests}}% in Jest
`
}
},

create: function (context) {
return {
'components/**/(test|__tests__)/*.(j|t)s(x)?': matches => {
const totalTests = matches.length
const totalJestTests = matches.filter(({fullPath}) => fullPath.includes('__tests__')).length
const totalKarmaTests = totalTests - totalJestTests
let percentage = (totalJestTests * 100) / totalTests
percentage = Math.round((percentage + Number.EPSILON) * 100) / 100

context.report({
messageId: 'percentage',
data: {percentage, totalKarmaTests, totalJestTests}
})
return context.monitoring(percentage)
},

missmatch: key => {
context.report({
messageId: 'percentage',
data: {percentage: 0}
})
context.monitoring(0)
}
}
}
}
9 changes: 9 additions & 0 deletions packages/sui-decorators/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CHANGELOG

# 3.29.0 (2024-10-16)


### Features

* remove console.log ([206dd74](https://github.com/SUI-Components/sui/commit/206dd747c6fcec150e7e8bd748eae27c297b8b7f))



# 3.28.0 (2024-08-28)


Expand Down
2 changes: 1 addition & 1 deletion packages/sui-decorators/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@s-ui/decorators",
"version": "3.28.0",
"version": "3.29.0",
"description": "> Set of ES6 decorators to improve your apps",
"main": "lib/",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/sui-decorators/src/decorators/error.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const _runner = ({instance, original} = {}) => {
try {
const returns = original.apply(instance.__STREAMIFY__ ? this : instance, args)
if (isPromise(returns)) {
console.warn('You should use the @AsyncInlineError() decorator in async functions.')
// console.warn('You should use the @AsyncInlineError() decorator in async functions.')
return returns
.then(r => {
response[0] = null
Expand Down
9 changes: 9 additions & 0 deletions packages/sui-lint/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# CHANGELOG

# 4.51.0 (2024-10-15)


### Features

* Add jest adoption rule to @s-ui/lint ([4f023a9](https://github.com/SUI-Components/sui/commit/4f023a9efb6c1d622194d78268ffb4055d57b314))



# 4.50.0 (2024-09-26)


Expand Down
2 changes: 1 addition & 1 deletion packages/sui-lint/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@s-ui/lint",
"version": "4.50.0",
"version": "4.51.0",
"description": "Linting CLI for sui packages",
"main": "./bin/sui-lint.js",
"bin": {
Expand Down
3 changes: 2 additions & 1 deletion packages/sui-lint/repository.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
'sui/adv-tools-version': RULES.WARNING,
'sui/ts-vs-js-files': RULES.WARNING,
'sui/sass-files': RULES.WARNING,
'sui/spark-adoption': RULES.WARNING
'sui/spark-adoption': RULES.WARNING,
'sui/jest-adoption': RULES.WARNING
}
}
25 changes: 22 additions & 3 deletions packages/sui-logger/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,31 @@
# CHANGELOG

# 1.1.0 (2024-10-11)
# 1.4.0 (2024-10-15)



# 1.3.0 (2024-10-14)


### Bug Fixes

* fix typo ([145ca42](https://github.com/SUI-Components/sui/commit/145ca427a72e411b10b86824b48b692be41c4d28))


### Features

* Migrate sui-logger from inner source ([b2ac6ed](https://github.com/SUI-Components/sui/commit/b2ac6ed8ab0e12af0352ac62af88b99afef17b87))
* remove beta tag ([3b13263](https://github.com/SUI-Components/sui/commit/3b13263c125503dc16123677f62a376e11ac16fe))
* improve the documentation ([7db4964](https://github.com/SUI-Components/sui/commit/7db4964a5f8eb565cd0fb9105f8580e017868324))



# 1.2.0 (2024-10-14)



# 1.1.0 (2024-10-11)


### Features

* Migrate sui-logger from inner source ([b2ac6ed](https://github.com/SUI-Components/sui/commit/b2ac6ed8ab0e12af0352ac62af88b99afef17b87))
* remove beta tag ([3b13263](https://github.com/SUI-Components/sui/commit/3b13263c125503dc16123677f62a376e11ac16fe))
Loading

0 comments on commit 32ac5f2

Please sign in to comment.