diff --git a/.npmrc b/.npmrc index fbd18e6ead..618246ea95 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ engine-strict=true -provenance=true \ No newline at end of file +provenance=true +ignore-scripts=true \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 3e5d50cccf..a0ff6e24b8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,6 @@ "": { "name": "@deephaven/web-client-ui", "version": "0.0.1", - "hasInstallScript": true, "workspaces": [ "packages/*" ], diff --git a/package.json b/package.json index 19fb057fa3..6c96815e4c 100644 --- a/package.json +++ b/package.json @@ -10,9 +10,7 @@ "npm": ">=11" }, "scripts": { - "postinstall": "node ./skip.js || run-s build:necessary", "clean:build": "rimraf packages/*/dist packages/*/build", - "postclean:build": "npm run clean:types", "clean:cache": "run-s clean:cache:*", "clean:cache:eslint": "rimraf .eslintcache", "clean:cache:jest": "jest --clearCache", @@ -33,15 +31,14 @@ "analyze": "lerna run analyze", "preview": "lerna run --scope=@deephaven/{code-studio,embed-widget} preview --stream", "preview:app": "lerna run --scope=@deephaven/code-studio preview --stream", - "prestart": "npm run build:necessary", - "start": "run-p watch:types start:*", + "preview:embed-widget": "lerna run --scope=@deephaven/embed-widget preview --stream", + "dev": "run-p watch:types start:*", + "start": "run-s build:necessary dev", "start:app": "lerna run start --scope=@deephaven/code-studio --stream", "start:embed-widget": "lerna run start --scope=@deephaven/embed-widget --stream", - "pretest": "npm run build:necessary", "test": "jest --watch --changedSince origin/main", "test:debug": "node --inspect-brk node_modules/.bin/jest --config jest.config.unit.cjs --runInBand --watch", - "pretest:unit": "npm run pretest", - "test:unit": "jest --config jest.config.unit.cjs", + "test:unit": "npm run build:necessary && jest --config jest.config.unit.cjs", "test:lint": "jest --config jest.config.lint.cjs", "test:golden-layout": "lerna run test:ci --scope=@deephaven/golden-layout --stream", "version-bump": "lerna version --conventional-commits --create-release github", diff --git a/packages/golden-layout/package.json b/packages/golden-layout/package.json index e7a156716a..d1bd580b00 100644 --- a/packages/golden-layout/package.json +++ b/packages/golden-layout/package.json @@ -22,10 +22,10 @@ "build": "cross-env NODE_ENV=production run-p build:*", "build:sass": "sass --embed-sources --load-path=../../node_modules --style=compressed ./src:./dist ./scss:./css", "build:babel": "babel ./src --out-dir ./dist --extensions \".ts,.js,.tsx,.jsx\" --source-maps --root-mode upward", - "pretest": "npm run build", - "test": "karma start karma.conf.cjs", - "pretest:ci": "npm run pretest", - "test:ci": "karma start karma.conf.cjs --single-run" + "test": "run-s build test-start", + "test-start": "karma start karma.conf.cjs", + "test:ci": "run-s build test:ci-start", + "test:ci-start": "karma start karma.conf.cjs --single-run" }, "repository": { "type": "git", diff --git a/skip.js b/skip.js deleted file mode 100644 index ce436a6b3f..0000000000 --- a/skip.js +++ /dev/null @@ -1,6 +0,0 @@ -// Script will skip the postinstall script if `SKIP_POSTINSTALL` env variable is set -if (process.env.SKIP_POSTINSTALL) { - process.exit(0); -} else { - process.exit(1); -} diff --git a/tests/docker-scripts/Dockerfile b/tests/docker-scripts/Dockerfile index 95493843be..bc2e796ef8 100644 --- a/tests/docker-scripts/Dockerfile +++ b/tests/docker-scripts/Dockerfile @@ -4,7 +4,7 @@ FROM alpine AS copy-packages WORKDIR /work/ COPY . /tmp/web-client-ui -COPY package.json package-lock.json skip.js ./ +COPY package.json package-lock.json ./ # cd first so the cp doesn't include /tmp/web-client-ui in the paths RUN cd /tmp/web-client-ui && cp --parents ./packages/*/package.json /work/ @@ -50,9 +50,8 @@ COPY --from=copy-packages /work/ . # Confirm node version is correct for debugging RUN node --version -# Disable the postinstall script, or npm ci will try and build and the files won't be there -# We don't need the postinstall since we're going to rebuild right after -RUN SKIP_POSTINSTALL=1 npm ci +# Install npm packages +RUN npm ci # Copy the web-client-ui src folder to the docker image # We do this last because the source files are the most likely to change