itee-tasks 1.0.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/.czrc +6 -0
- package/.github/workflows/node.js.yml +56 -0
- package/.releaserc.mjs +94 -0
- package/CHANGELOG.md +25 -0
- package/README.md +1 -0
- package/configs/builds/build.conf.mjs +1 -0
- package/configs/cleans/clean.conf.mjs +1 -0
- package/configs/docs/doc.conf.json +1 -0
- package/configs/lints/lint.conf.mjs +91 -0
- package/configs/refresh.conf.mjs +1 -0
- package/configs/tests/benchmarks/compute-benchmarks.conf.mjs +25 -0
- package/configs/tests/benchmarks/run-benchmarks-for-frontend.conf.mjs +41 -0
- package/configs/tests/benchmarks/run-benchmarks.conf.mjs +7 -0
- package/configs/tests/bundlings/check-bundling-from-esm-build-import.conf.mjs +45 -0
- package/configs/tests/bundlings/check-bundling-from-esm-files-direct.conf.mjs +45 -0
- package/configs/tests/bundlings/check-bundling-from-esm-files-import.conf.mjs +42 -0
- package/configs/tests/bundlings/check-bundling.conf.mjs +25 -0
- package/configs/tests/units/compute-unit-tests.conf.mjs +25 -0
- package/configs/tests/units/run-unit-tests-for-frontend.conf.mjs +15 -0
- package/configs/tests/units/run-unit-tests.conf.mjs +7 -0
- package/gulpfile.mjs +28 -0
- package/package.json +91 -0
- package/sources/_utils.mjs +389 -0
- package/sources/builds/build.task.mjs +55 -0
- package/sources/cleans/clean.task.mjs +36 -0
- package/sources/docs/doc.task.mjs +49 -0
- package/sources/helps/help.task.mjs +154 -0
- package/sources/index.mjs +21 -0
- package/sources/lints/lint.task.mjs +47 -0
- package/sources/refresh.mjs +100 -0
- package/sources/releases/release.task.mjs +31 -0
- package/sources/tests/benchmarks/compute-benchmarks.task.mjs +224 -0
- package/sources/tests/benchmarks/run-benchmarks-for-backend.task.mjs +42 -0
- package/sources/tests/benchmarks/run-benchmarks-for-frontend.task.mjs +52 -0
- package/sources/tests/benchmarks/run-benchmarks.task.mjs +21 -0
- package/sources/tests/bundlings/check-bundling-from-esm-build-import.task.mjs +131 -0
- package/sources/tests/bundlings/check-bundling-from-esm-files-direct.task.mjs +88 -0
- package/sources/tests/bundlings/check-bundling-from-esm-files-import.task.mjs +106 -0
- package/sources/tests/bundlings/check-bundling.task.mjs +23 -0
- package/sources/tests/run-tests.task.mjs +21 -0
- package/sources/tests/units/compute-unit-tests.task.mjs +535 -0
- package/sources/tests/units/run-unit-tests-for-backend.task.mjs +47 -0
- package/sources/tests/units/run-unit-tests-for-frontend.task.mjs +52 -0
- package/sources/tests/units/run-unit-tests.task.mjs +21 -0
- package/tests/benchmarks/default/default.bench.js +1 -0
- package/tests/benchmarks/itee-tasks.benchmarks.js +8 -0
- package/tests/units/default/default.unit.mjs +1 -0
- package/tests/units/itee-tasks.units.mjs +1 -0
package/.czrc
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
|
2
|
+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
|
|
3
|
+
|
|
4
|
+
name: Itee-Tasks CI
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
push:
|
|
8
|
+
branches: [ master ]
|
|
9
|
+
pull_request:
|
|
10
|
+
branches: [ master ]
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
build:
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
env:
|
|
16
|
+
MOZ_HEADLESS: 1
|
|
17
|
+
strategy:
|
|
18
|
+
matrix:
|
|
19
|
+
node-version: [ 20.x, 22.x, 24.x ]
|
|
20
|
+
firefox: [ 'latest' ]
|
|
21
|
+
steps:
|
|
22
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
23
|
+
uses: actions/setup-node@v2
|
|
24
|
+
with:
|
|
25
|
+
node-version: ${{ matrix.node-version }}
|
|
26
|
+
- name: Setup Firefox ${{ matrix.firefox }}
|
|
27
|
+
uses: browser-actions/setup-firefox@latest
|
|
28
|
+
with:
|
|
29
|
+
firefox-version: ${{ matrix.firefox }}
|
|
30
|
+
- name: Checkout ${{ env.GITHUB_REPOSITORY }}
|
|
31
|
+
uses: actions/checkout@v2
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: npm ci
|
|
34
|
+
- name: Release
|
|
35
|
+
run: npm run build && npm run lint && npm run tests:run
|
|
36
|
+
|
|
37
|
+
publish:
|
|
38
|
+
needs: build
|
|
39
|
+
runs-on: ubuntu-latest
|
|
40
|
+
permissions:
|
|
41
|
+
id-token: write
|
|
42
|
+
contents: write
|
|
43
|
+
env:
|
|
44
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
45
|
+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
46
|
+
steps:
|
|
47
|
+
- name: Use Node.js ${{ matrix.node-version }}
|
|
48
|
+
uses: actions/setup-node@v2
|
|
49
|
+
with:
|
|
50
|
+
node-version: "lts/*"
|
|
51
|
+
- name: Checkout ${{ env.GITHUB_REPOSITORY }}
|
|
52
|
+
uses: actions/checkout@v2
|
|
53
|
+
- name: Install dependencies
|
|
54
|
+
run: npm ci
|
|
55
|
+
- name: Semantic Release
|
|
56
|
+
run: npm run clean && npm run lint && npm run doc && npm run build && npx semantic-release
|
package/.releaserc.mjs
ADDED
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { execSync } from 'node:child_process'
|
|
2
|
+
|
|
3
|
+
// Git utils
|
|
4
|
+
|
|
5
|
+
function getLocalRepoUrl() {
|
|
6
|
+
const topLevelDir = execSync( 'git rev-parse --show-toplevel' )
|
|
7
|
+
.toString()
|
|
8
|
+
.trim()
|
|
9
|
+
|
|
10
|
+
return `file://${ topLevelDir }/.git`
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
function getCurrentBranch() {
|
|
14
|
+
return execSync( 'git rev-parse --abbrev-ref HEAD' )
|
|
15
|
+
.toString()
|
|
16
|
+
.trim()
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Plugins sub-configs
|
|
20
|
+
|
|
21
|
+
function getGitmojiPlugin() {
|
|
22
|
+
return [
|
|
23
|
+
'semantic-release-gitmoji', {
|
|
24
|
+
'releaseRules': {
|
|
25
|
+
'major': [
|
|
26
|
+
':boom:'
|
|
27
|
+
],
|
|
28
|
+
'minor': [
|
|
29
|
+
':sparkles:'
|
|
30
|
+
],
|
|
31
|
+
'patch': [
|
|
32
|
+
':art:', ':zap:', ':fire:', ':bug:', ':ambulance:', ':pencil:', ':rocket:', ':lipstick:', ':white_check_mark:', ':lock:', ':apple:', ':penguin:', ':checkered_flag:', ':robot:',
|
|
33
|
+
':green_apple:', ':rotating_light:', ':green_heart:', ':arrow_down:', ':pushpin:', ':construction_worker:', ':chart_with_upwards_trend:', ':recycle:', ':whale:',
|
|
34
|
+
':heavy_plus_sign:', ':heavy_minus_sign:', ':wrench:', ':globe_with_meridians:', ':pencil2:', ':poop:', ':rewind:', ':package:', ':alien:', ':truck:', ':page_facing_up:',
|
|
35
|
+
':bento:', ':ok_hand:', ':wheelchair:', ':bulb:', ':beers:', ':speech_balloon:', ':card_file_box:', ':loud_sound:', ':mute:', ':busts_in_silhouette:', ':children_crossing:',
|
|
36
|
+
':building_construction:', ':iphone:', ':clown_face:', ':see_no_evil:', ':camera_flash:', ':alembic:', ':mag:', ':wheel_of_dharma:', ':label:', ':seedling:', ':dizzy:',
|
|
37
|
+
':wastebasket:', ':passport_control:', ':adhesive_bandage:', ':monocle_face:', ':coffin:', ':test_tube:', ':necktie:', ':stethoscope:', ':bricks:', ':technologist:'
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
]
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
function getChangelogPlugin() {
|
|
45
|
+
return '@semantic-release/changelog'
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function getNpmPlugin() {
|
|
49
|
+
return '@semantic-release/npm'
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function getGithubPlugin() {
|
|
53
|
+
return '@semantic-release/github'
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function getGitPlugin() {
|
|
57
|
+
return [
|
|
58
|
+
'@semantic-release/git', {
|
|
59
|
+
'assets': [
|
|
60
|
+
'builds/**', 'docs/**', 'package.json', 'CHANGELOG.md'
|
|
61
|
+
],
|
|
62
|
+
'message': 'chore(release): v${nextRelease.version}'
|
|
63
|
+
}
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
// Configuration selection
|
|
68
|
+
|
|
69
|
+
function isDryRun() {
|
|
70
|
+
return process.argv.includes( '--dry-run' )
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
function getDryRunConfig() {
|
|
74
|
+
return {
|
|
75
|
+
repositoryUrl: getLocalRepoUrl(),
|
|
76
|
+
branches: getCurrentBranch(),
|
|
77
|
+
plugins: [
|
|
78
|
+
getGitmojiPlugin()
|
|
79
|
+
],
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function getCIConfig() {
|
|
84
|
+
return {
|
|
85
|
+
branch: 'master',
|
|
86
|
+
plugins: [
|
|
87
|
+
getGitmojiPlugin(), getChangelogPlugin(), getNpmPlugin(), getGithubPlugin(), getGitPlugin()
|
|
88
|
+
]
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// Module
|
|
93
|
+
|
|
94
|
+
export default isDryRun() ? getDryRunConfig() : getCIConfig()
|
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# [v1.0.3](https://github.com/Itee/itee-tasks/compare/v1.0.2...v1.0.3) (2026-01-13)
|
|
2
|
+
|
|
3
|
+
# [v1.0.2](https://github.com/Itee/itee-tasks/compare/v1.0.1...v1.0.2) (2026-01-13)
|
|
4
|
+
|
|
5
|
+
# [v1.0.1](https://github.com/Itee/itee-tasks/compare/v1.0.0...v1.0.1) (2026-01-13)
|
|
6
|
+
|
|
7
|
+
## 🐛 Bug Fixes
|
|
8
|
+
- [`7caa5dc`](https://github.com/Itee/itee-tasks/commit/7caa5dc) (package) apply npm pkg fix
|
|
9
|
+
|
|
10
|
+
# v1.0.0 (2026-01-13)
|
|
11
|
+
|
|
12
|
+
## ✨ New Features
|
|
13
|
+
- [`77611b0`](https://github.com/Itee/itee-tasks/commit/77611b0) (utils) export utils stuff
|
|
14
|
+
|
|
15
|
+
## 🐛 Bug Fixes
|
|
16
|
+
- [`9f2219f`](https://github.com/Itee/itee-tasks/commit/9f2219f) (package) fix main entry point
|
|
17
|
+
- [`b23da82`](https://github.com/Itee/itee-tasks/commit/b23da82) (package) fix entry point again
|
|
18
|
+
- [`df4e770`](https://github.com/Itee/itee-tasks/commit/df4e770) (refresh) fix config file name
|
|
19
|
+
- [`c59293d`](https://github.com/Itee/itee-tasks/commit/c59293d) (compute-unit-tests) fix missing definition of cyan color
|
|
20
|
+
- [`0136cd5`](https://github.com/Itee/itee-tasks/commit/0136cd5) (utils) fix wrong variable name
|
|
21
|
+
- [`66b05dc`](https://github.com/Itee/itee-tasks/commit/66b05dc) (utils) fix wrong variable name again
|
|
22
|
+
- [`6b15261`](https://github.com/Itee/itee-tasks/commit/6b15261) (config) add missing config for refreshing tasks
|
|
23
|
+
- [`992a56f`](https://github.com/Itee/itee-tasks/commit/992a56f) (refresh) remove deleted patch task from available task list
|
|
24
|
+
- [`52ee2a5`](https://github.com/Itee/itee-tasks/commit/52ee2a5) (utils) fix undefined argument usage
|
|
25
|
+
- [`406189e`](https://github.com/Itee/itee-tasks/commit/406189e) (global) try to fix async bug on module load
|
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# itee-tasks
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default []
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default []
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import js from '@eslint/js'
|
|
2
|
+
import mocha from 'eslint-plugin-mocha'
|
|
3
|
+
import {
|
|
4
|
+
defineConfig,
|
|
5
|
+
globalIgnores
|
|
6
|
+
} from 'eslint/config'
|
|
7
|
+
|
|
8
|
+
export default defineConfig( [
|
|
9
|
+
globalIgnores( [
|
|
10
|
+
'.github',
|
|
11
|
+
'.idea',
|
|
12
|
+
'builds',
|
|
13
|
+
'docs'
|
|
14
|
+
] ),
|
|
15
|
+
{
|
|
16
|
+
linterOptions: {
|
|
17
|
+
noInlineConfig: false,
|
|
18
|
+
reportUnusedDisableDirectives: 'error',
|
|
19
|
+
reportUnusedInlineConfigs: 'error'
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'sources',
|
|
24
|
+
files: [ 'sources/**/*.js' ],
|
|
25
|
+
ignores: [],
|
|
26
|
+
plugins: { js },
|
|
27
|
+
extends: [ 'js/recommended' ],
|
|
28
|
+
rules: {
|
|
29
|
+
'no-multiple-empty-lines': [
|
|
30
|
+
'error',
|
|
31
|
+
{
|
|
32
|
+
'max': 2
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
'no-mixed-spaces-and-tabs': 'error',
|
|
36
|
+
'no-console': 'warn',
|
|
37
|
+
'no-unused-vars': 'error',
|
|
38
|
+
'no-multi-spaces': [
|
|
39
|
+
'error',
|
|
40
|
+
{
|
|
41
|
+
'exceptions': {
|
|
42
|
+
'Property': true,
|
|
43
|
+
'ImportDeclaration': true,
|
|
44
|
+
'VariableDeclarator': true,
|
|
45
|
+
'AssignmentExpression': true
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
],
|
|
49
|
+
'key-spacing': [
|
|
50
|
+
'error',
|
|
51
|
+
{
|
|
52
|
+
'align': {
|
|
53
|
+
'beforeColon': false,
|
|
54
|
+
'afterColon': true,
|
|
55
|
+
'on': 'value'
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'tests/benchmarks',
|
|
63
|
+
files: [ 'tests/benchmarks/**/*.js' ],
|
|
64
|
+
ignores: [ 'tests/benchmarks/builds/*' ],
|
|
65
|
+
plugins: { js },
|
|
66
|
+
extends: [ 'js/recommended' ],
|
|
67
|
+
languageOptions: {
|
|
68
|
+
globals: {
|
|
69
|
+
Benchmark: 'readonly'
|
|
70
|
+
},
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'tests/units',
|
|
75
|
+
files: [ 'tests/units/**/*.mjs' ],
|
|
76
|
+
ignores: [ 'tests/units/builds/*' ],
|
|
77
|
+
plugins: { js },
|
|
78
|
+
extends: [ 'js/recommended' ],
|
|
79
|
+
languageOptions: {
|
|
80
|
+
globals: {
|
|
81
|
+
describe: 'readonly',
|
|
82
|
+
it: 'readonly',
|
|
83
|
+
},
|
|
84
|
+
}
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
files: [ 'tests/units/**/*.mjs' ],
|
|
88
|
+
ignores: [ 'tests/units/builds/*' ],
|
|
89
|
+
...mocha.configs.recommended,
|
|
90
|
+
}
|
|
91
|
+
] )
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default []
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { glob } from 'glob'
|
|
2
|
+
import {
|
|
3
|
+
basename,
|
|
4
|
+
join,
|
|
5
|
+
normalize
|
|
6
|
+
} from 'path'
|
|
7
|
+
import {
|
|
8
|
+
packageName,
|
|
9
|
+
packageSourcesDirectory
|
|
10
|
+
} from '../../../sources/_utils.mjs'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const filePathsToIgnore = [
|
|
14
|
+
`${ packageName }.js`
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
export default glob.sync( join( packageSourcesDirectory, '**' ) )
|
|
18
|
+
.map( filePath => normalize( filePath ) )
|
|
19
|
+
.filter( filePath => {
|
|
20
|
+
const fileName = basename( filePath )
|
|
21
|
+
const isJsFile = fileName.endsWith( '.js' )
|
|
22
|
+
const isNotPrivateFile = !fileName.startsWith( '_' )
|
|
23
|
+
const isNotIgnoredFile = !filePathsToIgnore.includes( fileName )
|
|
24
|
+
return isJsFile && isNotPrivateFile && isNotIgnoredFile
|
|
25
|
+
} )
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { jsonReporter } from '@itee/json-reporter'
|
|
2
|
+
import { playwrightLauncher } from '@web/test-runner-playwright'
|
|
3
|
+
import { join } from 'node:path'
|
|
4
|
+
import { iteePackageNodeModulesDirectory } from '../../../sources/_utils.mjs'
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
files: [
|
|
9
|
+
'tests/benchmarks/**/*.bench.js',
|
|
10
|
+
'!tests/benchmarks/builds/**',
|
|
11
|
+
],
|
|
12
|
+
debug: false,
|
|
13
|
+
nodeResolve: true,
|
|
14
|
+
browsers: [
|
|
15
|
+
playwrightLauncher( { product: 'chromium' } ),
|
|
16
|
+
playwrightLauncher( { product: 'webkit' } ),
|
|
17
|
+
playwrightLauncher( { product: 'firefox' } ),
|
|
18
|
+
],
|
|
19
|
+
testFramework: {
|
|
20
|
+
path: join( iteePackageNodeModulesDirectory, '@itee/benchmarks-framework/benchmarks-framework.js' ),
|
|
21
|
+
config: {
|
|
22
|
+
foo: 'bar'
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
testRunnerHtml: testFramework => `
|
|
26
|
+
<!DOCTYPE html>
|
|
27
|
+
<html>
|
|
28
|
+
<body>
|
|
29
|
+
<script type="module" src="node_modules/lodash/lodash.js"></script>
|
|
30
|
+
<script type="module" src="node_modules/platform/platform.js"></script>
|
|
31
|
+
<script type="module" src="node_modules/benchmark/benchmark.js"></script>
|
|
32
|
+
<script type="module" src="${ testFramework }"></script>
|
|
33
|
+
</body>
|
|
34
|
+
</html>
|
|
35
|
+
`,
|
|
36
|
+
reporters: [
|
|
37
|
+
jsonReporter( {
|
|
38
|
+
reportProgress: true
|
|
39
|
+
} )
|
|
40
|
+
]
|
|
41
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { join } from 'path'
|
|
2
|
+
import { iteePackageSourcesDirectory } from '../../../sources/_utils.mjs'
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
join( iteePackageSourcesDirectory, 'tests/benchmarks/run-benchmarks-for-backend.task.mjs' ),
|
|
6
|
+
join( iteePackageSourcesDirectory, 'tests/benchmarks/run-benchmarks-for-frontend.task.mjs' )
|
|
7
|
+
]
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import nodeResolve from '@rollup/plugin-node-resolve'
|
|
2
|
+
import cleanup from 'rollup-plugin-cleanup'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
input: null,
|
|
6
|
+
external: [ '' ],
|
|
7
|
+
plugins: [
|
|
8
|
+
nodeResolve( {
|
|
9
|
+
preferBuiltins: true
|
|
10
|
+
} ),
|
|
11
|
+
cleanup( {
|
|
12
|
+
comments: 'all' // else remove __PURE__ declaration... -_-'
|
|
13
|
+
} )
|
|
14
|
+
],
|
|
15
|
+
onwarn: ( {
|
|
16
|
+
loc,
|
|
17
|
+
frame,
|
|
18
|
+
message
|
|
19
|
+
} ) => {
|
|
20
|
+
|
|
21
|
+
// Ignore some errors
|
|
22
|
+
if ( message.includes( 'Circular dependency' ) ) { return }
|
|
23
|
+
if ( message.includes( 'Generated an empty chunk' ) ) { return }
|
|
24
|
+
|
|
25
|
+
if ( loc ) {
|
|
26
|
+
process.stderr.write( `/!\\ ${ loc.file } (${ loc.line }:${ loc.column }) ${ frame } ${ message }\n` )
|
|
27
|
+
} else {
|
|
28
|
+
process.stderr.write( `/!\\ ${ message }\n` )
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
},
|
|
32
|
+
treeshake: {
|
|
33
|
+
moduleSideEffects: true,
|
|
34
|
+
annotations: true,
|
|
35
|
+
correctVarValueBeforeDeclaration: true,
|
|
36
|
+
propertyReadSideEffects: true,
|
|
37
|
+
tryCatchDeoptimization: true,
|
|
38
|
+
unknownGlobalSideEffects: true
|
|
39
|
+
},
|
|
40
|
+
output: {
|
|
41
|
+
indent: '\t',
|
|
42
|
+
format: 'esm',
|
|
43
|
+
file: null
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import nodeResolve from '@rollup/plugin-node-resolve'
|
|
2
|
+
import cleanup from 'rollup-plugin-cleanup'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
input: null,
|
|
6
|
+
external: [ '' ],
|
|
7
|
+
plugins: [
|
|
8
|
+
nodeResolve( {
|
|
9
|
+
preferBuiltins: true
|
|
10
|
+
} ),
|
|
11
|
+
cleanup( {
|
|
12
|
+
comments: 'none'
|
|
13
|
+
} )
|
|
14
|
+
],
|
|
15
|
+
onwarn: ( {
|
|
16
|
+
loc,
|
|
17
|
+
frame,
|
|
18
|
+
message
|
|
19
|
+
} ) => {
|
|
20
|
+
|
|
21
|
+
// Ignore some errors
|
|
22
|
+
if ( message.includes( 'Circular dependency' ) ) { return }
|
|
23
|
+
if ( message.includes( 'Generated an empty chunk' ) ) { return }
|
|
24
|
+
|
|
25
|
+
if ( loc ) {
|
|
26
|
+
process.stderr.write( `/!\\ ${ loc.file } (${ loc.line }:${ loc.column }) ${ frame } ${ message }\n` )
|
|
27
|
+
} else {
|
|
28
|
+
process.stderr.write( `/!\\ ${ message }\n` )
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
},
|
|
32
|
+
treeshake: {
|
|
33
|
+
moduleSideEffects: true,
|
|
34
|
+
annotations: true,
|
|
35
|
+
correctVarValueBeforeDeclaration: true,
|
|
36
|
+
propertyReadSideEffects: true,
|
|
37
|
+
tryCatchDeoptimization: true,
|
|
38
|
+
unknownGlobalSideEffects: true
|
|
39
|
+
},
|
|
40
|
+
output: {
|
|
41
|
+
indent: '\t',
|
|
42
|
+
format: 'esm',
|
|
43
|
+
file: null
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import nodeResolve from '@rollup/plugin-node-resolve'
|
|
2
|
+
import cleanup from 'rollup-plugin-cleanup'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
input: null,
|
|
6
|
+
plugins: [
|
|
7
|
+
nodeResolve(),
|
|
8
|
+
cleanup( {
|
|
9
|
+
comments: 'all' // else remove __PURE__ declaration... -_-'
|
|
10
|
+
} )
|
|
11
|
+
],
|
|
12
|
+
onwarn: ( {
|
|
13
|
+
loc,
|
|
14
|
+
frame,
|
|
15
|
+
message
|
|
16
|
+
} ) => {
|
|
17
|
+
|
|
18
|
+
// Ignore some errors
|
|
19
|
+
if ( message.includes( 'Circular dependency' ) ) { return }
|
|
20
|
+
if ( message.includes( 'Generated an empty chunk' ) ) { return }
|
|
21
|
+
|
|
22
|
+
if ( loc ) {
|
|
23
|
+
process.stderr.write( `/!\\ ${ loc.file } (${ loc.line }:${ loc.column }) ${ frame } ${ message }\n` )
|
|
24
|
+
} else {
|
|
25
|
+
process.stderr.write( `/!\\ ${ message }\n` )
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
},
|
|
29
|
+
treeshake: {
|
|
30
|
+
moduleSideEffects: true,
|
|
31
|
+
annotations: true,
|
|
32
|
+
correctVarValueBeforeDeclaration: true,
|
|
33
|
+
propertyReadSideEffects: true,
|
|
34
|
+
tryCatchDeoptimization: true,
|
|
35
|
+
unknownGlobalSideEffects: true
|
|
36
|
+
},
|
|
37
|
+
output: {
|
|
38
|
+
indent: '\t',
|
|
39
|
+
format: 'esm',
|
|
40
|
+
file: null
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { glob } from 'glob'
|
|
2
|
+
import {
|
|
3
|
+
basename,
|
|
4
|
+
join,
|
|
5
|
+
normalize
|
|
6
|
+
} from 'path'
|
|
7
|
+
import {
|
|
8
|
+
packageName,
|
|
9
|
+
packageSourcesDirectory
|
|
10
|
+
} from '../../../sources/_utils.mjs'
|
|
11
|
+
|
|
12
|
+
const pattern = join( packageSourcesDirectory, '**' )
|
|
13
|
+
const filePathsToIgnore = [
|
|
14
|
+
`${ packageName }.js`
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
export default glob.sync( pattern )
|
|
18
|
+
.map( filePath => normalize( filePath ) )
|
|
19
|
+
.filter( filePath => {
|
|
20
|
+
const fileName = basename( filePath )
|
|
21
|
+
const isJsFile = fileName.endsWith( '.js' )
|
|
22
|
+
const isNotPrivateFile = !fileName.startsWith( '_' )
|
|
23
|
+
const isNotIgnoredFile = !filePathsToIgnore.includes( fileName )
|
|
24
|
+
return isJsFile && isNotPrivateFile && isNotIgnoredFile
|
|
25
|
+
} )
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { glob } from 'glob'
|
|
2
|
+
import {
|
|
3
|
+
basename,
|
|
4
|
+
join,
|
|
5
|
+
normalize
|
|
6
|
+
} from 'path'
|
|
7
|
+
import {
|
|
8
|
+
packageName,
|
|
9
|
+
packageSourcesDirectory
|
|
10
|
+
} from '../../../sources/_utils.mjs'
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
const filePathsToIgnore = [
|
|
14
|
+
`${ packageName }.js`
|
|
15
|
+
]
|
|
16
|
+
|
|
17
|
+
export default glob.sync( join( packageSourcesDirectory, '**' ) )
|
|
18
|
+
.map( filePath => normalize( filePath ) )
|
|
19
|
+
.filter( filePath => {
|
|
20
|
+
const fileName = basename( filePath )
|
|
21
|
+
const isJsFile = fileName.endsWith( '.js' )
|
|
22
|
+
const isNotPrivateFile = !fileName.startsWith( '_' )
|
|
23
|
+
const isNotIgnoredFile = !filePathsToIgnore.includes( fileName )
|
|
24
|
+
return isJsFile && isNotPrivateFile && isNotIgnoredFile
|
|
25
|
+
} )
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { playwrightLauncher } from '@web/test-runner-playwright'
|
|
2
|
+
|
|
3
|
+
export default {
|
|
4
|
+
files: [
|
|
5
|
+
'tests/units/**/*.unit.mjs',
|
|
6
|
+
'!tests/units/builds/**',
|
|
7
|
+
],
|
|
8
|
+
debug: false,
|
|
9
|
+
nodeResolve: true,
|
|
10
|
+
browsers: [
|
|
11
|
+
playwrightLauncher( { product: 'chromium' } ),
|
|
12
|
+
playwrightLauncher( { product: 'webkit' } ),
|
|
13
|
+
playwrightLauncher( { product: 'firefox' } ),
|
|
14
|
+
]
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { join } from 'path'
|
|
2
|
+
import { iteePackageSourcesDirectory } from '../../../sources/_utils.mjs'
|
|
3
|
+
|
|
4
|
+
export default [
|
|
5
|
+
join( iteePackageSourcesDirectory, 'tests/units/run-unit-tests-for-backend.task.mjs' ),
|
|
6
|
+
join( iteePackageSourcesDirectory, 'tests/units/run-unit-tests-for-frontend.task.mjs' )
|
|
7
|
+
]
|
package/gulpfile.mjs
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file is auto-generated by internal gulp command.
|
|
3
|
+
* If you want to customize the available gulp tasks, create your own in .tasks folder
|
|
4
|
+
* and run "gulp refresh"
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// Default Itee tasks
|
|
8
|
+
export * from './sources/tests/run-tests.task.mjs'
|
|
9
|
+
export * from './sources/tests/units/run-unit-tests.task.mjs'
|
|
10
|
+
export * from './sources/tests/units/run-unit-tests-for-frontend.task.mjs'
|
|
11
|
+
export * from './sources/tests/units/run-unit-tests-for-backend.task.mjs'
|
|
12
|
+
export * from './sources/tests/units/compute-unit-tests.task.mjs'
|
|
13
|
+
export * from './sources/tests/bundlings/check-bundling.task.mjs'
|
|
14
|
+
export * from './sources/tests/bundlings/check-bundling-from-esm-files-import.task.mjs'
|
|
15
|
+
export * from './sources/tests/bundlings/check-bundling-from-esm-files-direct.task.mjs'
|
|
16
|
+
export * from './sources/tests/bundlings/check-bundling-from-esm-build-import.task.mjs'
|
|
17
|
+
export * from './sources/tests/benchmarks/run-benchmarks.task.mjs'
|
|
18
|
+
export * from './sources/tests/benchmarks/run-benchmarks-for-frontend.task.mjs'
|
|
19
|
+
export * from './sources/tests/benchmarks/run-benchmarks-for-backend.task.mjs'
|
|
20
|
+
export * from './sources/tests/benchmarks/compute-benchmarks.task.mjs'
|
|
21
|
+
export * from './sources/releases/release.task.mjs'
|
|
22
|
+
export * from './sources/lints/lint.task.mjs'
|
|
23
|
+
export * from './sources/helps/help.task.mjs'
|
|
24
|
+
export * from './sources/docs/doc.task.mjs'
|
|
25
|
+
export * from './sources/cleans/clean.task.mjs'
|
|
26
|
+
export * from './sources/builds/build.task.mjs'
|
|
27
|
+
|
|
28
|
+
// User defined tasks
|