@centreon/js-config 23.10.1-wait-on-task.0 → 23.10.1-wait-on-task.1

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.
@@ -248,8 +248,6 @@ Cypress.Commands.add(
248
248
 
249
249
  const image = `docker.centreon.com/centreon/centreon-web${slimSuffix}-${os}:${version}`;
250
250
 
251
- cy.setUserTokenApiV1();
252
-
253
251
  return cy
254
252
  .startContainer({
255
253
  image,
@@ -7,49 +7,20 @@ import { execSync } from 'child_process';
7
7
 
8
8
  import Docker from 'dockerode';
9
9
  import { addCucumberPreprocessorPlugin } from '@badeball/cypress-cucumber-preprocessor';
10
- import webpackPreprocessor from '@cypress/webpack-preprocessor';
10
+ import createBundler from '@bahmutov/cypress-esbuild-preprocessor';
11
+ import createEsbuildPlugin from '@badeball/cypress-cucumber-preprocessor/esbuild';
11
12
 
12
13
  const docker = new Docker();
13
14
 
14
- const getWebpackOptions = (config): object => {
15
- return {
16
- module: {
17
- rules: [
18
- {
19
- exclude: [/node_modules/],
20
- test: /\.ts?$/,
21
- use: [
22
- {
23
- loader: 'swc-loader'
24
- }
25
- ]
26
- },
27
- {
28
- test: /\.feature$/,
29
- use: [
30
- {
31
- loader: '@badeball/cypress-cucumber-preprocessor/webpack',
32
- options: config
33
- }
34
- ]
35
- }
36
- ]
37
- },
38
- resolve: {
39
- extensions: ['.ts', '.js']
40
- }
41
- };
42
- };
43
-
44
15
  export default async (on, config): Promise<void> => {
45
16
  await addCucumberPreprocessorPlugin(on, config);
46
17
 
47
- const webpackOptions = await getWebpackOptions(config);
48
- const options = {
49
- webpackOptions
50
- };
51
-
52
- on('file:preprocessor', webpackPreprocessor(options));
18
+ on(
19
+ 'file:preprocessor',
20
+ createBundler({
21
+ plugins: [createEsbuildPlugin(config)]
22
+ })
23
+ );
53
24
 
54
25
  on('before:browser:launch', (browser = {}, launchOptions) => {
55
26
  const width = 1920;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@centreon/js-config",
3
3
  "description": "Centreon Frontend shared build configuration",
4
- "version": "23.10.1-wait-on-task.0",
4
+ "version": "23.10.1-wait-on-task.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "git+https://github.com/centreon/centreon-frontend.git"
@@ -16,9 +16,11 @@
16
16
  "url": "https://github.com/centreon/centreon-frontend/issues"
17
17
  },
18
18
  "devDependencies": {
19
- "@badeball/cypress-cucumber-preprocessor": "^14.0.0",
19
+ "@badeball/cypress-cucumber-preprocessor": "^18.0.5",
20
+ "@bahmutov/cypress-esbuild-preprocessor": "^2.2.0",
20
21
  "@tsconfig/node16": "^1.0.4",
21
- "@types/dockerode": "^3.3.16",
22
+ "@types/cypress-cucumber-preprocessor": "^4.0.2",
23
+ "@types/dockerode": "^3.3.19",
22
24
  "dockerode": "^3.3.5",
23
25
  "eslint": "^8.17.0",
24
26
  "eslint-config-airbnb": "19.0.4",