diff --git a/.eslintignore b/.eslintignore index 92fa1a74d..99ff8576f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -4,4 +4,4 @@ /docs/ /landing/ /site/ -/test/dummy/ +/test/cypress/dummy/ diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ff7da45a..ab2aedad2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -89,14 +89,3 @@ jobs: with: command: pnpm test:cy:ci:chrome install: false - - automerge: - needs: [test-unit, test-integration] - runs-on: ubuntu-latest - permissions: - pull-requests: write - contents: write - steps: - - uses: fastify/github-action-merge-dependabot@v3.2.0 - with: - github-token: ${{secrets.GITHUB_TOKEN}} diff --git a/.release-it.js b/.release-it.js deleted file mode 100644 index 1a5966408..000000000 --- a/.release-it.js +++ /dev/null @@ -1,24 +0,0 @@ -'use strict'; - -module.exports = { - hooks: { - 'after:bump': 'pnpm build' - }, - plugins: { - '@release-it-plugins/lerna-changelog': { - infile: 'CHANGELOG.md', - launchEditor: true - } - }, - git: { - tagName: 'v${version}' - }, - github: { - release: true, - tokenRef: 'GITHUB_AUTH', - assets: ['dist/**/*.css', 'dist/**/*.js', 'dist/**/*.ts', 'dist/**/*.map'] - }, - npm: { - publish: true - } -}; diff --git a/LICENSE b/LICENSE index 3d90f3a61..ff84a5be7 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ The MIT License (MIT) -Copyright (c) 2021 +Copyright (c) 2024 Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/landing/package.json b/landing/package.json index c101793a3..d3568de3d 100644 --- a/landing/package.json +++ b/landing/package.json @@ -1,5 +1,6 @@ { "name": "landing", + "private": "true", "type": "module", "version": "0.0.1", "scripts": { diff --git a/package.json b/package.json index c0cc31a6b..b3581cc94 100644 --- a/package.json +++ b/package.json @@ -1,14 +1,7 @@ { - "name": "shepherd.js", - "version": "11.2.0", - "description": "Guide your users through a tour of your app.", - "keywords": [ - "site tour", - "tour", - "tutorial", - "shepherd" - ], - "homepage": "https://shepherdjs.dev", + "name": "shepherd-monorepo", + "private": "true", + "description": "The monorepo for Shepherd", "repository": { "type": "git", "url": "git+https://github.com/shepherd-pro/shepherd.git" @@ -18,71 +11,21 @@ "Robbie Wagner ", "Chuck Carpenter " ], - "exports": { - ".": { - "import": "./dist/shepherd.esm.js", - "default": "./dist/shepherd.js" - }, - "./*": { - "import": "./dist/*.esm.js", - "types": "./dist/*.d.ts", - "default": "./dist/*.js" - } - }, - "typesVersions": { - "*": { - "*": [ - "./dist/*" - ] - } - }, "scripts": { - "build": "pnpm clean && rollup -c && pnpm postbuild", - "postbuild": "pnpm build:landing", - "build:landing": "pnpm -F landing build", - "clean": "rimraf ./dist", - "cy:open": "./node_modules/.bin/cypress open", - "cy:run:chrome": "cypress run --browser chrome", - "dev": "pnpm watch", - "docs": "node_modules/.bin/jsdoc -c .jsdoc.js --verbose", - "esdoc": "esdoc", - "lint:js": "eslint . --ext js", - "rewrite-paths": "replace 'SF:.*src' 'SF:src' coverage/lcov.info", - "start": "pnpm watch", - "start-test-server": "http-server -p 9002", - "test": "pnpm lint:js && pnpm test:ci", - "pretest:ci": "pnpm build", - "test:ci": "pnpm build && pnpm test:unit:ci && test:cy:ci:chrome", - "test:cy:ci:chrome": "start-server-and-test start-test-server http://127.0.0.1:9002 cy:run:chrome", - "test:cy:watch": "start-server-and-test start-test-server http://127.0.0.1:9002 cy:open", - "test:unit:ci": "jest --coverage", - "test:unit:watch": "jest --watch", - "types:check": "pnpm tsc", - "view-coverage": "http-server -p 9003 ./coverage/lcov-report -o", - "watch": "pnpm clean && rollup -c --environment DEVELOPMENT --watch" - }, - "dependencies": { - "@floating-ui/dom": "^1.5.3", - "deepmerge": "^4.3.1" + "build": "pnpm -F shepherd.js build", + "lint:js": "pnpm -F '*' lint:js", + "test:ci": "pnpm build && pnpm test:unit:ci && pnpm test:cy:ci:chrome", + "test:cy:ci:chrome": "pnpm -F cypress-tests test:ci:chrome", + "test:cy:watch": "pnpm -F cypress-tests test:watch", + "test:unit:ci": "pnpm -F unit-tests test:ci", + "test:unit:watch": "pnpm -F unit-tests test:watch", + "types:check": "pnpm -F shepherd.js types:check", + "view-coverage": "pnpm -F unit-tests view-coverage" }, "devDependencies": { "@babel/core": "^7.23.5", "@babel/preset-env": "^7.23.5", - "@babel/preset-typescript": "^7.23.3", - "@rollup/plugin-babel": "^6.0.4", - "@rollup/plugin-commonjs": "^25.0.7", - "@rollup/plugin-node-resolve": "^15.2.3", - "@rollup/plugin-replace": "^5.0.5", - "@rollup/plugin-typescript": "^11.1.6", - "@testing-library/jest-dom": "^5.17.0", - "@testing-library/svelte": "^3.2.2", "autoprefixer": "^10.4.16", - "babel-core": "^7.0.0-bridge.0", - "babel-jest": "^29.7.0", - "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", - "chai": "^4.3.10", - "codeclimate-test-reporter": "^0.5.1", - "cssnano": "^6.0.3", "cypress": "^13.6.2", "cypress-plugin-tab": "^1.0.5", "del": "^7.1.0", @@ -92,47 +35,22 @@ "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-svelte3": "^4.0.0", "glob": "^10.3.10", - "http-server": "^14.1.1", - "jest": "^29.7.0", - "jest-environment-jsdom": "^29.7.0", - "jest-expect-message": "^1.1.3", - "jest-transform-css": "^6.0.1", "jsdoc": "^4.0.2", "jsdoc-template-ship-shape": "^0.1.1", - "mutationobserver-shim": "^0.3.7", "postcss": "^8.4.33", "postinstall-postinstall": "^2.1.0", "prettier": "^3.1.1", - "regenerator-runtime": "^0.14.1", "release-plan": "^0.8.0", "replace": "^1.2.2", - "resize-observer-polyfill": "^1.5.1", - "rimraf": "^5.0.5", - "rollup": "^4.12.0", - "rollup-plugin-analyzer": "^4.0.0", - "rollup-plugin-copy": "^3.5.0", - "rollup-plugin-filesize": "^10.0.0", - "rollup-plugin-license": "^3.2.0", - "rollup-plugin-livereload": "^2.0.5", - "rollup-plugin-postcss": "^4.0.2", - "rollup-plugin-serve": "^2.0.2", - "rollup-plugin-svelte": "^7.1.6", - "rollup-plugin-visualizer": "^5.11.0", - "sinon": "^17.0.1", - "start-server-and-test": "^2.0.3", + "shepherd.js": "workspace:*", "svelte": "^3.59.2", - "svelte-jester": "^2.3.2", "svelte-preprocess": "^5.1.3", - "tailwindcss": "^3.4.1", "typescript": "^5.3.3" }, "packageManager": "pnpm@8.15.4", "engines": { "node": "18.* || >= 20" }, - "publishConfig": { - "registry": "https://registry.npmjs.org" - }, "authors": [ "Adam Schwartz ", "Zack Bloom " diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 5c44d8608..5c80411ed 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,115 @@ settings: importers: .: + devDependencies: + '@babel/core': + specifier: ^7.23.5 + version: 7.24.0 + '@babel/preset-env': + specifier: ^7.23.5 + version: 7.24.0(@babel/core@7.24.0) + autoprefixer: + specifier: ^10.4.16 + version: 10.4.17(postcss@8.4.35) + cypress: + specifier: ^13.6.2 + version: 13.6.6 + cypress-plugin-tab: + specifier: ^1.0.5 + version: 1.0.5 + del: + specifier: ^7.1.0 + version: 7.1.0 + eslint: + specifier: ^8.56.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.0) + eslint-plugin-jest: + specifier: ^27.6.3 + version: 27.9.0(eslint@8.57.0)(jest@29.7.0)(typescript@5.3.3) + eslint-plugin-prettier: + specifier: ^5.1.3 + version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) + eslint-plugin-svelte3: + specifier: ^4.0.0 + version: 4.0.0(eslint@8.57.0)(svelte@3.59.2) + glob: + specifier: ^10.3.10 + version: 10.3.10 + jsdoc: + specifier: ^4.0.2 + version: 4.0.2 + jsdoc-template-ship-shape: + specifier: ^0.1.1 + version: 0.1.1 + postcss: + specifier: ^8.4.33 + version: 8.4.35 + postinstall-postinstall: + specifier: ^2.1.0 + version: 2.1.0 + prettier: + specifier: ^3.1.1 + version: 3.2.5 + release-plan: + specifier: ^0.8.0 + version: 0.8.0 + replace: + specifier: ^1.2.2 + version: 1.2.2 + shepherd.js: + specifier: workspace:* + version: link:shepherd.js + svelte: + specifier: ^3.59.2 + version: 3.59.2 + svelte-preprocess: + specifier: ^5.1.3 + version: 5.1.3(@babel/core@7.24.0)(postcss@8.4.35)(svelte@3.59.2)(typescript@5.3.3) + typescript: + specifier: ^5.3.3 + version: 5.3.3 + + landing: + dependencies: + '@astrojs/check': + specifier: ^0.3.1 + version: 0.3.4(prettier@3.2.5)(typescript@5.3.3) + '@astrojs/mdx': + specifier: ^2.0.0 + version: 2.1.1(astro@4.4.8) + '@astrojs/partytown': + specifier: ^2.0.3 + version: 2.0.4 + '@astrojs/rss': + specifier: ^4.0.1 + version: 4.0.5 + '@astrojs/sitemap': + specifier: ^3.0.3 + version: 3.1.1 + '@astrojs/tailwind': + specifier: ^5.0.3 + version: 5.1.0(astro@4.4.8)(tailwindcss@3.4.1) + astro: + specifier: ^4.1.1 + version: 4.4.8(typescript@5.3.3) + shepherd.js: + specifier: workspace:* + version: link:../shepherd.js + tailwindcss: + specifier: ^3.3.5 + version: 3.4.1 + typescript: + specifier: ^5.3.2 + version: 5.3.3 + devDependencies: + '@tailwindcss/typography': + specifier: ^0.5.10 + version: 0.5.10(tailwindcss@3.4.1) + + shepherd.js: dependencies: '@floating-ui/dom': specifier: ^1.5.3 @@ -39,39 +148,15 @@ importers: '@rollup/plugin-typescript': specifier: ^11.1.6 version: 11.1.6(rollup@4.12.0)(typescript@5.3.3) - '@testing-library/jest-dom': - specifier: ^5.17.0 - version: 5.17.0 '@testing-library/svelte': specifier: ^3.2.2 version: 3.2.2(svelte@3.59.2) autoprefixer: specifier: ^10.4.16 version: 10.4.17(postcss@8.4.35) - babel-core: - specifier: ^7.0.0-bridge.0 - version: 7.0.0-bridge.0(@babel/core@7.24.0) - babel-jest: - specifier: ^29.7.0 - version: 29.7.0(@babel/core@7.24.0) - babel-plugin-transform-es2015-modules-commonjs: - specifier: ^6.26.2 - version: 6.26.2 - chai: - specifier: ^4.3.10 - version: 4.4.1 - codeclimate-test-reporter: - specifier: ^0.5.1 - version: 0.5.1 cssnano: specifier: ^6.0.3 version: 6.0.5(postcss@8.4.35) - cypress: - specifier: ^13.6.2 - version: 13.6.6 - cypress-plugin-tab: - specifier: ^1.0.5 - version: 1.0.5 del: specifier: ^7.1.0 version: 7.1.0 @@ -81,9 +166,6 @@ importers: eslint-config-prettier: specifier: ^9.1.0 version: 9.1.0(eslint@8.57.0) - eslint-plugin-jest: - specifier: ^27.6.3 - version: 27.9.0(eslint@8.57.0)(jest@29.7.0)(typescript@5.3.3) eslint-plugin-prettier: specifier: ^5.1.3 version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) @@ -93,30 +175,12 @@ importers: glob: specifier: ^10.3.10 version: 10.3.10 - http-server: - specifier: ^14.1.1 - version: 14.1.1 - jest: - specifier: ^29.7.0 - version: 29.7.0 - jest-environment-jsdom: - specifier: ^29.7.0 - version: 29.7.0 - jest-expect-message: - specifier: ^1.1.3 - version: 1.1.3 - jest-transform-css: - specifier: ^6.0.1 - version: 6.0.1(postcss@8.4.35) jsdoc: specifier: ^4.0.2 version: 4.0.2 jsdoc-template-ship-shape: specifier: ^0.1.1 version: 0.1.1 - mutationobserver-shim: - specifier: ^0.3.7 - version: 0.3.7 postcss: specifier: ^8.4.33 version: 8.4.35 @@ -126,18 +190,12 @@ importers: prettier: specifier: ^3.1.1 version: 3.2.5 - regenerator-runtime: - specifier: ^0.14.1 - version: 0.14.1 release-plan: specifier: ^0.8.0 version: 0.8.0 replace: specifier: ^1.2.2 version: 1.2.2 - resize-observer-polyfill: - specifier: ^1.5.1 - version: 1.5.1 rimraf: specifier: ^5.0.5 version: 5.0.5 @@ -171,64 +229,180 @@ importers: rollup-plugin-visualizer: specifier: ^5.11.0 version: 5.12.0(rollup@4.12.0) - sinon: - specifier: ^17.0.1 - version: 17.0.1 - start-server-and-test: - specifier: ^2.0.3 - version: 2.0.3 svelte: specifier: ^3.59.2 version: 3.59.2 - svelte-jester: - specifier: ^2.3.2 - version: 2.3.2(jest@29.7.0)(svelte@3.59.2) svelte-preprocess: specifier: ^5.1.3 version: 5.1.3(@babel/core@7.24.0)(postcss@8.4.35)(svelte@3.59.2)(typescript@5.3.3) - tailwindcss: - specifier: ^3.4.1 - version: 3.4.1 typescript: specifier: ^5.3.3 version: 5.3.3 - landing: - dependencies: - '@astrojs/check': - specifier: ^0.3.1 - version: 0.3.4(prettier@3.2.5)(typescript@5.3.3) - '@astrojs/mdx': - specifier: ^2.0.0 - version: 2.1.1(astro@4.4.8) - '@astrojs/partytown': - specifier: ^2.0.3 - version: 2.0.4 - '@astrojs/rss': - specifier: ^4.0.1 - version: 4.0.5 - '@astrojs/sitemap': - specifier: ^3.0.3 - version: 3.1.1 - '@astrojs/tailwind': - specifier: ^5.0.3 - version: 5.1.0(astro@4.4.8)(tailwindcss@3.4.1) - astro: - specifier: ^4.1.1 - version: 4.4.8(typescript@5.3.3) + test/cypress: + devDependencies: + '@babel/core': + specifier: ^7.23.5 + version: 7.24.0 + '@babel/preset-env': + specifier: ^7.23.5 + version: 7.24.0(@babel/core@7.24.0) + '@babel/preset-typescript': + specifier: ^7.23.3 + version: 7.23.3(@babel/core@7.24.0) + '@testing-library/svelte': + specifier: ^3.2.2 + version: 3.2.2(svelte@3.59.2) + autoprefixer: + specifier: ^10.4.16 + version: 10.4.17(postcss@8.4.35) + chai: + specifier: ^4.3.10 + version: 4.4.1 + del: + specifier: ^7.1.0 + version: 7.1.0 + eslint: + specifier: ^8.56.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.0) + eslint-plugin-prettier: + specifier: ^5.1.3 + version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) + eslint-plugin-svelte3: + specifier: ^4.0.0 + version: 4.0.0(eslint@8.57.0)(svelte@3.59.2) + glob: + specifier: ^10.3.10 + version: 10.3.10 + http-server: + specifier: ^14.1.1 + version: 14.1.1 + postcss: + specifier: ^8.4.33 + version: 8.4.35 + postinstall-postinstall: + specifier: ^2.1.0 + version: 2.1.0 + prettier: + specifier: ^3.1.1 + version: 3.2.5 + replace: + specifier: ^1.2.2 + version: 1.2.2 shepherd.js: specifier: workspace:* - version: link:.. - tailwindcss: - specifier: ^3.3.5 - version: 3.4.1 + version: link:../../shepherd.js + start-server-and-test: + specifier: ^2.0.3 + version: 2.0.3 + svelte: + specifier: ^3.59.2 + version: 3.59.2 typescript: - specifier: ^5.3.2 + specifier: ^5.3.3 version: 5.3.3 + + test/unit: devDependencies: - '@tailwindcss/typography': - specifier: ^0.5.10 - version: 0.5.10(tailwindcss@3.4.1) + '@babel/core': + specifier: ^7.23.5 + version: 7.24.0 + '@babel/preset-env': + specifier: ^7.23.5 + version: 7.24.0(@babel/core@7.24.0) + '@babel/preset-typescript': + specifier: ^7.23.3 + version: 7.23.3(@babel/core@7.24.0) + '@testing-library/jest-dom': + specifier: ^5.17.0 + version: 5.17.0 + '@testing-library/svelte': + specifier: ^3.2.2 + version: 3.2.2(svelte@3.59.2) + autoprefixer: + specifier: ^10.4.16 + version: 10.4.17(postcss@8.4.35) + babel-jest: + specifier: ^29.7.0 + version: 29.7.0(@babel/core@7.24.0) + babel-plugin-transform-es2015-modules-commonjs: + specifier: ^6.26.2 + version: 6.26.2 + del: + specifier: ^7.1.0 + version: 7.1.0 + eslint: + specifier: ^8.56.0 + version: 8.57.0 + eslint-config-prettier: + specifier: ^9.1.0 + version: 9.1.0(eslint@8.57.0) + eslint-plugin-jest: + specifier: ^27.6.3 + version: 27.9.0(eslint@8.57.0)(jest@29.7.0)(typescript@5.3.3) + eslint-plugin-prettier: + specifier: ^5.1.3 + version: 5.1.3(eslint-config-prettier@9.1.0)(eslint@8.57.0)(prettier@3.2.5) + eslint-plugin-svelte3: + specifier: ^4.0.0 + version: 4.0.0(eslint@8.57.0)(svelte@3.59.2) + glob: + specifier: ^10.3.10 + version: 10.3.10 + http-server: + specifier: ^14.1.1 + version: 14.1.1 + jest: + specifier: ^29.7.0 + version: 29.7.0 + jest-environment-jsdom: + specifier: ^29.7.0 + version: 29.7.0 + jest-expect-message: + specifier: ^1.1.3 + version: 1.1.3 + jest-transform-css: + specifier: ^6.0.1 + version: 6.0.1(postcss@8.4.35) + postcss: + specifier: ^8.4.33 + version: 8.4.35 + postinstall-postinstall: + specifier: ^2.1.0 + version: 2.1.0 + prettier: + specifier: ^3.1.1 + version: 3.2.5 + regenerator-runtime: + specifier: ^0.14.1 + version: 0.14.1 + replace: + specifier: ^1.2.2 + version: 1.2.2 + resize-observer-polyfill: + specifier: ^1.5.1 + version: 1.5.1 + shepherd.js: + specifier: workspace:* + version: link:../../shepherd.js + sinon: + specifier: ^17.0.1 + version: 17.0.1 + start-server-and-test: + specifier: ^2.0.3 + version: 2.0.3 + svelte: + specifier: ^3.59.2 + version: 3.59.2 + svelte-jester: + specifier: ^2.3.2 + version: 2.3.2(jest@29.7.0)(svelte@3.59.2) + typescript: + specifier: ^5.3.3 + version: 5.3.3 packages: @@ -3721,10 +3895,6 @@ packages: - typescript dev: false - /async@1.5.2: - resolution: {integrity: sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==} - dev: true - /async@2.6.4: resolution: {integrity: sha512-mzo5dfJYwAn29PeiJ0zvwTo04zj8HDJj0Mn8TD7sno7q12prdbnasKJHhkm2c1LgrhlJ0teaea8860oxi51mGA==} dependencies: @@ -3804,14 +3974,6 @@ packages: js-tokens: 3.0.2 dev: true - /babel-core@7.0.0-bridge.0(@babel/core@7.24.0): - resolution: {integrity: sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==} - peerDependencies: - '@babel/core': ^7.0.0-0 - dependencies: - '@babel/core': 7.24.0 - dev: true - /babel-jest@29.7.0(@babel/core@7.24.0): resolution: {integrity: sha512-BrvGY3xZSwEcCzKvKsCi2GgHqDqsYkOP4/by5xCgIwGXQxIEh+8ew3gmrE1y7XRR6LHZIj6yLYnUi/mm2KXKBg==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -4168,6 +4330,7 @@ packages: /buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} + requiresBuild: true dependencies: base64-js: 1.5.1 ieee754: 1.2.1 @@ -4574,18 +4737,6 @@ packages: engines: {iojs: '>= 1.0.0', node: '>= 0.12.0'} dev: true - /codeclimate-test-reporter@0.5.1: - resolution: {integrity: sha512-XCzmc8dH+R4orK11BCg5pBbXc35abxq9sept4YvUFRkFl9zb9MIVRrCKENe6U1TKAMTgvGJmrYyHn0y2lerpmg==} - engines: {node: '>= 4'} - deprecated: codeclimate-test-reporter has been deprecated in favor of our new unified test-reporter. Please visit https://docs.codeclimate.com/docs/configuring-test-coverage for details on setting up the new test-reporter. - hasBin: true - dependencies: - async: 1.5.2 - commander: 2.9.0 - lcov-parse: 0.0.10 - request: 2.88.2 - dev: true - /collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} dev: false @@ -4667,13 +4818,6 @@ packages: resolution: {integrity: sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==} dev: true - /commander@2.9.0: - resolution: {integrity: sha512-bmkUukX8wAOjHdN26xj5c4ctEV22TQ7dQYhSmuckKhToXrkUn0iIaolHdIxYYqD55nhpSPA9zPQ1yP57GdXP2A==} - engines: {node: '>= 0.6.x'} - dependencies: - graceful-readlink: 1.0.1 - dev: true - /commander@4.1.1: resolution: {integrity: sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==} engines: {node: '>= 6'} @@ -6398,10 +6542,6 @@ packages: /graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - /graceful-readlink@1.0.1: - resolution: {integrity: sha512-8tLu60LgxF6XpdbK8OW3FA+IfTNBn1ZHGHKF4KQbEeSkajYw5PlYJcKluntgegDPTg8UkHjpet1T82vk6TQ68w==} - dev: true - /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true @@ -6423,20 +6563,6 @@ packages: duplexer: 0.1.2 dev: true - /har-schema@2.0.0: - resolution: {integrity: sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==} - engines: {node: '>=4'} - dev: true - - /har-validator@5.1.5: - resolution: {integrity: sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==} - engines: {node: '>=6'} - deprecated: this library is no longer supported - dependencies: - ajv: 6.12.6 - har-schema: 2.0.0 - dev: true - /has-ansi@2.0.0: resolution: {integrity: sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==} engines: {node: '>=0.10.0'} @@ -6735,15 +6861,6 @@ packages: - supports-color dev: true - /http-signature@1.2.0: - resolution: {integrity: sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==} - engines: {node: '>=0.8', npm: '>=1.3.7'} - dependencies: - assert-plus: 1.0.0 - jsprim: 1.4.2 - sshpk: 1.18.0 - dev: true - /http-signature@1.3.6: resolution: {integrity: sha512-3adrsD6zqo4GsTqtO7FyrejHNv+NgiIfAfv68+jVlFmSr9OGy7zrxONceFRLKvnnZA5jbxQBX1u9PpB6Wi32Gw==} engines: {node: '>=0.10'} @@ -7958,16 +8075,6 @@ packages: engines: {'0': node >= 0.2.0} dev: true - /jsprim@1.4.2: - resolution: {integrity: sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==} - engines: {node: '>=0.6.0'} - dependencies: - assert-plus: 1.0.0 - extsprintf: 1.3.0 - json-schema: 0.4.0 - verror: 1.10.0 - dev: true - /jsprim@2.0.2: resolution: {integrity: sha512-gqXddjPqQ6G40VdnI6T6yObEC+pDNvyP95wdQhkWkg7crHH3km5qP1FsOXEkzEQwnz6gz5qGTn1c2Y52wP3OyQ==} engines: {'0': node >=0.6.0} @@ -8026,10 +8133,6 @@ packages: engines: {node: '> 0.8'} dev: true - /lcov-parse@0.0.10: - resolution: {integrity: sha512-YsL0D4QF/vNlNcHPXM832si9d2ROryFQ4r4JvcfMIiUYr1f6WULuO75YCtxNu4P+XMRHz0SfUc524+c+U3G5kg==} - dev: true - /leven@3.1.0: resolution: {integrity: sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==} engines: {node: '>=6'} @@ -9173,10 +9276,6 @@ packages: resolution: {integrity: sha512-VNTrAak/KhO2i8dqqnqnAHOa3cYBwXEZe9h+D5h/1ZqFSTEFHdM65lR7RoIqq3tBBYavsOXV84NoHXZ0AkPyqQ==} dev: false - /mutationobserver-shim@0.3.7: - resolution: {integrity: sha512-oRIDTyZQU96nAiz2AQyngwx1e89iApl2hN5AOYwyxLUB47UYsU3Wv9lJWqH5y/QdiYkc5HQLi23ZNB3fELdHcQ==} - dev: true - /mz@2.7.0: resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} dependencies: @@ -9436,10 +9535,6 @@ packages: resolution: {integrity: sha512-ub5E4+FBPKwAZx0UwIQOjYWGHTEq5sPqHQNRN8Z9e4A7u3Tj1weLJsL59yH9vmvqEtBHaOmT6cYQKIZOxp35FQ==} dev: true - /oauth-sign@0.9.0: - resolution: {integrity: sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==} - dev: true - /object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -10765,11 +10860,6 @@ packages: side-channel: 1.0.6 dev: true - /qs@6.5.3: - resolution: {integrity: sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==} - engines: {node: '>=0.6'} - dev: true - /querystringify@2.2.0: resolution: {integrity: sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==} dev: true @@ -11064,33 +11154,6 @@ packages: throttleit: 1.0.1 dev: true - /request@2.88.2: - resolution: {integrity: sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==} - engines: {node: '>= 6'} - deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 - dependencies: - aws-sign2: 0.7.0 - aws4: 1.12.0 - caseless: 0.12.0 - combined-stream: 1.0.8 - extend: 3.0.2 - forever-agent: 0.6.1 - form-data: 2.3.3 - har-validator: 5.1.5 - http-signature: 1.2.0 - is-typedarray: 1.0.0 - isstream: 0.1.2 - json-stringify-safe: 5.0.1 - mime-types: 2.1.35 - oauth-sign: 0.9.0 - performance-now: 2.1.0 - qs: 6.5.3 - safe-buffer: 5.2.1 - tough-cookie: 2.5.0 - tunnel-agent: 0.6.0 - uuid: 3.4.0 - dev: true - /require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -12328,14 +12391,6 @@ packages: dependencies: is-number: 7.0.0 - /tough-cookie@2.5.0: - resolution: {integrity: sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==} - engines: {node: '>=0.8'} - dependencies: - psl: 1.9.0 - punycode: 2.3.1 - dev: true - /tough-cookie@4.1.3: resolution: {integrity: sha512-aX/y5pVRkfRnfmuX+OdbSdXvPe6ieKX/G2s7e98f4poJHnqH3281gDPm/metm6E/WRamfx7WC4HUqkWHfQHprw==} engines: {node: '>=6'} @@ -12717,12 +12772,6 @@ packages: /util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} - /uuid@3.4.0: - resolution: {integrity: sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==} - deprecated: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details. - hasBin: true - dev: true - /uuid@8.3.2: resolution: {integrity: sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg==} hasBin: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index b1bed190a..47e3abc51 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,5 @@ packages: - - 'landing' \ No newline at end of file + - 'landing' + - 'shepherd.js' + - 'test/cypress' + - 'test/unit' \ No newline at end of file diff --git a/shepherd.js/.eslintignore b/shepherd.js/.eslintignore new file mode 100644 index 000000000..178135c2b --- /dev/null +++ b/shepherd.js/.eslintignore @@ -0,0 +1 @@ +/dist/ diff --git a/shepherd.js/.gitignore b/shepherd.js/.gitignore new file mode 100644 index 000000000..b97b04faf --- /dev/null +++ b/shepherd.js/.gitignore @@ -0,0 +1,14 @@ +# Editors +/.idea/ +/.vscode/ + +/.log/ +/.nyc_output/ +/coverage/ +/dist/ +/node_modules/ +/.DS_Store +/.sass-cache +/npm-debug.log* +/stats.html +/yarn-error.log diff --git a/.npmignore b/shepherd.js/.npmignore similarity index 87% rename from .npmignore rename to shepherd.js/.npmignore index 4ab7e69e3..f043826ec 100644 --- a/.npmignore +++ b/shepherd.js/.npmignore @@ -1,8 +1,3 @@ -.dependabot/ -.github/ -.idea/ -.vscode/ - coverage/ cypress/ docs-src/ diff --git a/shepherd.js/babel.config.js b/shepherd.js/babel.config.js new file mode 100644 index 000000000..a0d6ae55f --- /dev/null +++ b/shepherd.js/babel.config.js @@ -0,0 +1,18 @@ +module.exports = function (api) { + api.cache(true); + + return { + env: { + development: { + presets: [ + [ + '@babel/preset-env', + { + loose: true + } + ] + ] + } + } + }; +}; diff --git a/shepherd.js/package.json b/shepherd.js/package.json new file mode 100644 index 000000000..1b5c714b0 --- /dev/null +++ b/shepherd.js/package.json @@ -0,0 +1,109 @@ +{ + "name": "shepherd.js", + "version": "11.2.0", + "description": "Guide your users through a tour of your app.", + "keywords": [ + "site tour", + "tour", + "tutorial", + "shepherd" + ], + "homepage": "https://shepherdjs.dev", + "repository": { + "type": "git", + "url": "git+https://github.com/shepherd-pro/shepherd.git" + }, + "license": "MIT", + "maintainers": [ + "Robbie Wagner ", + "Chuck Carpenter " + ], + "exports": { + ".": { + "import": "./dist/shepherd.esm.js", + "default": "./dist/shepherd.js" + }, + "./*": { + "import": "./dist/*.esm.js", + "types": "./dist/*.d.ts", + "default": "./dist/*.js" + } + }, + "typesVersions": { + "*": { + "*": [ + "./dist/*" + ] + } + }, + "scripts": { + "build": "pnpm clean && rollup -c && pnpm postbuild", + "postbuild": "pnpm build:landing", + "build:landing": "pnpm -F landing build", + "clean": "rimraf ./dist", + "dev": "pnpm watch", + "docs": "node_modules/.bin/jsdoc -c .jsdoc.js --verbose", + "esdoc": "esdoc", + "lint:js": "eslint . --ext js", + "rewrite-paths": "replace 'SF:.*src' 'SF:src' coverage/lcov.info", + "start": "pnpm watch", + "test": "pnpm lint:js && pnpm test:ci", + "types:check": "pnpm tsc", + "watch": "pnpm clean && rollup -c --environment DEVELOPMENT --watch" + }, + "dependencies": { + "@floating-ui/dom": "^1.5.3", + "deepmerge": "^4.3.1" + }, + "devDependencies": { + "@babel/core": "^7.23.5", + "@babel/preset-env": "^7.23.5", + "@babel/preset-typescript": "^7.23.3", + "@rollup/plugin-babel": "^6.0.4", + "@rollup/plugin-commonjs": "^25.0.7", + "@rollup/plugin-node-resolve": "^15.2.3", + "@rollup/plugin-replace": "^5.0.5", + "@rollup/plugin-typescript": "^11.1.6", + "@testing-library/svelte": "^3.2.2", + "autoprefixer": "^10.4.16", + "cssnano": "^6.0.3", + "del": "^7.1.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-svelte3": "^4.0.0", + "glob": "^10.3.10", + "jsdoc": "^4.0.2", + "jsdoc-template-ship-shape": "^0.1.1", + "postcss": "^8.4.33", + "postinstall-postinstall": "^2.1.0", + "prettier": "^3.1.1", + "release-plan": "^0.8.0", + "replace": "^1.2.2", + "rimraf": "^5.0.5", + "rollup": "^4.12.0", + "rollup-plugin-analyzer": "^4.0.0", + "rollup-plugin-copy": "^3.5.0", + "rollup-plugin-filesize": "^10.0.0", + "rollup-plugin-license": "^3.2.0", + "rollup-plugin-livereload": "^2.0.5", + "rollup-plugin-postcss": "^4.0.2", + "rollup-plugin-serve": "^2.0.2", + "rollup-plugin-svelte": "^7.1.6", + "rollup-plugin-visualizer": "^5.11.0", + "svelte": "^3.59.2", + "svelte-preprocess": "^5.1.3", + "typescript": "^5.3.3" + }, + "packageManager": "pnpm@8.15.4", + "engines": { + "node": "18.* || >= 20" + }, + "publishConfig": { + "registry": "https://registry.npmjs.org" + }, + "authors": [ + "Adam Schwartz ", + "Zack Bloom " + ] +} diff --git a/rollup.config.mjs b/shepherd.js/rollup.config.mjs similarity index 89% rename from rollup.config.mjs rename to shepherd.js/rollup.config.mjs index 85178a168..af85afef6 100644 --- a/rollup.config.mjs +++ b/shepherd.js/rollup.config.mjs @@ -3,6 +3,7 @@ import fs from 'fs'; import cssnanoPlugin from 'cssnano'; import { babel } from '@rollup/plugin-babel'; import serve from 'rollup-plugin-serve'; +import copy from 'rollup-plugin-copy'; import livereload from 'rollup-plugin-livereload'; import commonjs from '@rollup/plugin-commonjs'; import filesize from 'rollup-plugin-filesize'; @@ -44,7 +45,9 @@ const plugins = [ // If we are running with --environment DEVELOPMENT, serve via browsersync for local development if (process.env.DEVELOPMENT) { - plugins.push(serve({ contentBase: ['.', 'dist', 'test/dummy'], open: true })); + plugins.push( + serve({ contentBase: ['.', 'dist', '../test/cypress/dummy'], open: true }) + ); plugins.push(livereload()); } @@ -120,7 +123,13 @@ if (!process.env.DEVELOPMENT) { banner }), filesize(), - visualizer() + visualizer(), + copy({ + targets: [ + { src: 'dist/css/shepherd.css', dest: '../test/cypress/dummy/css' }, + { src: 'dist/shepherd.js', dest: '../test/cypress/dummy/js' } + ] + }) ] } ); diff --git a/src/components/shepherd-button.svelte b/shepherd.js/src/components/shepherd-button.svelte similarity index 100% rename from src/components/shepherd-button.svelte rename to shepherd.js/src/components/shepherd-button.svelte diff --git a/src/components/shepherd-cancel-icon.svelte b/shepherd.js/src/components/shepherd-cancel-icon.svelte similarity index 100% rename from src/components/shepherd-cancel-icon.svelte rename to shepherd.js/src/components/shepherd-cancel-icon.svelte diff --git a/src/components/shepherd-content.svelte b/shepherd.js/src/components/shepherd-content.svelte similarity index 100% rename from src/components/shepherd-content.svelte rename to shepherd.js/src/components/shepherd-content.svelte diff --git a/src/components/shepherd-element.svelte b/shepherd.js/src/components/shepherd-element.svelte similarity index 100% rename from src/components/shepherd-element.svelte rename to shepherd.js/src/components/shepherd-element.svelte diff --git a/src/components/shepherd-footer.svelte b/shepherd.js/src/components/shepherd-footer.svelte similarity index 100% rename from src/components/shepherd-footer.svelte rename to shepherd.js/src/components/shepherd-footer.svelte diff --git a/src/components/shepherd-header.svelte b/shepherd.js/src/components/shepherd-header.svelte similarity index 100% rename from src/components/shepherd-header.svelte rename to shepherd.js/src/components/shepherd-header.svelte diff --git a/src/components/shepherd-modal.svelte b/shepherd.js/src/components/shepherd-modal.svelte similarity index 100% rename from src/components/shepherd-modal.svelte rename to shepherd.js/src/components/shepherd-modal.svelte diff --git a/src/components/shepherd-text.svelte b/shepherd.js/src/components/shepherd-text.svelte similarity index 100% rename from src/components/shepherd-text.svelte rename to shepherd.js/src/components/shepherd-text.svelte diff --git a/src/components/shepherd-title.svelte b/shepherd.js/src/components/shepherd-title.svelte similarity index 100% rename from src/components/shepherd-title.svelte rename to shepherd.js/src/components/shepherd-title.svelte diff --git a/src/evented.ts b/shepherd.js/src/evented.ts similarity index 100% rename from src/evented.ts rename to shepherd.js/src/evented.ts diff --git a/src/shepherd.ts b/shepherd.js/src/shepherd.ts similarity index 100% rename from src/shepherd.ts rename to shepherd.js/src/shepherd.ts diff --git a/src/step.ts b/shepherd.js/src/step.ts similarity index 99% rename from src/step.ts rename to shepherd.js/src/step.ts index cd194bdb2..e65964f32 100644 --- a/src/step.ts +++ b/shepherd.js/src/step.ts @@ -534,7 +534,7 @@ export class Step extends Evented { if (when) { Object.keys(when).forEach((event) => { - // @ts-expect-error TODO: figure out this type error + // @ts-expect-error TODO: fix this type error this.on(event, when[event], this); }); } diff --git a/src/tour.ts b/shepherd.js/src/tour.ts similarity index 100% rename from src/tour.ts rename to shepherd.js/src/tour.ts diff --git a/src/utils/auto-bind.ts b/shepherd.js/src/utils/auto-bind.ts similarity index 100% rename from src/utils/auto-bind.ts rename to shepherd.js/src/utils/auto-bind.ts diff --git a/src/utils/bind.ts b/shepherd.js/src/utils/bind.ts similarity index 100% rename from src/utils/bind.ts rename to shepherd.js/src/utils/bind.ts diff --git a/src/utils/cleanup.ts b/shepherd.js/src/utils/cleanup.ts similarity index 100% rename from src/utils/cleanup.ts rename to shepherd.js/src/utils/cleanup.ts diff --git a/src/utils/datarequest.ts b/shepherd.js/src/utils/datarequest.ts similarity index 100% rename from src/utils/datarequest.ts rename to shepherd.js/src/utils/datarequest.ts diff --git a/src/utils/floating-ui.ts b/shepherd.js/src/utils/floating-ui.ts similarity index 100% rename from src/utils/floating-ui.ts rename to shepherd.js/src/utils/floating-ui.ts diff --git a/src/utils/general.ts b/shepherd.js/src/utils/general.ts similarity index 100% rename from src/utils/general.ts rename to shepherd.js/src/utils/general.ts diff --git a/src/utils/overlay-path.ts b/shepherd.js/src/utils/overlay-path.ts similarity index 100% rename from src/utils/overlay-path.ts rename to shepherd.js/src/utils/overlay-path.ts diff --git a/src/utils/type-check.ts b/shepherd.js/src/utils/type-check.ts similarity index 100% rename from src/utils/type-check.ts rename to shepherd.js/src/utils/type-check.ts diff --git a/svelte.config.js b/shepherd.js/svelte.config.js similarity index 100% rename from svelte.config.js rename to shepherd.js/svelte.config.js diff --git a/tsconfig.json b/shepherd.js/tsconfig.json similarity index 97% rename from tsconfig.json rename to shepherd.js/tsconfig.json index aa62770a3..397e7846b 100644 --- a/tsconfig.json +++ b/shepherd.js/tsconfig.json @@ -38,10 +38,8 @@ "inlineSources": true, "skipLibCheck": true, "paths": { - "src/*": [ - "./src/*", - ], - }, + "src/*": ["./src/*"] + } }, "include": ["src/**/*"] } diff --git a/test/cypress/.gitignore b/test/cypress/.gitignore new file mode 100644 index 000000000..0141c300d --- /dev/null +++ b/test/cypress/.gitignore @@ -0,0 +1,23 @@ +# Editors +/.idea/ +/.vscode/ + +/.log/ +/.nyc_output/ +/coverage/ +/cypress/ +/dist/ +/dummy/css/shepherd.css +/dummy/js/shepherd.js +/node_modules/ +/.DS_Store +/.sass-cache +/npm-debug.log* +/stats.html +/yarn-error.log +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/cypress.config.js b/test/cypress/cypress.config.js similarity index 60% rename from cypress.config.js rename to test/cypress/cypress.config.js index 22909f00b..bfafafaae 100644 --- a/cypress.config.js +++ b/test/cypress/cypress.config.js @@ -1,7 +1,7 @@ const { defineConfig } = require('cypress'); module.exports = defineConfig({ - fixturesFolder: 'test/cypress/fixtures', + fixturesFolder: './fixtures', video: false, viewportWidth: 1440, viewportHeight: 900, @@ -9,10 +9,10 @@ module.exports = defineConfig({ // We've imported your old cypress plugins here. // You may want to clean this up later by importing these. setupNodeEvents(on, config) { - return require('./test/cypress/plugins/index.js')(on, config); + return require('./plugins/index.js')(on, config); }, baseUrl: 'http://localhost:9002', - specPattern: 'test/cypress/integration/**/*.cy.{js,jsx,ts,tsx}', - supportFile: 'test/cypress/support/index.js' + specPattern: './integration/**/*.cy.{js,jsx,ts,tsx}', + supportFile: './support/index.js' } }); diff --git a/test/dummy/assets/favicons/android-chrome-192x192.png b/test/cypress/dummy/assets/favicons/android-chrome-192x192.png similarity index 100% rename from test/dummy/assets/favicons/android-chrome-192x192.png rename to test/cypress/dummy/assets/favicons/android-chrome-192x192.png diff --git a/test/dummy/assets/favicons/android-chrome-512x512.png b/test/cypress/dummy/assets/favicons/android-chrome-512x512.png similarity index 100% rename from test/dummy/assets/favicons/android-chrome-512x512.png rename to test/cypress/dummy/assets/favicons/android-chrome-512x512.png diff --git a/test/dummy/assets/favicons/apple-touch-icon.png b/test/cypress/dummy/assets/favicons/apple-touch-icon.png similarity index 100% rename from test/dummy/assets/favicons/apple-touch-icon.png rename to test/cypress/dummy/assets/favicons/apple-touch-icon.png diff --git a/test/dummy/assets/favicons/browserconfig.xml b/test/cypress/dummy/assets/favicons/browserconfig.xml similarity index 100% rename from test/dummy/assets/favicons/browserconfig.xml rename to test/cypress/dummy/assets/favicons/browserconfig.xml diff --git a/test/dummy/assets/favicons/favicon-16x16.png b/test/cypress/dummy/assets/favicons/favicon-16x16.png similarity index 100% rename from test/dummy/assets/favicons/favicon-16x16.png rename to test/cypress/dummy/assets/favicons/favicon-16x16.png diff --git a/test/dummy/assets/favicons/favicon-32x32.png b/test/cypress/dummy/assets/favicons/favicon-32x32.png similarity index 100% rename from test/dummy/assets/favicons/favicon-32x32.png rename to test/cypress/dummy/assets/favicons/favicon-32x32.png diff --git a/test/dummy/assets/favicons/favicon.ico b/test/cypress/dummy/assets/favicons/favicon.ico similarity index 100% rename from test/dummy/assets/favicons/favicon.ico rename to test/cypress/dummy/assets/favicons/favicon.ico diff --git a/test/dummy/assets/favicons/manifest.json b/test/cypress/dummy/assets/favicons/manifest.json similarity index 100% rename from test/dummy/assets/favicons/manifest.json rename to test/cypress/dummy/assets/favicons/manifest.json diff --git a/test/dummy/assets/favicons/mstile-150x150.png b/test/cypress/dummy/assets/favicons/mstile-150x150.png similarity index 100% rename from test/dummy/assets/favicons/mstile-150x150.png rename to test/cypress/dummy/assets/favicons/mstile-150x150.png diff --git a/test/dummy/assets/favicons/safari-pinned-tab.svg b/test/cypress/dummy/assets/favicons/safari-pinned-tab.svg similarity index 100% rename from test/dummy/assets/favicons/safari-pinned-tab.svg rename to test/cypress/dummy/assets/favicons/safari-pinned-tab.svg diff --git a/test/dummy/css/fonts.css b/test/cypress/dummy/css/fonts.css similarity index 100% rename from test/dummy/css/fonts.css rename to test/cypress/dummy/css/fonts.css diff --git a/test/dummy/css/prism.css b/test/cypress/dummy/css/prism.css similarity index 100% rename from test/dummy/css/prism.css rename to test/cypress/dummy/css/prism.css diff --git a/test/dummy/css/welcome.css b/test/cypress/dummy/css/welcome.css similarity index 100% rename from test/dummy/css/welcome.css rename to test/cypress/dummy/css/welcome.css diff --git a/test/cypress/dummy/index.html b/test/cypress/dummy/index.html new file mode 100644 index 000000000..e2576f7bc --- /dev/null +++ b/test/cypress/dummy/index.html @@ -0,0 +1,129 @@ + + + + + Shepherd — Guide your users through a tour of your app. + + + + + + + + + + + + + + + + + + + + + + +
+
+
+

Shepherd

+ +

Guide your users through a tour of your app.

+
+ +
+

Including

+ + +
+ +
+

Example

+ +
+          
+            const tour = new Shepherd.Tour({
+              defaultStepOptions: {
+                classes: 'shadow-md bg-purple-dark',
+                scrollTo: true
+              }
+            });
+
+            tour.addStep({
+              title: 'Example Shepherd',
+              text: 'Creating a Shepherd is easy too! Just create ...',
+              attachTo: {
+                element: '.hero-example',
+                on: 'bottom'
+              },
+              advanceOn: {
+                selector: '.docs-link',
+                event: 'click'
+              },
+              id: 'example'
+            });
+
+            tour.start();
+          
+        
+
+ +
+

+ ★ on Github +    + View Docs +

+
+
+ +
+
+
+ + + + + + + + diff --git a/test/dummy/js/prism.js b/test/cypress/dummy/js/prism.js similarity index 100% rename from test/dummy/js/prism.js rename to test/cypress/dummy/js/prism.js diff --git a/test/dummy/sheep.svg b/test/cypress/dummy/sheep.svg similarity index 100% rename from test/dummy/sheep.svg rename to test/cypress/dummy/sheep.svg diff --git a/test/examples/destroying-elements.html b/test/cypress/examples/destroying-elements.html similarity index 75% rename from test/examples/destroying-elements.html rename to test/cypress/examples/destroying-elements.html index 31f41a7ca..bb7dba2b5 100644 --- a/test/examples/destroying-elements.html +++ b/test/cypress/examples/destroying-elements.html @@ -1,7 +1,7 @@ - - + + diff --git a/test/cypress/integration/a11y.cy.js b/test/cypress/integration/a11y.cy.js index ba8beebed..97759faf4 100644 --- a/test/cypress/integration/a11y.cy.js +++ b/test/cypress/integration/a11y.cy.js @@ -6,7 +6,7 @@ describe('a11y', () => { beforeEach(() => { Shepherd = null; - cy.visit('/test/dummy/', { + cy.visit('/dummy/', { onLoad(contentWindow) { if (contentWindow.Shepherd) { return Shepherd = contentWindow.Shepherd; diff --git a/test/cypress/integration/destroying-elements.cy.js b/test/cypress/integration/destroying-elements.cy.js index a7768981e..44185de72 100644 --- a/test/cypress/integration/destroying-elements.cy.js +++ b/test/cypress/integration/destroying-elements.cy.js @@ -6,7 +6,7 @@ describe('destroying-elements', () => { beforeEach(() => { Shepherd = null; - cy.visit('/test/examples/destroying-elements', { + cy.visit('/examples/destroying-elements', { onLoad(contentWindow) { if (contentWindow.Shepherd) { return Shepherd = contentWindow.Shepherd; diff --git a/test/cypress/integration/element-targeting.cy.js b/test/cypress/integration/element-targeting.cy.js index 317b9c3e0..7bc9a1223 100644 --- a/test/cypress/integration/element-targeting.cy.js +++ b/test/cypress/integration/element-targeting.cy.js @@ -6,7 +6,7 @@ describe('Attaching tooltips to target elements in the DOM on each step', () => beforeEach(() => { Shepherd = null; - cy.visit('/test/dummy/', { + cy.visit('/dummy/', { onLoad(contentWindow) { if (contentWindow.Shepherd) { return Shepherd = contentWindow.Shepherd; diff --git a/test/cypress/integration/modal.cy.js b/test/cypress/integration/modal.cy.js index 0fe454c72..f46c035b9 100644 --- a/test/cypress/integration/modal.cy.js +++ b/test/cypress/integration/modal.cy.js @@ -7,7 +7,7 @@ describe('Modal mode', () => { beforeEach(() => { Shepherd = null; - cy.visit('/test/dummy/', { + cy.visit('/dummy/', { onLoad(contentWindow) { if (contentWindow.Shepherd) { return Shepherd = contentWindow.Shepherd; diff --git a/test/cypress/integration/test.acceptance.cy.js b/test/cypress/integration/test.acceptance.cy.js index 68855af02..8b89a7a97 100644 --- a/test/cypress/integration/test.acceptance.cy.js +++ b/test/cypress/integration/test.acceptance.cy.js @@ -7,7 +7,7 @@ describe('Shepherd Acceptance Tests', () => { beforeEach(() => { Shepherd = null; - cy.visit('/test/dummy/', { + cy.visit('/dummy/', { onLoad(contentWindow) { if (contentWindow.Shepherd) { return Shepherd = contentWindow.Shepherd; diff --git a/test/cypress/package.json b/test/cypress/package.json new file mode 100644 index 000000000..168c2bedd --- /dev/null +++ b/test/cypress/package.json @@ -0,0 +1,44 @@ +{ + "name": "cypress-tests", + "private": "true", + "description": "Cypress tests for Shepherd", + "repository": { + "type": "git", + "url": "git+https://github.com/shepherd-pro/shepherd.git" + }, + "license": "MIT", + "scripts": { + "cy:open": "./node_modules/.bin/cypress open", + "cy:run:chrome": "cypress run --browser chrome", + "start-test-server": "http-server -p 9002", + "test:ci:chrome": "start-server-and-test start-test-server http://127.0.0.1:9002 cy:run:chrome", + "test:watch": "start-server-and-test start-test-server http://127.0.0.1:9002 cy:open" + }, + "devDependencies": { + "@babel/core": "^7.23.5", + "@babel/preset-env": "^7.23.5", + "@babel/preset-typescript": "^7.23.3", + "@testing-library/svelte": "^3.2.2", + "autoprefixer": "^10.4.16", + "chai": "^4.3.10", + "del": "^7.1.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-svelte3": "^4.0.0", + "glob": "^10.3.10", + "http-server": "^14.1.1", + "postcss": "^8.4.33", + "postinstall-postinstall": "^2.1.0", + "prettier": "^3.1.1", + "replace": "^1.2.2", + "shepherd.js": "workspace:*", + "start-server-and-test": "^2.0.3", + "svelte": "^3.59.2", + "typescript": "^5.3.3" + }, + "packageManager": "pnpm@8.15.4", + "engines": { + "node": "18.* || >= 20" + } +} diff --git a/test/dummy/index.html b/test/dummy/index.html deleted file mode 100644 index e7d529321..000000000 --- a/test/dummy/index.html +++ /dev/null @@ -1,95 +0,0 @@ - - - - - - Shepherd — Guide your users through a tour of your app. - - - - - - - - - - - - - - - - - - - - - - -
-
-
-

Shepherd

- -

Guide your users through a tour of your app.

-
- -
-

Including

- - -
- -
-

Example

- -
-          
-            const tour = new Shepherd.Tour({
-              defaultStepOptions: {
-                classes: 'shadow-md bg-purple-dark',
-                scrollTo: true
-              }
-            });
-
-            tour.addStep({
-              title: 'Example Shepherd',
-              text: 'Creating a Shepherd is easy too! Just create ...',
-              attachTo: {
-                element: '.hero-example',
-                on: 'bottom'
-              },
-              advanceOn: {
-                selector: '.docs-link',
-                event: 'click'
-              },
-              id: 'example'
-            });
-
-            tour.start();
-          
-        
-
- -
-

- ★ on Github    - View Docs -

-
-
- -
-
-
- - - - - - - - - \ No newline at end of file diff --git a/test/unit/.gitignore b/test/unit/.gitignore new file mode 100644 index 000000000..f6c96cf96 --- /dev/null +++ b/test/unit/.gitignore @@ -0,0 +1,21 @@ +# Editors +/.idea/ +/.vscode/ + +/.log/ +/.nyc_output/ +/coverage/ +/docs/ +/dist/ +/node_modules/ +/.DS_Store +/.sass-cache +/npm-debug.log* +/stats.html +/yarn-error.log +.yarn/* +!.yarn/patches +!.yarn/plugins +!.yarn/releases +!.yarn/sdks +!.yarn/versions diff --git a/babel.config.js b/test/unit/babel.config.js similarity index 100% rename from babel.config.js rename to test/unit/babel.config.js diff --git a/test/unit/components/shepherd-button.spec.js b/test/unit/components/shepherd-button.spec.js index fe7a4f108..4fa844fd4 100644 --- a/test/unit/components/shepherd-button.spec.js +++ b/test/unit/components/shepherd-button.spec.js @@ -1,5 +1,5 @@ import { cleanup, render } from '@testing-library/svelte'; -import ShepherdButton from '../../../src/components/shepherd-button.svelte'; +import ShepherdButton from '../../../shepherd.js/src/components/shepherd-button.svelte'; describe('component/ShepherdButton', () => { beforeEach(cleanup); diff --git a/test/unit/components/shepherd-content.spec.js b/test/unit/components/shepherd-content.spec.js index c8ae97393..25ba35efc 100644 --- a/test/unit/components/shepherd-content.spec.js +++ b/test/unit/components/shepherd-content.spec.js @@ -1,5 +1,5 @@ import { cleanup, render } from '@testing-library/svelte'; -import ShepherdContent from '../../../src/components/shepherd-content.svelte'; +import ShepherdContent from '../../../shepherd.js/src/components/shepherd-content.svelte'; describe('components/ShepherdContent', () => { beforeEach(cleanup); diff --git a/test/unit/components/shepherd-element.spec.js b/test/unit/components/shepherd-element.spec.js index a00156c2f..10cecf7cb 100644 --- a/test/unit/components/shepherd-element.spec.js +++ b/test/unit/components/shepherd-element.spec.js @@ -1,8 +1,8 @@ import { cleanup, fireEvent, render } from '@testing-library/svelte'; -import ShepherdElement from '../../../src/components/shepherd-element.svelte'; -import { Step } from '../../../src/step'; +import ShepherdElement from '../../../shepherd.js/src/components/shepherd-element.svelte'; +import { Step } from '../../../shepherd.js/src/step'; import { spy, stub } from 'sinon'; -import { Tour } from '../../../src/tour'; +import { Tour } from '../../../shepherd.js/src/tour'; describe('components/ShepherdElement', () => { describe('arrow', () => { diff --git a/test/unit/components/shepherd-footer.spec.js b/test/unit/components/shepherd-footer.spec.js index 8e6431adb..7491a6c94 100644 --- a/test/unit/components/shepherd-footer.spec.js +++ b/test/unit/components/shepherd-footer.spec.js @@ -1,5 +1,5 @@ import { cleanup, render } from '@testing-library/svelte'; -import ShepherdFooter from '../../../src/components/shepherd-footer.svelte'; +import ShepherdFooter from '../../../shepherd.js/src/components/shepherd-footer.svelte'; import defaultButtons from '../../cypress/utils/default-buttons.js'; describe('components/ShepherdFooter', () => { diff --git a/test/unit/components/shepherd-header.spec.js b/test/unit/components/shepherd-header.spec.js index 8263b3142..604785bed 100644 --- a/test/unit/components/shepherd-header.spec.js +++ b/test/unit/components/shepherd-header.spec.js @@ -1,8 +1,8 @@ import { cleanup, fireEvent, render } from '@testing-library/svelte'; import { spy } from 'sinon'; -import ShepherdHeader from '../../../src/components/shepherd-header.svelte'; -import { Tour } from '../../../src/tour'; -import { Step } from '../../../src/step'; +import ShepherdHeader from '../../../shepherd.js/src/components/shepherd-header.svelte'; +import { Tour } from '../../../shepherd.js/src/tour'; +import { Step } from '../../../shepherd.js/src/step'; describe('components/ShepherdHeader', () => { beforeEach(cleanup); diff --git a/test/unit/components/shepherd-modal.spec.js b/test/unit/components/shepherd-modal.spec.js index 486effabf..facdb3233 100644 --- a/test/unit/components/shepherd-modal.spec.js +++ b/test/unit/components/shepherd-modal.spec.js @@ -1,4 +1,4 @@ -import ShepherdModal from '../../../src/components/shepherd-modal.svelte'; +import ShepherdModal from '../../../shepherd.js/src/components/shepherd-modal.svelte'; import { stub } from 'sinon'; const classPrefix = ''; diff --git a/test/unit/components/shepherd-text.spec.js b/test/unit/components/shepherd-text.spec.js index ab7b86f5f..bb1f5fdaf 100644 --- a/test/unit/components/shepherd-text.spec.js +++ b/test/unit/components/shepherd-text.spec.js @@ -1,5 +1,5 @@ import { cleanup, render } from '@testing-library/svelte'; -import ShepherdText from '../../../src/components/shepherd-text.svelte'; +import ShepherdText from '../../../shepherd.js/src/components/shepherd-text.svelte'; describe('components/ShepherdText', () => { beforeEach(cleanup); diff --git a/test/unit/components/shepherd-title.spec.js b/test/unit/components/shepherd-title.spec.js index 862af1e93..71f366ee6 100644 --- a/test/unit/components/shepherd-title.spec.js +++ b/test/unit/components/shepherd-title.spec.js @@ -1,5 +1,5 @@ import { cleanup, render } from '@testing-library/svelte'; -import ShepherdTitle from '../../../src/components/shepherd-title.svelte'; +import ShepherdTitle from '../../../shepherd.js/src/components/shepherd-title.svelte'; describe('components/ShepherdTitle', () => { beforeEach(cleanup); diff --git a/test/unit/evented.spec.js b/test/unit/evented.spec.js index 469320750..a093d76ae 100644 --- a/test/unit/evented.spec.js +++ b/test/unit/evented.spec.js @@ -1,4 +1,4 @@ -import { Evented } from '../../src/evented'; +import { Evented } from '../../shepherd.js/src/evented'; import { spy } from 'sinon'; describe('Evented', () => { diff --git a/jest.config.js b/test/unit/jest.config.js similarity index 78% rename from jest.config.js rename to test/unit/jest.config.js index e953afe13..3b1cd4a6a 100644 --- a/jest.config.js +++ b/test/unit/jest.config.js @@ -7,11 +7,11 @@ module.exports = { // An array of glob patterns indicating a set of files for which coverage information should be collected collectCoverageFrom: [ - 'src/*.ts', - 'src/*.svelte', - 'src/components/**/*.svelte', - 'src/utils/*.ts', - 'src/utils/*.svelte' + '../../shepherd.js/src/*.ts', + '../../shepherd.js/src/*.svelte', + '../../shepherd.js/src/components/**/*.svelte', + '../../shepherd.js/src/utils/*.ts', + '../../shepherd.js/src/utils/*.svelte' ], // The directory where Jest should output its coverage files @@ -28,10 +28,10 @@ module.exports = { rootDir: './', // A list of paths to directories that Jest should use to search for files in - roots: ['/test/unit'], + roots: [''], // The path to a module that runs some code to configure or set up the testing framework before each test - setupFilesAfterEnv: ['/test/unit/setupTests.js'], + setupFilesAfterEnv: ['/setupTests.js'], testEnvironment: 'jsdom', @@ -41,7 +41,7 @@ module.exports = { '^.+\\.svelte$': [ 'svelte-jester', { - preprocess: true, + preprocess: "../../shepherd.js/svelte.config.js", compilerOptions: { dev: false } diff --git a/test/unit/package.json b/test/unit/package.json new file mode 100644 index 000000000..643c156d8 --- /dev/null +++ b/test/unit/package.json @@ -0,0 +1,54 @@ +{ + "name": "unit-tests", + "private": "true", + "description": "Jest unit tests for Shepherd", + "repository": { + "type": "git", + "url": "git+https://github.com/shepherd-pro/shepherd.git" + }, + "license": "MIT", + "scripts": { + "lint:js": "eslint .", + "test:ci": "jest --coverage", + "test:watch": "jest --watch", + "view-coverage": "http-server -p 9003 ./coverage/lcov-report -o" + }, + "devDependencies": { + "@babel/core": "^7.23.5", + "@babel/preset-env": "^7.23.5", + "@babel/preset-typescript": "^7.23.3", + "@testing-library/jest-dom": "^5.17.0", + "@testing-library/svelte": "^3.2.2", + "autoprefixer": "^10.4.16", + "babel-jest": "^29.7.0", + "babel-plugin-transform-es2015-modules-commonjs": "^6.26.2", + "del": "^7.1.0", + "eslint": "^8.56.0", + "eslint-config-prettier": "^9.1.0", + "eslint-plugin-jest": "^27.6.3", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-svelte3": "^4.0.0", + "glob": "^10.3.10", + "http-server": "^14.1.1", + "jest": "^29.7.0", + "jest-environment-jsdom": "^29.7.0", + "jest-expect-message": "^1.1.3", + "jest-transform-css": "^6.0.1", + "postcss": "^8.4.33", + "postinstall-postinstall": "^2.1.0", + "prettier": "^3.1.1", + "regenerator-runtime": "^0.14.1", + "replace": "^1.2.2", + "resize-observer-polyfill": "^1.5.1", + "shepherd.js": "workspace:*", + "sinon": "^17.0.1", + "start-server-and-test": "^2.0.3", + "svelte": "^3.59.2", + "svelte-jester": "^2.3.2", + "typescript": "^5.3.3" + }, + "packageManager": "pnpm@8.15.4", + "engines": { + "node": "18.* || >= 20" + } +} diff --git a/test/unit/pro.spec.js b/test/unit/pro.spec.js index 75498bc2f..3005f81c4 100644 --- a/test/unit/pro.spec.js +++ b/test/unit/pro.spec.js @@ -1,5 +1,5 @@ -import Shepherd from '../../src/shepherd'; -import DataRequest from '../../src/utils/datarequest'; +import Shepherd from '../../shepherd.js/src/shepherd'; +import DataRequest from '../../shepherd.js/src/utils/datarequest'; describe('Shepherd Pro', function () { const dataRequesterMock = jest diff --git a/test/unit/server.spec.js b/test/unit/server.spec.js index 4c10c3a0e..4cc0c33a8 100644 --- a/test/unit/server.spec.js +++ b/test/unit/server.spec.js @@ -2,7 +2,7 @@ * @jest-environment node */ -import Shepherd from '../../src/shepherd'; +import Shepherd from '../../shepherd.js/src/shepherd'; describe('Server Side Render', function () { describe('Tour constructor', function () { diff --git a/test/unit/step.spec.js b/test/unit/step.spec.js index eade0e15e..42249dff3 100644 --- a/test/unit/step.spec.js +++ b/test/unit/step.spec.js @@ -1,7 +1,7 @@ import { spy } from 'sinon'; -import Shepherd from '../../src/shepherd'; -import { Step } from '../../src/step'; -import { Tour } from '../../src/tour'; +import Shepherd from '../../shepherd.js/src/shepherd'; +import { Step } from '../../shepherd.js/src/step'; +import { Tour } from '../../shepherd.js/src/tour'; import ResizeObserver from 'resize-observer-polyfill'; import { offset } from '@floating-ui/dom'; diff --git a/test/unit/tour.spec.js b/test/unit/tour.spec.js index 8e8625821..a0f4303d6 100644 --- a/test/unit/tour.spec.js +++ b/test/unit/tour.spec.js @@ -1,12 +1,13 @@ import _ from 'lodash'; import { stub } from 'sinon'; -import Shepherd from '../../src/shepherd'; +import Shepherd from '../../shepherd.js/src/shepherd'; import ResizeObserver from 'resize-observer-polyfill'; -import { Step } from '../../src/step'; -import { setupTooltip } from '../../src/utils/floating-ui'; +import { setupTooltip } from '../../shepherd.js/src/utils/floating-ui'; import { spy } from 'sinon'; import { offset } from "@floating-ui/dom"; +const { Step } = Shepherd; + // since importing non UMD, needs assignment window.Shepherd = Shepherd; window.ResizeObserver = ResizeObserver; diff --git a/test/unit/utils/bind.spec.js b/test/unit/utils/bind.spec.js index 0738a16a6..aab104208 100644 --- a/test/unit/utils/bind.spec.js +++ b/test/unit/utils/bind.spec.js @@ -1,5 +1,5 @@ -import { bindAdvance } from '../../../src/utils/bind'; -import { Step } from '../../../src/step'; +import { bindAdvance } from '../../../shepherd.js/src/utils/bind'; +import { Step } from '../../../shepherd.js/src/step'; import { spy } from 'sinon'; describe('Bind Utils', function() { diff --git a/test/unit/utils/cleanup.spec.js b/test/unit/utils/cleanup.spec.js index fc143b59b..539b653e6 100644 --- a/test/unit/utils/cleanup.spec.js +++ b/test/unit/utils/cleanup.spec.js @@ -1,4 +1,4 @@ -import { cleanupSteps } from '../../../src/utils/cleanup'; +import { cleanupSteps } from '../../../shepherd.js/src/utils/cleanup'; describe('Cleanup Utils', function() { // Create some elements to use to attach to diff --git a/test/unit/utils/datarequest.spec.js b/test/unit/utils/datarequest.spec.js index 23f99b97d..57fd32aab 100644 --- a/test/unit/utils/datarequest.spec.js +++ b/test/unit/utils/datarequest.spec.js @@ -1,4 +1,4 @@ -import DataRequest from '../../../src/utils/datarequest'; +import DataRequest from '../../../shepherd.js/src/utils//datarequest'; global.fetch = jest.fn(); diff --git a/test/unit/utils/general.spec.js b/test/unit/utils/general.spec.js index 8511cfdc0..6d1f86d24 100644 --- a/test/unit/utils/general.spec.js +++ b/test/unit/utils/general.spec.js @@ -1,7 +1,7 @@ import { spy } from 'sinon'; -import { Step } from '../../../src/step'; -import { parseAttachTo, shouldCenterStep } from '../../../src/utils/general'; -import { getFloatingUIOptions } from '../../../src/utils/floating-ui'; +import { Step } from '../../../shepherd.js/src/step'; +import { parseAttachTo, shouldCenterStep } from '../../../shepherd.js//src/utils/general'; +import { getFloatingUIOptions } from '../../../shepherd.js/src/utils/floating-ui'; describe('General Utils', function () { let optionsElement;