Skip to content
Open
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
2 changes: 1 addition & 1 deletion .circleci/src/pipeline/@pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1784,7 +1784,7 @@ jobs:
source ./scripts/ensure-node.sh
yarn lerna run types
- sanitize-verify-and-store-mocha-results:
expectedResultCount: 10
expectedResultCount: 9

verify-release-readiness:
<<: *defaults
Expand Down
4 changes: 1 addition & 3 deletions guides/esm-migration.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,8 @@ When migrating some of these projects away from the `ts-node` entry [see `@packa
- [ ] packages/example
- [ ] packages/extension
- [ ] packages/frontend-shared **PARTIAL** - entry point is JS
- [ ] packages/https-proxy - higher priority
- [x] packages/electron ✅ **COMPLETED**
- [ ] packages/https-proxy **PARTIAL** - entry point is JS
- [ ] packages/https-proxy - higher priority
- [x] packages/icons ✅ **COMPLETED**
- [x] packages/launcher ✅ **COMPLETED**
- [x] packages/launchpad ✅ **COMPLETED**
Expand Down Expand Up @@ -98,7 +97,6 @@ When migrating some of these projects away from the `ts-node` entry [see `@packa
- [ ] packages/extension
- [ ] packages/https-proxy
- [x] packages/electron ✅ **COMPLETED**
- [ ] packages/https-proxy
- [ ] packages/icons
- [ ] packages/launcher
- [ ] packages/net-stubbing
Expand Down
1 change: 1 addition & 0 deletions packages/icons/.eslintignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
**/dist
index.js
**/*.d.ts
**/package-lock.json
**/tsconfig.json
Expand Down
3 changes: 3 additions & 0 deletions packages/icons/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/dist
index.js
index.d.ts
1 change: 0 additions & 1 deletion packages/icons/index.d.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/icons/index.js

This file was deleted.

2 changes: 1 addition & 1 deletion packages/icons/src/icons.ts → packages/icons/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'path'

const dist = [__dirname, '..', 'dist']
const dist = [__dirname, 'dist']

function distPath (...args: string[]) {
return path.join.apply(path, dist.concat([...args]))
Expand Down
17 changes: 11 additions & 6 deletions packages/icons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,31 @@
"private": true,
"main": "index.js",
"scripts": {
"build": "ts-node ./scripts/build.ts && ts-node ./scripts/ico.ts",
"check-ts": "tsc --noEmit && yarn -s tslint",
"build": "yarn build-assets && yarn build:cjs && yarn build:esm",
"build-assets": "tsx ./scripts/build.ts && tsx ./scripts/ico.ts",
"build-prod": "yarn build",
"build:cjs": "tsc -p tsconfig.cjs.json",
"build:esm": "tsc -p tsconfig.esm.json",
"check-ts": "tsc -p tsconfig.cjs.json --noEmit && yarn -s tslint -p tsconfig.cjs.json",
"lint": "eslint --ext .js,.jsx,.ts,.tsx,.json, .",
"test": "yarn test-unit",
"test-unit": "NODE_ENV=test mocha -r @packages/ts/register test/*.ts",
"test-unit": "vitest run",
"tslint": "tslint --config ../ts/tslint.json --project ."
},
"devDependencies": {
"@types/mocha": "^8.0.3",
"@types/to-ico": "^1.1.1",
"chai": "^4.2.0",
"fs-extra": "9.1.0",
"mocha": "^8.1.3",
"to-ico": "^1.1.5"
"to-ico": "^1.1.5",
"tsx": "^4.20.5",
"vitest": "^3.2.4"
},
"files": [
"dist",
"index.js",
"index.d.ts"
],
"types": "index.d.ts",
"license": "MIT",
"nx": {}
}
18 changes: 18 additions & 0 deletions packages/icons/test/icons.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { describe, it, expect } from 'vitest'
import * as icons from '../index'

const cwd = process.cwd()

describe('Cypress Icons', function () {
it('returns path to favicon', function () {
expect(icons.getPathToFavicon('favicon-red.ico')).toEqual(`${cwd }/dist/favicon/favicon-red.ico`)
})

it('returns path to icon', function () {
expect(icons.getPathToIcon('cypress.icns')).toEqual(`${cwd }/dist/icons/cypress.icns`)
})

it('returns path to logo', function () {
expect(icons.getPathToLogo('cypress-bw.png')).toEqual(`${cwd }/dist/logo/cypress-bw.png`)
})
})
18 changes: 0 additions & 18 deletions packages/icons/test/icons_spec.ts

This file was deleted.

13 changes: 13 additions & 0 deletions packages/icons/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"include": [
"index.ts"
],
"compilerOptions": {
"allowJs": false,
"noImplicitAny": true,
"noUncheckedIndexedAccess": true,
"skipLibCheck": true,
"esModuleInterop": true,
"declaration": true
}
}
6 changes: 0 additions & 6 deletions packages/icons/tsconfig.build.json

This file was deleted.

8 changes: 8 additions & 0 deletions packages/icons/tsconfig.cjs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"target": "ES2022",
"module": "CommonJS",
"moduleResolution": "node"
}
}
9 changes: 9 additions & 0 deletions packages/icons/tsconfig.esm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"extends": "./tsconfig.base.json",
"compilerOptions": {
"target": "ES2022",
"module": "ES2022",
"moduleResolution": "node",
"noEmit": true
}
}
9 changes: 0 additions & 9 deletions packages/icons/tsconfig.json

This file was deleted.

9 changes: 9 additions & 0 deletions packages/icons/vitest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import { defineConfig } from 'vitest/config'

export default defineConfig({
test: {
include: ['test/**/*.spec.ts'],
globals: true,
environment: 'node',
},
})
12 changes: 11 additions & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -24031,7 +24031,7 @@ mocha@7.2.0, mocha@^7.1.0:
yargs-parser "13.1.2"
yargs-unparser "1.6.0"

mocha@^8.1.1, mocha@^8.1.3:
mocha@^8.1.1:
version "8.3.1"
resolved "https://registry.yarnpkg.com/mocha/-/mocha-8.3.1.tgz#b9eda6da1eb8cb8d29860a9c2205de5b8a076560"
integrity sha512-5SBMxANWqOv5bw3Hx+HVgaWlcWcFEQDUdaUAr1AUU+qwtx6cowhn7gEDT/DwQP7uYxnvShdUOVLbTYAHOEGfDQ==
Expand Down Expand Up @@ -31953,6 +31953,16 @@ tsx@4.20.5:
optionalDependencies:
fsevents "~2.3.3"

tsx@^4.20.5:
version "4.20.6"
resolved "https://registry.yarnpkg.com/tsx/-/tsx-4.20.6.tgz#8fb803fd9c1f70e8ccc93b5d7c5e03c3979ccb2e"
integrity sha512-ytQKuwgmrrkDTFP4LjR0ToE2nqgy886GpvRSpU0JAnrdBYppuY5rLkRUYPU1yCryb24SsKBTL/hlDQAEFVwtZg==
dependencies:
esbuild "~0.25.0"
get-tsconfig "^4.7.5"
optionalDependencies:
fsevents "~2.3.3"

tuf-js@^2.2.1:
version "2.2.1"
resolved "https://registry.npmjs.org/tuf-js/-/tuf-js-2.2.1.tgz#fdd8794b644af1a75c7aaa2b197ddffeb2911b56"
Expand Down
Loading