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
2 changes: 1 addition & 1 deletion .github/actions/smoke_tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ runs:
- name: Smoke test scripts
run: |-
# Basic smoke-tests for uncommonly run scripts in a project
node ./scripts/smoke-test-npm-scripts.js --dir ${{ inputs.dir }}
node ./scripts/smoke-test-npm-scripts.js --dir "${{ inputs.dir }}"
shell: bash
8 changes: 4 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,10 @@ jobs:
strategy:
fail-fast: false
matrix:
template: [retail-react-app-test-project, retail-react-app-demo, express-minimal-test-project, typescript-minimal-test-project]
template: [retail-react-app-test-project, express-minimal-test-project, typescript-minimal-test-project]
runs-on: ubuntu-latest
env:
IS_TEMPLATE_FROM_RETAIL_REACT_APP: ${{ matrix.template == 'retail-react-app-test-project' || matrix.template == 'retail-react-app-demo' }}
IS_TEMPLATE_FROM_RETAIL_REACT_APP: ${{ matrix.template == 'retail-react-app-test-project' }}
PROJECT_DIR: generated-${{ matrix.template }}
steps:
- name: Checkout
Expand Down Expand Up @@ -282,10 +282,10 @@ jobs:
strategy:
fail-fast: false
matrix:
template: [retail-react-app-test-project, retail-react-app-demo, express-minimal-test-project, typescript-minimal-test-project]
template: [retail-react-app-test-project, express-minimal-test-project, typescript-minimal-test-project]
runs-on: windows-latest
env:
IS_TEMPLATE_FROM_RETAIL_REACT_APP: ${{ matrix.template == 'retail-react-app-test-project' || matrix.template == 'retail-react-app-demo' }}
IS_TEMPLATE_FROM_RETAIL_REACT_APP: ${{ matrix.template == 'retail-react-app-test-project' }}
PROJECT_DIR: generated-${{ matrix.template }}
steps:
- name: Checkout
Expand Down
3 changes: 2 additions & 1 deletion packages/pwa-kit-dev/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
## v4.0.0-extensibility-preview.3 (Dec 13, 2024)
## v4.0.0-extensibility-preview.3 (Jan 14, 2025)
- Ensure build command works on windows when path includes spaces. [#2204](https://github.com/SalesforceCommerceCloud/pwa-kit/pull/2204)
## v4.0.0-extensibility-preview.2 (Dec 09, 2024)
## v4.0.0-extensibility-preview.1 (Dec 09, 2024)
## v4.0.0-extensibility-preview.0 (Nov 28, 2024)
Expand Down
2 changes: 1 addition & 1 deletion packages/pwa-kit-dev/bin/pwa-kit-dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ const main = async () => {
? projectWebpack
: p.join(__dirname, '..', 'configs', 'webpack', 'config.js')
fse.emptyDirSync(buildDirectory)
execSync(`${webpack} --config ${webpackConf}`, {
execSync(`"${webpack}" --config "${webpackConf}"`, {
env: {
NODE_ENV: 'production',
...process.env,
Expand Down
4 changes: 2 additions & 2 deletions packages/pwa-kit-extension-sdk/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ module.exports = {
global: {
branches: 60,
functions: 80,
lines: 80,
statements: 80
lines: 75,
statements: 75
}
},
testPathIgnorePatterns: ['bin/*', 'coverage/*', 'dist/*', 'node_modules/*', 'scripts/*'],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/BSD-3-Clause
*/
import {LoaderContext} from 'webpack'
import os from 'os'
import path from 'path'
import resolve from 'resolve'

Expand Down Expand Up @@ -83,9 +84,13 @@ const OverrideResolverLoader = function (this: LoaderContext<any>) {
// Adjust the `basedir` dynamically for resolving relative imports in the new file
const newBasedir = path.dirname(resolvedResourcePath)

// Provided a match and group representing a relative path, replace it with an absolute path using the new base directory.
const convertRelativePaths = (match: string, relativePath: string) => {
const absolutePath = path.resolve(newBasedir, relativePath)
let absolutePath = path.resolve(newBasedir, relativePath)

if (os.platform() === 'win32') {
absolutePath = absolutePath.replace(/\\/g, '\\\\')
}

return match.replace(relativePath, absolutePath)
}

Expand Down
96 changes: 96 additions & 0 deletions packages/template-typescript-minimal/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions packages/template-typescript-minimal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"@types/react": "~18.2.0",
"@types/react-dom": "~18.2.1",
"@types/react-router-dom": "~5.3.3",
"cross-env": "^5.2.1",
"framer-motion": "^11.5.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
Loading