@vitus-labs/tools-rollup 1.9.1-alpha.14 → 1.9.1-alpha.16
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 +4 -4
- package/src/config/baseConfig.test.ts +42 -42
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitus-labs/tools-rollup",
|
|
3
|
-
"version": "1.9.1-alpha.
|
|
3
|
+
"version": "1.9.1-alpha.16+2c21fea",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@rollup/plugin-terser": "^0.4.4",
|
|
44
44
|
"@rollup/plugin-typescript": "^12.3.0",
|
|
45
45
|
"@types/node": "^25.3.0",
|
|
46
|
-
"@vitus-labs/tools-core": "1.9.1-alpha.
|
|
46
|
+
"@vitus-labs/tools-core": "1.9.1-alpha.16+2c21fea",
|
|
47
47
|
"chalk": "^5.6.2",
|
|
48
48
|
"find-up": "^8.0.0",
|
|
49
49
|
"lodash-es": "^4.17.23",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@types/lodash-es": "^4.17.12",
|
|
64
|
-
"@vitus-labs/tools-typescript": "1.9.1-alpha.
|
|
64
|
+
"@vitus-labs/tools-typescript": "1.9.1-alpha.16+2c21fea",
|
|
65
65
|
"typescript": "^5.9.3"
|
|
66
66
|
},
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "2c21feaf2a9df027284253bd1a9e9d67f1238eb3"
|
|
68
68
|
}
|
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { describe, expect, it } from 'vitest'
|
|
2
|
-
import
|
|
2
|
+
import baseConfig from './baseConfig'
|
|
3
3
|
|
|
4
4
|
describe('baseConfig', () => {
|
|
5
|
-
it('should have correct
|
|
6
|
-
expect(
|
|
7
|
-
expect(
|
|
8
|
-
expect(
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
it('should have typescript enabled
|
|
12
|
-
expect(
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
it('should
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
5
|
+
it('should have correct directory settings', () => {
|
|
6
|
+
expect(baseConfig.sourceDir).toBe('src')
|
|
7
|
+
expect(baseConfig.outputDir).toBe('lib')
|
|
8
|
+
expect(baseConfig.typesDir).toBe('lib/types')
|
|
9
|
+
})
|
|
10
|
+
|
|
11
|
+
it('should have typescript enabled', () => {
|
|
12
|
+
expect(baseConfig.typescript).toBe(true)
|
|
13
|
+
})
|
|
14
|
+
|
|
15
|
+
it('should include all expected file extensions', () => {
|
|
16
|
+
const expectedExtensions = [
|
|
17
|
+
'.json',
|
|
18
|
+
'.js',
|
|
19
|
+
'.jsx',
|
|
20
|
+
'.ts',
|
|
21
|
+
'.tsx',
|
|
22
|
+
'.es6',
|
|
23
|
+
'.es',
|
|
24
|
+
'.mjs',
|
|
25
|
+
]
|
|
26
|
+
expect(baseConfig.extensions).toEqual(expectedExtensions)
|
|
27
|
+
})
|
|
28
|
+
|
|
29
|
+
it('should exclude test patterns', () => {
|
|
30
|
+
expect(baseConfig.exclude).toContain('**/__tests__/**')
|
|
31
|
+
expect(baseConfig.exclude).toContain('**/__specs__/**')
|
|
32
|
+
expect(baseConfig.exclude).toContain('**/__stories__/**')
|
|
33
|
+
expect(baseConfig.exclude).toContain('*.test.*')
|
|
34
|
+
expect(baseConfig.exclude).toContain('*.spec.*')
|
|
35
|
+
expect(baseConfig.exclude).toContain('*.stories.*')
|
|
36
|
+
expect(baseConfig.exclude).toContain('*.story.*')
|
|
37
|
+
})
|
|
38
|
+
|
|
39
|
+
it('should define globals for react, ReactDOM, and styled', () => {
|
|
40
|
+
expect(baseConfig.globals).toEqual({
|
|
41
|
+
react: 'React',
|
|
42
|
+
ReactDOM: 'react-dom',
|
|
43
|
+
styled: 'styled-components',
|
|
31
44
|
})
|
|
32
45
|
})
|
|
33
46
|
|
|
34
|
-
it('should
|
|
35
|
-
expect(
|
|
36
|
-
})
|
|
37
|
-
|
|
38
|
-
it('should have default globals', () => {
|
|
39
|
-
expect(config.globals).toHaveProperty('react', 'React')
|
|
40
|
-
})
|
|
41
|
-
|
|
42
|
-
it('should have external dependencies', () => {
|
|
43
|
-
expect(config.external).toContain('react/jsx-runtime')
|
|
44
|
-
})
|
|
45
|
-
|
|
46
|
-
it('should have exclude patterns', () => {
|
|
47
|
-
expect(config.exclude).toContain('node_modules/**')
|
|
48
|
-
expect(config.exclude).toContain('**/__tests__/**')
|
|
47
|
+
it('should include react/jsx-runtime as external', () => {
|
|
48
|
+
expect(baseConfig.external).toContain('react/jsx-runtime')
|
|
49
49
|
})
|
|
50
50
|
})
|