Skip to content
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .changeset/nice-jeans-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"webtools-cli": patch
"strapi-plugin-webtools": patch
"docs": patch
"webtools-addon-sitemap": patch
---

Chore/security updates
15 changes: 14 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,27 @@ module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
testMatch: ['**/__tests__/?(*.)+(spec|test).(ts|js)'],
modulePathIgnorePatterns: ['<rootDir>/playground/.yalc'],
setupFiles: ['<rootDir>/jest.setup.js'],
// transform: {},
// globalSetup: './playground/__tests__/setup-strapi.ts',
// setupFilesAfterEnv: ['./playground/__tests__/setup-strapi.ts'],
// globalTeardown: './playground/__tests__/teardown-strapi.ts',
coverageDirectory: './coverage/',
collectCoverage: true,
transform: {
'^.+\\.(ts|tsx|js|jsx)$': 'ts-jest',
'^.+\\.(ts|tsx)$': [
'ts-jest',
{
tsconfig: 'tsconfig.jest.json',
},
],
'^.+\\.(js|jsx)$': [
'babel-jest',
{
presets: [['@babel/preset-env', { targets: { node: 'current' } }]],
},
],
},
testTimeout: 30_000,
};
2 changes: 2 additions & 0 deletions jest.setup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
process.env.HOST = process.env.HOST || '127.0.0.1';
process.env.PORT = process.env.PORT || '1340';
26 changes: 21 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,24 +25,40 @@
"test:integration": "ENV_PATH=./playground/.env jest --verbose --runInBand --forceExit --testMatch '**/healthcheck.test.js'"
},
"devDependencies": {
"@babel/core": "^7.27.2",
"@babel/preset-env": "^7.27.2",
"@changesets/changelog-github": "^0.5.0",
"@changesets/cli": "^2.27.1",
"@types/jest": "^29.4.0",
"@uncinc/eslint-config": "1.1.2",
"@changesets/cli": "^2.29.7",
"@types/jest": "^29.5.14",
"@uncinc/eslint-config": "1.1.3",
"babel-jest": "^29.7.0",
"cypress": "^13.9.0",
"cypress-terminal-report": "^6.0.2",
"eslint": "^8.57.1",
"eslint-plugin-cypress": "^3.2.0",
"eslint-plugin-jest": "^28.5.0",
"eslint-plugin-jest-dom": "^5.4.0",
"jest": "^29.4.1",
"jest-cli": "^29.2.2",
"supertest": "^7.1.3",
"ts-jest": "^29.0.3",
"ts-jest": "^29.4.5",
"turbo": "^2.6.1",
"typescript": "^5.9.3",
"yalc": "^1.0.0-pre.53"
},
"engines": {
"node": ">=20.0.0"
},
"packageManager": "yarn@4.11.0"
"packageManager": "yarn@4.11.0",
"resolutions": {
"vite": "^5.4.21",
"ai": "^5.0.52",
"on-headers": "^1.1.0",
"tmp": "^0.2.3",
"brace-expansion": "^2.0.2",
"glob": "^10.5.0",
"esbuild": "^0.25.0",
"js-yaml": "^3.14.2",
"koa": "^2.16.2"
}
}
32 changes: 17 additions & 15 deletions packages/addons/sitemap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,44 +44,46 @@
"eslint:fix": "eslint --fix './**/*.{js,jsx,ts,tsx}'"
},
"peerDependencies": {
"@strapi/design-system": "^2.0.0-rc",
"@strapi/icons": "^2.0.0-rc",
"@strapi/strapi": "^5.0.0",
"@strapi/utils": "^5.0.0",
"@strapi/design-system": "^2.0.1",
"@strapi/icons": "^2.0.1",
"@strapi/strapi": "^5.31.2",
"@strapi/utils": "^5.31.2",
Comment thread
MSACC marked this conversation as resolved.
Outdated
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"react-router-dom": "^6.0.0",
"redux": "*",
"strapi-plugin-webtools": "^1.4.0",
"styled-components": "^6.0.0"
"styled-components": "^6.1.19"
Comment thread
MSACC marked this conversation as resolved.
Outdated
},
"devDependencies": {
"@strapi/design-system": "^2.0.0-rc",
"@strapi/icons": "^2.0.0-rc",
"@strapi/design-system": "^2.0.1",
"@strapi/icons": "^2.0.1",
"@strapi/pack-up": "^5.0.0",
"@strapi/sdk-plugin": "^5.0.0",
"@strapi/strapi": "^5.0.0",
"@strapi/utils": "^5.0.0",
"@types/lodash": "^4",
"@strapi/strapi": "^5.31.2",
"@strapi/utils": "^5.31.2",
"@types/lodash": "^4.17.21",
"@types/react": "^18.0.0",
"copyfiles": "^2.4.1",
"eslint": "^8.57.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6",
"styled-components": "^6",
"react-router-dom": "^6.30.2",
"styled-components": "^6.1.19",
"yalc": "^1.0.0-pre.53"
},
"dependencies": {
"chalk": "^4.1.2",
"commander": "^8.3.0",
"immutable": "^3.8.2",
"lodash": "^4.17.21",
"react-intl": "^6.4.1",
"react-intl": "^6.8.9",
"react-redux": "^8.1.1",
"redux": "^4.2.1",
Comment thread
MSACC marked this conversation as resolved.
Outdated
"redux-immutable": "^4.0.0",
"redux-thunk": "^2.3.0",
"redux-thunk": "^2.4.2",
"sitemap": "^7.1.0",
"xml2js": "^0.5.0"
"xml2js": "^0.6.2"
Comment thread
MSACC marked this conversation as resolved.
Outdated
},
"author": {
"name": "Boaz Poolman",
Expand Down
4 changes: 1 addition & 3 deletions packages/addons/sitemap/server/utils/__tests__/index.test.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@

'use strict';

import {
logMessage,
} from '..';
const { logMessage } = require('..');

describe('Generic utilities', () => {
it('Log message formatting', () => {
Expand Down
7 changes: 3 additions & 4 deletions packages/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,15 @@
"@inquirer/prompts": "^3.3.0",
"chalk": "^4.1.2",
"commander": "^11.1.0",
"fs-extra": "^11.2.0",
"fs-extra": "^11.3.2",
"glob": "^10.3.10"
},
"devDependencies": {
"@strapi/pack-up": "^5.0.0",
"@types/fs-extra": "^11.0.4",
"@types/glob": "^8.1.0",
"@types/node": "^20.11.19",
"@types/node": "^20.19.25",
"eslint": "^8.57.1",
"typescript": "^5.3.3",
"typescript": "^5.9.3",
"yalc": "^1.0.0-pre.53"
},
"author": {
Expand Down
38 changes: 20 additions & 18 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,43 +40,45 @@
"eslint:fix": "eslint --fix './**/*.{js,jsx,ts,tsx}'"
},
"peerDependencies": {
"@strapi/admin": "^5.0.0",
"@strapi/design-system": "^2.0.0-rc",
"@strapi/icons": "^2.0.0-rc",
"@strapi/strapi": "^5.0.0",
"@strapi/utils": "^5.0.0",
"@strapi/admin": "^5.31.2",
Comment thread
MSACC marked this conversation as resolved.
Outdated
"@strapi/design-system": "^2.0.1",
"@strapi/icons": "^2.0.1",
"@strapi/strapi": "^5.31.2",
"@strapi/utils": "^5.31.2",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"react-router-dom": "^6.0.0",
"styled-components": "^6.0.0"
"styled-components": "^6.1.19"
},
"devDependencies": {
"@strapi/admin": "^5.0.0",
"@strapi/design-system": "^2.0.0-rc",
"@strapi/icons": "^2.0.0-rc",
"@strapi/admin": "^5.31.2",
"@strapi/data-transfer": "^5.31.2",
"@strapi/design-system": "^2.0.1",
"@strapi/icons": "^2.0.1",
"@strapi/pack-up": "^5.0.0",
"@strapi/sdk-plugin": "^5.0.0",
"@strapi/strapi": "^5.0.0",
"@strapi/utils": "^5.0.0",
"@strapi/strapi": "^5.31.2",
"@strapi/utils": "^5.31.2",
"@types/koa": "^2.15.0",
"@types/lodash": "^4",
"@types/qs": "^6",
"@types/lodash": "^4.17.21",
"@types/qs": "^6.14.0",
"@types/react": "^18.0.0",
"@types/react-copy-to-clipboard": "^5.0.7",
"eslint": "^8.57.1",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.0.0",
"styled-components": "^6.0.0",
"react-router-dom": "^6.30.2",
"styled-components": "^6.1.19",
"yalc": "^1.0.0-pre.53"
},
"dependencies": {
"formik": "^2.4.0",
"formik": "^2.4.9",
"lodash": "^4.17.21",
"qs": "^6.14.0",
"react-copy-to-clipboard": "^5.1.0",
"react-intl": "^6.4.1",
"react-intl": "^6.8.9",
"react-query": "^3.39.3",
"yup": "^0.32.9"
"yup": "^0.32.11"
},
"author": {
"name": "Boaz Poolman",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/server/controllers/__tests__/core.test.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import request from 'supertest';
import { setupStrapi, stopStrapi } from '../../../../../playground/tests/helpers';
const request = require('supertest');
const { setupStrapi, stopStrapi } = require('../../../../../playground/tests/helpers');

beforeAll(async () => {
await setupStrapi();
Expand Down
Comment thread
MSACC marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ describe('Hooks', () => {
},
};

await disableContentType({ oldContentTypes, contentTypes });
await disableContentType({ oldContentTypes: oldContentTypes as any, contentTypes: contentTypes as any });

// The url alias should be deleted now
const deletedEntry = await strapi.documents(`plugin::${pluginId}.url-alias`).findOne({
const deletedEntry = await strapi.documents(`plugin::${pluginId}.url-alias` as any).findOne({
documentId,
});
expect(deletedEntry).toBeNull();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { setupStrapi, stopStrapi } from '../../../../../playground/tests/helpers';
const { setupStrapi, stopStrapi } = require('../../../../../playground/tests/helpers');

// Higher timeout limit for slower machines
jest.setTimeout(30000); // 30 seconds now
Expand Down
6 changes: 4 additions & 2 deletions packages/docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,21 @@
"@docusaurus/theme-live-codeblock": "^3.9.2",
"@docusaurus/theme-mermaid": "^3.9.2",
"@docusaurus/theme-search-algolia": "^3.9.2",
"@mdx-js/react": "^3.0.0",
"@mdx-js/react": "^3.1.1",
"classnames": "^2.5.1",
"clsx": "^2.0.0",
"docusaurus-plugin-sass": "^0.2.5",
"prism-react-renderer": "^2.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"sass": "^1.78.0"
"sass": "^1.94.2"
},
"devDependencies": {
"@docusaurus/module-type-aliases": "3.9.2",
"@docusaurus/tsconfig": "3.9.2",
"@docusaurus/types": "3.9.2",
"@types/react": "^18.0.0",
"@types/react-dom": "^18.0.0",
"typescript": "~5.5.2"
},
"browserslist": {
Expand Down
8 changes: 4 additions & 4 deletions playground/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
"sitemap": "strapi-sitemap"
},
"dependencies": {
"@strapi/plugin-cloud": "^5.17.0",
"@strapi/plugin-users-permissions": "^5.17.0",
"@strapi/strapi": "^5.17.0",
"@strapi/plugin-cloud": "^5.31.2",
"@strapi/plugin-users-permissions": "^5.31.2",
"@strapi/strapi": "^5.31.2",
"better-sqlite3": "11.3.0",
"react": "^18.0.0",
"react-dom": "^18.0.0",
"react-router-dom": "^6.0.0",
"react-router-dom": "^6.30.2",
"strapi-plugin-webtools": "link:.yalc/strapi-plugin-webtools",
"styled-components": "^6.0.0",
"webtools-addon-sitemap": "link:.yalc/webtools-addon-sitemap"
Expand Down
39 changes: 39 additions & 0 deletions playground/tests/helpers.js
Comment thread
MSACC marked this conversation as resolved.
Outdated
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
'use strict';

const fs = require('node:fs');
const assert = require('node:assert');
const { createStrapi } = require('@strapi/strapi');

let instance;

async function setupStrapi() {
if (!instance) {
const strapi = await createStrapi({
appDir: './playground',
distDir: './playground/dist',
}).load();

await strapi.start();
instance = strapi;
}
}

async function stopStrapi() {
if (instance) {
const tmpDbFile = instance.config.get('database.connection.connection.filename');
assert(typeof tmpDbFile === 'string');

await instance.destroy();

if (fs.existsSync(tmpDbFile)) {
fs.unlinkSync(tmpDbFile);
}

instance = undefined;
}
}

module.exports = {
setupStrapi,
stopStrapi,
};
Loading