Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 3 additions & 1 deletion .secretlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@
],
"allows": [
"/attempt-to-change-via-edit/",
"/mynewfancypasswordwhichisnotallowed/"
"/mynewfancypasswordwhichisnotallowed/",
"/scriptTag\\.dataset\\.key/",
"/69010382388f9de5869ad6e558/"
]
},
{
Expand Down
2 changes: 1 addition & 1 deletion apps/admin-toolbar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tryghost/admin-toolbar",
"type": "module",
"version": "0.1.9",
"version": "0.1.10",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand Down
17 changes: 0 additions & 17 deletions apps/admin-toolbar/vite.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,29 +3,12 @@ import {resolve} from 'path';

import {defineConfig} from 'vite';

// `vite preview` aborts when its outDir is missing — a UX nudge for the
// "did you forget to build?" case. Our dev script runs preview alongside
// `build:watch`, so the dir is missing for the first ~1s after a fresh
// clone or `build:clean`. Defining configurePreviewServer is Vite's
// documented opt-out from that guard; the underlying sirv server already
// 404s for missing files.
const tolerateMissingOutDir = () => ({
name: 'tolerate-missing-outdir',
configurePreviewServer() {}
});

export default defineConfig(({mode}) => ({
logLevel: process.env.CI ? 'info' : 'warn',
clearScreen: false,
plugins: [tolerateMissingOutDir()],
define: {
'process.env.NODE_ENV': JSON.stringify(process.env.NODE_ENV || mode)
},
preview: {
host: '0.0.0.0',
allowedHosts: true, // allows domain-name proxies to the preview server
port: 4176
},
build: {
outDir: resolve(import.meta.dirname, 'umd'),
emptyOutDir: true,
Expand Down
2 changes: 1 addition & 1 deletion apps/announcement-bar/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tryghost/announcement-bar",
"type": "module",
"version": "1.1.25",
"version": "1.1.26",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 1 addition & 27 deletions apps/announcement-bar/vite.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-env node */
import {resolve} from 'path';
import fs from 'fs/promises';

import {defineConfig} from 'vitest/config';
import reactPlugin from '@vitejs/plugin-react';
Expand All @@ -17,35 +16,10 @@ export default defineConfig((config) => {
define: {
'process.env.NODE_ENV': JSON.stringify(config.mode)
},
preview: {
host: '0.0.0.0',
allowedHosts: true, // allows domain-name proxies to the preview server
port: 4177
},
plugins: [
reactPlugin(),
svgrPlugin()
],
esbuild: {
loader: 'jsx',
include: /src\/.*\.jsx?$/,
exclude: []
},
optimizeDeps: {
esbuildOptions: {
plugins: [
{
name: 'load-js-files-as-jsx',
setup(build) {
build.onLoad({filter: /(src|test)\/.*\.js$/}, async args => ({
loader: 'jsx',
contents: await fs.readFile(args.path, 'utf8')
}));
}
}
]
}
},
build: {
outDir: resolve(__dirname, 'umd'),
emptyOutDir: true,
Expand All @@ -54,7 +28,7 @@ export default defineConfig((config) => {
sourcemap: true,
cssCodeSplit: true,
lib: {
entry: resolve(__dirname, 'src/index.js'),
entry: resolve(__dirname, 'src/index.jsx'),
formats: ['umd'],
name: pkg.name,
fileName: format => `${outputFileName}.min.js`
Expand Down
2 changes: 1 addition & 1 deletion apps/portal/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tryghost/portal",
"type": "module",
"version": "2.69.13",
"version": "2.69.14",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App from '../src/app.js';
import App from '../src/app';
import {appRender, fireEvent, within, waitFor} from './utils/test-utils';
import {newsletters as Newsletters, site as FixtureSite, member as FixtureMember} from './utils/test-fixtures';
import setupGhostApi from '../src/utils/api.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App from '../src/app.js';
import App from '../src/app';
import {appRender, fireEvent, waitFor, within} from './utils/test-utils';
import setupGhostApi from '../src/utils/api.js';
import {getMemberData, getPostsData, getSiteData} from '../src/utils/fixtures-generator.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App from '../src/app.js';
import App from '../src/app';
import {fireEvent, appRender, within, waitFor} from './utils/test-utils';
import {site as FixtureSite} from './utils/test-fixtures';
import setupGhostApi from '../src/utils/api.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App from '../src/app.js';
import App from '../src/app';
import {fireEvent, appRender, within, waitFor} from './utils/test-utils';
import {offer as FixtureOffer, site as FixtureSite, member as FixtureMember} from './utils/test-fixtures';
import setupGhostApi from '../src/utils/api.js';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App from '../src/app.js';
import App from '../src/app';
import {fireEvent, appRender, within, waitFor} from './utils/test-utils';
import {offer as FixtureOffer, site as FixtureSite, member as FixtureMember} from './utils/test-fixtures';
import setupGhostApi from '../src/utils/api.js';
Expand Down
32 changes: 1 addition & 31 deletions apps/portal/vite.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-env node */
import {resolve} from 'path';
import fs from 'fs/promises';

import {defineConfig} from 'vitest/config';
import cssInjectedByJsPlugin from 'vite-plugin-css-injected-by-js';
Expand All @@ -19,40 +18,11 @@ export default defineConfig((config) => {
'process.env.NODE_ENV': JSON.stringify(config.mode),
REACT_APP_VERSION: JSON.stringify(process.env.npm_package_version)
},
preview: {
host: '0.0.0.0',
allowedHosts: true, // allows domain-name proxies to the preview server
port: 4175,
cors: true
},
server: {
port: 5368
},
plugins: [
cssInjectedByJsPlugin(),
reactPlugin(),
svgrPlugin()
],
esbuild: {
loader: 'tsx',
include: [/src\/.*\.[jt]sx?$/, /__mocks__\/.*\.[jt]sx?$/, /test\/.*\.[jt]sx?$/],
exclude: []
},
optimizeDeps: {
esbuildOptions: {
plugins: [
{
name: 'load-js-files-as-jsx',
setup(build) {
build.onLoad({filter: /src\/.*\.js$/}, async args => ({
loader: 'jsx',
contents: await fs.readFile(args.path, 'utf8')
}));
}
}
]
}
},
resolve: {
dedupe: ['@tryghost/debug']
},
Expand All @@ -64,7 +34,7 @@ export default defineConfig((config) => {
sourcemap: true,
cssCodeSplit: false,
lib: {
entry: resolve(__dirname, 'src/index.js'),
entry: resolve(__dirname, 'src/index.jsx'),
formats: ['umd'],
name: pkg.name,
fileName: format => `${outputFileName}.min.js`
Expand Down
2 changes: 1 addition & 1 deletion apps/sodo-search/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tryghost/sodo-search",
"type": "module",
"version": "1.8.28",
"version": "1.8.29",
"license": "MIT",
"repository": "https://github.com/TryGhost/Ghost",
"author": "Ghost Foundation",
Expand Down
File renamed without changes.
File renamed without changes.
28 changes: 1 addition & 27 deletions apps/sodo-search/vite.config.mjs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-env node */
import {resolve} from 'path';
import fs from 'fs/promises';

import {defineConfig} from 'vitest/config';
import reactPlugin from '@vitejs/plugin-react';
Expand All @@ -16,35 +15,10 @@ export default defineConfig((config) => {
define: {
'process.env.NODE_ENV': JSON.stringify(config.mode)
},
preview: {
host: '0.0.0.0',
allowedHosts: true, // allows domain-name proxies to the preview server
port: 4178
},
plugins: [
reactPlugin(),
svgrPlugin()
],
esbuild: {
loader: 'jsx',
include: /(src|test)\/.*\.jsx?$/,
exclude: []
},
optimizeDeps: {
esbuildOptions: {
plugins: [
{
name: 'load-js-files-as-jsx',
setup(build) {
build.onLoad({filter: /(src|test)\/.*\.js$/}, async args => ({
loader: 'jsx',
contents: await fs.readFile(args.path, 'utf8')
}));
}
}
]
}
},
resolve: {
dedupe: ['@tryghost/debug']
},
Expand All @@ -56,7 +30,7 @@ export default defineConfig((config) => {
sourcemap: true,
cssCodeSplit: false,
lib: {
entry: resolve(__dirname, 'src/index.js'),
entry: resolve(__dirname, 'src/index.jsx'),
formats: ['umd'],
name: pkg.name,
fileName: format => `${outputFileName}.min.js`
Expand Down
Loading