@justeattakeaway/pie-components-config 0.6.1 → 0.8.0

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.
@@ -0,0 +1,15 @@
1
+ import { moduleFileExtensionsPlugin } from 'cem-plugin-module-file-extensions';
2
+
3
+ export default {
4
+ globs: [
5
+ './src/**/!(*.css).ts',
6
+ ],
7
+ exclude: [
8
+ '**/*.d.ts',
9
+ '**/*.d.js',
10
+ '**/react.ts',
11
+ '**/test/**',
12
+ '**/node_modules/**',
13
+ ],
14
+ plugins: [moduleFileExtensionsPlugin()],
15
+ };
package/package.json CHANGED
@@ -1,12 +1,19 @@
1
1
  {
2
2
  "name": "@justeattakeaway/pie-components-config",
3
- "version": "0.6.1",
3
+ "version": "0.8.0",
4
4
  "main": "index.js",
5
5
  "type": "module",
6
+ "author": "Just Eat Takeaway.com - Design System Team",
6
7
  "description": "Shared configuration files for PIE components",
8
+ "files": [
9
+ "custom-elements-manifest.config.js"
10
+ ],
7
11
  "dependencies": {
8
12
  "deepmerge-ts": "5.1.0"
9
13
  },
14
+ "peerDependencies": {
15
+ "cem-plugin-module-file-extensions": "0.0.5"
16
+ },
10
17
  "volta": {
11
18
  "extends": "../../package.json"
12
19
  }
package/CHANGELOG.md DELETED
@@ -1,45 +0,0 @@
1
- # @justeattakeaway/pie-components-config
2
-
3
- ## 0.6.1
4
-
5
- ### Patch Changes
6
-
7
- - [Changed] - Improve variable name and exclude webc-core from the bundle by default ([#1037](https://github.com/justeattakeaway/pie/pull/1037)) by [@xander-marjoram](https://github.com/xander-marjoram)
8
-
9
- ## 0.6.0
10
-
11
- ### Minor Changes
12
-
13
- - [Changed] - Automatically read component dependencies from package.json ([#988](https://github.com/justeattakeaway/pie/pull/988)) by [@xander-marjoram](https://github.com/xander-marjoram)
14
-
15
- ## 0.5.0
16
-
17
- ### Minor Changes
18
-
19
- - [Changed] - Allow more specific overrides in vite config ([#980](https://github.com/justeattakeaway/pie/pull/980)) by [@xander-marjoram](https://github.com/xander-marjoram)
20
-
21
- [Changed] - Component dependencies are the only JET packages that should be marked as external
22
-
23
- ## 0.4.0
24
-
25
- ### Minor Changes
26
-
27
- - [Added] vite config setting to exclude react from wrapper. ([#732](https://github.com/justeattakeaway/pie/pull/732)) by [@kevinrodrigues](https://github.com/kevinrodrigues)
28
-
29
- ## 0.3.0
30
-
31
- ### Minor Changes
32
-
33
- - [Updated] - Export all of `defs.ts` file from component `index.ts` files ([#722](https://github.com/justeattakeaway/pie/pull/722)) by [@jamieomaguire](https://github.com/jamieomaguire)
34
-
35
- ## 0.2.0
36
-
37
- ### Minor Changes
38
-
39
- - [Changed] - Made Vite config extendable ([#514](https://github.com/justeattakeaway/pie/pull/514)) by [@ashleynolan](https://github.com/ashleynolan)
40
-
41
- ## 0.1.0
42
-
43
- ### Minor Changes
44
-
45
- - [Added] - common components configurations ([#487](https://github.com/justeattakeaway/pie/pull/487)) by [@fernandofranca](https://github.com/fernandofranca)
package/placeholder.ts DELETED
@@ -1 +0,0 @@
1
- // This file exists solely to suppress the "No inputs were found in configuration file." TS warning.
@@ -1,54 +0,0 @@
1
- import { devices } from '@sand4rt/experimental-ct-web';
2
- import path from 'path';
3
-
4
- /**
5
- * See https://playwright.dev/docs/test-configuration
6
- */
7
- export function getPlaywrightConfig () {
8
- return {
9
- /* The base directory, relative to the config file, for snapshot files created with toMatchSnapshot and toHaveScreenshot. */
10
- snapshotDir: './__snapshots__',
11
- /* Maximum time one test can run for. */
12
- timeout: 10 * 1000,
13
- /* Run tests in files in parallel */
14
- fullyParallel: true,
15
- /* Fail the build on CI if you accidentally left test.only in the source code. */
16
- forbidOnly: !!process.env.CI,
17
- /* Retry on CI only */
18
- retries: process.env.CI ? 2 : 0,
19
- /* Opt out of parallel tests on CI. */
20
- workers: '50%',
21
- /* Reporter to use. See https://playwright.dev/docs/test-reporters */
22
- reporter: [['html', { outputFolder: 'lit-browsers-report' }]],
23
- /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
24
- use: {
25
- ctViteConfig: {
26
- resolve: {
27
- alias: {
28
- '@': path.resolve('./src'),
29
- },
30
- },
31
- },
32
- /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
33
- trace: 'on',
34
- },
35
-
36
- /* Configure projects for major browsers */
37
- projects: [
38
- {
39
- name: 'component:chrome',
40
- use: {
41
- ...devices['Desktop Chrome'],
42
- },
43
- testMatch: ['**/test/component/*.spec.ts'],
44
- },
45
- {
46
- name: 'a11y:chrome',
47
- use: {
48
- ...devices['Desktop Chrome'],
49
- },
50
- testMatch: ['**/test/accessibility/*.spec.ts'],
51
- },
52
- ],
53
- };
54
- }
@@ -1,54 +0,0 @@
1
- import { devices } from '@sand4rt/experimental-ct-web';
2
- import path from 'path';
3
-
4
- /**
5
- * See https://playwright.dev/docs/test-configuration
6
- */
7
- export function getPlaywrightVisualConfig () {
8
- return {
9
- /* Maximum time one test can run for. */
10
- timeout: 10 * 1000,
11
- /* Run tests in files in parallel */
12
- fullyParallel: true,
13
- /* Fail the build on CI if you accidentally left test.only in the source code. */
14
- forbidOnly: !!process.env.CI,
15
- /* Retry on CI only */
16
- retries: process.env.CI ? 2 : 0,
17
- /* Opt out of parallel tests on CI. */
18
- workers: '50%',
19
- /* Reporter to use. See https://playwright.dev/docs/test-reporters */
20
- reporter: [['html', { outputFolder: 'lit-visual-report' }]],
21
- /* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
22
- use: {
23
- ctViteConfig: {
24
- resolve: {
25
- alias: {
26
- '@': path.resolve('./src'),
27
- },
28
- },
29
- },
30
- /* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
31
- trace: 'on',
32
- },
33
-
34
- /* Configure projects for major browsers */
35
- projects: [
36
- {
37
- name: 'visual:desktop',
38
- grepInvert: /@mobile/,
39
- use: {
40
- ...devices['Desktop Chrome'],
41
- },
42
- testMatch: ['**/test/visual/*.spec.ts'],
43
- },
44
- {
45
- name: 'visual:mobile',
46
- grep: /@mobile/,
47
- use: {
48
- ...devices['Pixel 5'],
49
- },
50
- testMatch: ['**/test/visual/*.spec.ts'],
51
- },
52
- ],
53
- };
54
- }
package/tsconfig.json DELETED
@@ -1,31 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES6",
4
- "module": "ES2022",
5
- "lib": ["es2020", "DOM", "DOM.Iterable"],
6
- "declaration": true,
7
- "declarationMap": true,
8
- "sourceMap": true,
9
- "inlineSources": true,
10
- "outDir": "./compiled",
11
- "baseUrl": ".",
12
- "paths": {
13
- "@/*": ["./src/*"]
14
- },
15
- "rootDir": ".",
16
- "strict": true,
17
- "noUnusedLocals": true,
18
- "noUnusedParameters": true,
19
- "noImplicitReturns": true,
20
- "noFallthroughCasesInSwitch": true,
21
- "noImplicitAny": true,
22
- "noImplicitThis": true,
23
- "moduleResolution": "node",
24
- "allowSyntheticDefaultImports": true,
25
- "experimentalDecorators": true,
26
- "forceConsistentCasingInFileNames": true,
27
- "allowImportingTsExtensions": true,
28
- "noEmit": true,
29
- },
30
- "exclude": []
31
- }
package/vite.config.js DELETED
@@ -1,47 +0,0 @@
1
- import { defineConfig } from 'vite';
2
- import dts from 'vite-plugin-dts';
3
-
4
- import { deepmerge } from 'deepmerge-ts';
5
-
6
- const bundledJetDeps = [
7
- '@justeattakeaway/pie-components-config',
8
- '@justeattakeaway/pie-css',
9
- '@justeattakeaway/pie-webc-testing',
10
- ];
11
-
12
- // https://vitejs.dev/config/
13
- const sharedConfig = ({ build = {}, plugins = [], ...rest }) => defineConfig({
14
- build: deepmerge({
15
- lib: {
16
- entry: {
17
- index: 'src/index.ts',
18
- react: 'src/react.ts',
19
- },
20
- formats: ['es'],
21
- },
22
- rollupOptions: {
23
- external: (id) => {
24
- if (['react', '@lit/react'].includes(id) || /^lit/.test(id)) {
25
- return true;
26
- }
27
-
28
- if (id.startsWith('@justeattakeaway/pie-') && !bundledJetDeps.includes(id)) {
29
- console.info(`Excluding ${id} from the bundle`);
30
- return true;
31
- }
32
-
33
- return false;
34
- },
35
- },
36
- }, build),
37
-
38
- plugins: deepmerge([dts({
39
- insertTypesEntry: true,
40
- outputDir: 'dist',
41
- rollupTypes: true,
42
- })], plugins),
43
-
44
- ...rest,
45
- });
46
-
47
- export default sharedConfig;