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
42 changes: 21 additions & 21 deletions packages/create-sitecore-jss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,39 @@
],
"dependencies": {
"chalk": "^4.1.2",
"cross-spawn": "^7.0.3",
"diff": "^5.1.0",
"dotenv": "^16.0.3",
"ejs": "^3.1.9",
"fs-extra": "^11.1.0",
"glob": "^8.1.0",
"cross-spawn": "^7.0.6",
"diff": "^7.0.0",
"dotenv": "^16.4.7",
"ejs": "^3.1.10",
"fs-extra": "^11.3.0",
"glob": "^11.0.1",
"inquirer": "^8.2.4",
"minimist": "^1.2.7"
"minimist": "^1.2.8"
},
"devDependencies": {
"@types/chai": "^4.3.4",
"@types/cross-spawn": "^6.0.2",
"@types/diff": "^5.0.2",
"@types/ejs": "^3.1.1",
"@types/fs-extra": "^11.0.1",
"@types/glob": "^8.0.1",
"@types/chai": "^5.0.1",
"@types/cross-spawn": "^6.0.6",
"@types/diff": "^7.0.0",
"@types/ejs": "^3.1.5",
"@types/fs-extra": "^11.0.4",
"@types/glob": "^8.1.0",
"@types/inquirer": "^9.0.3",
"@types/minimist": "^1.2.2",
"@types/mocha": "^10.0.1",
"@types/minimist": "^1.2.5",
"@types/mocha": "^10.0.10",
"@types/node": "^22.9.0",
"@types/proxyquire": "^1.3.31",
"@types/sinon": "17.0.3",
"@types/sinon-chai": "^4.0.0",
"chai": "^4.3.7",
"chokidar": "^3.5.3",
"del-cli": "^5.0.0",
"chokidar": "^4.0.3",
"del-cli": "^6.0.0",
"eslint": "^8.56.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"mocha": "^11.1.0",
"nyc": "^17.1.0",
"proxyquire": "^2.1.3",
"sinon": "^18.0.0",
"sinon": "^19.0.2",
"sinon-chai": "^3.7.0",
"ts-node": "^10.9.1",
"typescript": "~5.6.3"
"typescript": "~5.7.3"
}
}
4 changes: 2 additions & 2 deletions packages/create-sitecore-jss/src/bin.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import * as initRunner from './init-runner';

describe('bin', () => {
describe('parseArgs', () => {
let originalArgv: string[];
let originalArgv: string[] = [];

beforeEach(() => {
// eslint-disable-next-line no-unused-labels
originalArgv: process.argv;
originalArgv = process.argv;
});

afterEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import path, { sep } from 'path';
import chalk from 'chalk';
import inquirer from 'inquirer';
import ejs from 'ejs';
import glob from 'glob';
import * as glob from 'glob';
import { expect } from 'chai';
import sinon, { SinonStub } from 'sinon';
import { currentPkg, partialPkg } from '../test-data/pkg';
Expand Down Expand Up @@ -466,7 +466,6 @@ describe('transform', () => {
let mergeStub: SinonStub;
let diffAndWriteFilesStub: SinonStub;
let writeFileToPathStub: SinonStub;
let transformFilenameStub: SinonStub;
let openJsonFileStub: SinonStub;
let log: SinonStub;

Expand All @@ -485,7 +484,6 @@ describe('transform', () => {
mergeStub?.restore();
diffAndWriteFilesStub?.restore();
writeFileToPathStub?.restore();
transformFilenameStub?.restore();
openJsonFileStub?.restore();
log?.restore();
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import chalk from 'chalk';
import fs from 'fs-extra';
import glob from 'glob';
import * as glob from 'glob';
import path, { sep } from 'path';
import { parse } from 'dotenv';
import { Data, renderFile } from 'ejs';
Expand Down
2 changes: 0 additions & 2 deletions packages/create-sitecore-jss/src/common/utils/helpers.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -186,11 +186,9 @@ describe('helpers', () => {
});

describe('saveConfiguration', () => {
let log: SinonStub;
let writeFileSync: SinonStub;

afterEach(() => {
log?.restore();
writeFileSync?.restore();
});

Expand Down
12 changes: 6 additions & 6 deletions packages/create-sitecore-jss/src/templates/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,15 @@
"@sitecore-jss/sitecore-jss-nextjs": "~<%- version %>",
"@sitecore/components": "~2.0.1",
"@sitecore-feaas/clientside": "^0.5.19",
"bootstrap": "^5.1.3",
"bootstrap": "^5.3.3",
"font-awesome": "^4.7.0",
"next": "^14.2.18",
"next-localization": "^0.12.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sass": "^1.52.3",
"sass": "^1.83.3",
"sass-alias": "^1.0.5",
"sharp": "0.32.6"
"sharp": "0.33.5"
},
"devDependencies": {
"@sitecore-jss/sitecore-jss-cli": "~22.4.0-canary",
Expand All @@ -45,7 +45,7 @@
"@typescript-eslint/eslint-plugin": "^8.14.0",
"@typescript-eslint/parser": "^8.14.0",
"chalk": "~4.1.2",
"chokidar": "~3.5.3",
"chokidar": "~4.0.3",
"constant-case": "^3.0.4",
"cross-env": "~7.0.3",
"dotenv-flow": "^4.1.0",
Expand All @@ -55,8 +55,8 @@
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-react": "^7.32.1",
"eslint-plugin-yaml": "^0.5.0",
"graphql": "~15.8.0",
"npm-run-all": "~4.1.5",
"graphql": "~16.10.0",
"npm-run-all2": "~7.0.2",
"prettier": "^2.8.3",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.2",
Expand Down
1 change: 1 addition & 0 deletions packages/create-sitecore-jss/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"target": "es6",
"module": "commonjs",
"lib": ["es2017"],
"skipLibCheck": true,
"typeRoots": ["node_modules/@types"],
"outDir": "dist",
"declarationDir": "./types"
Expand Down
4 changes: 4 additions & 0 deletions packages/sitecore-jss-dev-tools/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json.schemastore.org/mocharc.json",
"spec": ["./src/**/*.test.ts"]
}
28 changes: 13 additions & 15 deletions packages/sitecore-jss-dev-tools/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,31 +31,29 @@
"@babel/parser": "^7.24.0",
"@sitecore-jss/sitecore-jss": "22.4.0-canary.7",
"chalk": "^4.1.2",
"chokidar": "^3.6.0",
"del": "^6.0.0",
"glob": "^8.1.0",
"recast": "^0.23.5",
"chokidar": "^4.0.3",
"del": "^8.0.0",
"glob": "^11.0.1",
"recast": "^0.23.9",
"ts-node": "^10.9.1"
},
"devDependencies": {
"@babel/register": "^7.23.7",
"@babel/register": "^7.25.9",
"@types/chai": "^4.3.4",
"@types/chokidar": "^2.1.3",
"@types/del": "^4.0.0",
"@types/glob": "^8.0.1",
"@types/mocha": "^10.0.1",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.10",
"@types/node": "^22.9.0",
"@types/sinon": "^10.0.13",
"@types/sinon": "^17.0.3",
"chai": "^4.3.7",
"cross-env": "^7.0.3",
"del-cli": "^5.0.0",
"del-cli": "^6.0.0",
"eslint": "^8.56.0",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"sinon": "^15.0.1",
"mocha": "^11.1.0",
"nyc": "^17.1.0",
"sinon": "^19.0.2",
"ts-node": "^10.9.1",
"tsconfig-paths": "^4.1.2",
"typescript": "~5.6.3"
"typescript": "~5.7.3"
},
"types": "types/index.d.ts",
"gitHead": "2f4820efddf4454eeee58ed1b2cc251969efdf5b",
Expand Down
20 changes: 10 additions & 10 deletions packages/sitecore-jss-nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,21 +47,21 @@
"chai-as-promised": "^7.1.1",
"chai-string": "^1.5.0",
"chalk": "^4.1.2",
"cross-fetch": "^3.1.5",
"del-cli": "^5.0.0",
"cross-fetch": "^4.1.0",
"del-cli": "^6.0.0",
"eslint": "^8.56.0",
"eslint-plugin-react": "^7.32.1",
"jsdom": "^21.1.0",
"mocha": "^10.2.0",
"jsdom": "^26.0.0",
"mocha": "^11.1.0",
"next": "^14.2.18",
"nock": "^13.3.0",
"nyc": "^15.1.0",
"nock": "14.0.0-beta.7",
"nyc": "^17.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sinon": "^15.0.1",
"sinon": "^19.0.2",
"sinon-chai": "^3.7.0",
"ts-node": "^10.9.1",
"typescript": "~5.4.0"
"typescript": "~5.7.3"
},
"peerDependencies": {
"@sitecore-cloudsdk/core": "^0.4.2",
Expand All @@ -74,9 +74,9 @@
"@sitecore-jss/sitecore-jss": "22.4.0-canary.7",
"@sitecore-jss/sitecore-jss-dev-tools": "22.4.0-canary.7",
"@sitecore-jss/sitecore-jss-react": "22.4.0-canary.7",
"@vercel/kv": "^0.2.1",
"@vercel/kv": "^3.0.0",
"prop-types": "^15.8.1",
"regex-parser": "^2.2.11",
"regex-parser": "^2.3.0",
"sync-disk-cache": "^2.1.0"
},
"description": "",
Expand Down
26 changes: 13 additions & 13 deletions packages/sitecore-jss-react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,29 +30,29 @@
"@testing-library/dom": "^10.4.0",
"@testing-library/react": "^16.1.0",
"@testing-library/user-event": "^14.6.0",
"@types/chai": "^4.3.4",
"@types/chai-string": "^1.4.2",
"@types/mocha": "^10.0.1",
"@types/node": "20.14.2",
"@types/prop-types": "^15.7.5",
"@types/chai": "^5.0.1",
"@types/chai-string": "^1.4.5",
"@types/mocha": "^10.0.10",
"@types/node": "22.12.0",
"@types/prop-types": "^15.7.14",
"@types/react": "^18.2.45",
"@types/react-dom": "^18.0.10",
"@types/sinon": "^10.0.13",
"@types/sinon-chai": "^3.2.9",
"@types/sinon": "^17.0.3",
"@types/sinon-chai": "^4.0.0",
"chai": "^4.3.7",
"chai-string": "^1.5.0",
"del-cli": "^5.0.0",
"del-cli": "^6.0.0",
"eslint": "^8.56.0",
"eslint-plugin-react": "^7.31.11",
"jsdom": "^25.0.1",
"mocha": "^10.2.0",
"nyc": "^15.1.0",
"jsdom": "^26.0.0",
"mocha": "^11.1.0",
"nyc": "^17.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"sinon": "^15.0.0",
"sinon": "^19.0.2",
"sinon-chai": "^3.7.0",
"ts-node": "^10.9.1",
"typescript": "~4.9.3"
"typescript": "~5.7.3"
},
"peerDependencies": {
"@sitecore-feaas/clientside": "^0.5.19",
Expand Down
4 changes: 4 additions & 0 deletions packages/sitecore-jss/.mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"$schema": "https://json.schemastore.org/mocharc.json",
"require": "tsx"
}
2 changes: 1 addition & 1 deletion packages/sitecore-jss/.nycrc
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
"cobertura",
"text"
],
"require": ["ts-node/register"]
"import": ["tsx"]
}
42 changes: 21 additions & 21 deletions packages/sitecore-jss/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"build": "npm run clean && tsc -p tsconfig.json && tsc -p tsconfig-esm.json",
"clean": "del-cli dist types",
"lint": "eslint \"./src/**/*.ts\"",
"test": "mocha --require ts-node/register \"./src/**/*.test.ts\"",
"test": "mocha \"./src/**/*.test.ts\"",
"prepublishOnly": "npm run build",
"coverage": "nyc npm test",
"generate-docs": "npx typedoc --plugin typedoc-plugin-markdown --outputFileStrategy Members --parametersFormat table --readme none --out ../../ref-docs/sitecore-jss --entryPoints src/index.ts --entryPoints src/graphql/index.ts --entryPoints src/i18n/index.ts --entryPoints src/layout/index.ts --entryPoints src/media/index.ts --entryPoints src/personalize/index.ts --entryPoints src/site/index.ts --entryPoints src/tracking/index.ts --entryPoints src/utils/index.ts --entryPoints src/editing/index.ts --githubPages false"
Expand All @@ -30,35 +30,35 @@
"url": "https://github.com/sitecore/jss/issues"
},
"devDependencies": {
"@types/chai": "^4.2.3",
"@types/chai-spies": "^1.0.3",
"@types/chai-string": "^1.4.2",
"@types/debug": "^4.1.5",
"@types/memory-cache": "^0.2.1",
"@types/mocha": "^9.0.0",
"@types/node": "^22.9.0",
"@types/chai": "^5.0.1",
"@types/chai-spies": "^1.0.6",
"@types/chai-string": "^1.4.5",
"@types/debug": "^4.1.12",
"@types/memory-cache": "^0.2.6",
"@types/mocha": "^10.0.1",
"@types/node": "^22.12.0",
"@types/sinon": "^17.0.3",
"@types/url-parse": "1.4.8",
"@types/url-parse": "1.4.11",
"chai": "^4.2.0",
"chai-spies": "^1.0.0",
"chai-spies": "^1.1.0",
"chai-string": "^1.5.0",
"del-cli": "^5.0.0",
"del-cli": "^6.0.0",
"eslint": "^8.56.0",
"eslint-plugin-jsdoc": "48.7.0",
"mocha": "^10.2.0",
"mocha": "^11.1.0",
"nock": "14.0.0-beta.7",
"nyc": "^15.1.0",
"sinon": "^17.0.1",
"ts-node": "^8.4.1",
"tslib": "^1.10.0",
"typescript": "~5.6.3"
"nyc": "^17.1.0",
"sinon": "^19.0.2",
"tslib": "^2.8.1",
"tsx": "^4.19.2",
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I replace ts-node with tsx here as pre-prep for ESM switch. ts-node only works with CJS.
However, tsx causes problems with sinon.stub in other packages - which we'll need to figure out later.

"typescript": "~5.7.3"
},
"dependencies": {
"debug": "^4.3.1",
"graphql": "^16.5.0",
"graphql-request": "^4.2.0",
"debug": "^4.4.0",
"graphql": "^16.10.0",
"graphql-request": "^6.1.0",
"memory-cache": "^0.2.0",
"url-parse": "^1.5.9"
"url-parse": "^1.5.10"
},
"description": "",
"types": "types/index.d.ts",
Expand Down
Loading