Skip to content
Closed
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
6 changes: 5 additions & 1 deletion .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@ runs:
node-version: ${{ inputs.node-version }}
node-version-file: .nvmrc

- name: Enable Corepack
run: corepack enable
shell: bash

- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash

# We only store yarn cache on main to save cache space
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,6 @@ debug-symbols/
/databases

mocha-cpu-profiles/
*.trace
*.trace

.yarn/install-state.gz
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
registry=https://registry.yarnpkg.com
registry=https://registry.npmjs.org/
11 changes: 11 additions & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
enableScripts: true

nodeLinker: node-modules

npmRegistryServer: 'https://registry.npmjs.org'

npmScopes:
atlassian:
npmRegistryServer: 'https://packages.atlassian.com/artifactory/api/npm/atlassian-npm'
atlassiansox:
npmRegistryServer: 'https://packages.atlassian.com/artifactory/api/npm/atlassian-npm-sox'
4 changes: 2 additions & 2 deletions benchmarks/three-js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@
"start:v3:plugins": "env ATLASPACK_BENCH_MODE=V3 ATLASPACK_BENCH_PLUGINS=10 node ./scripts/build.mjs"
},
"dependencies": {
"@atlaspack/cli": "*",
"@atlaspack/config-default": "*",
"@atlaspack/core": "*",
"@atlaspack/plugin": "*",
"@atlaspack/cli": "*",
"@oclif/table": "0.3.3",
"@swc/helpers": "*",
"chalk": "*"
"chalk": "^4.1.2"
}
}
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,12 +78,13 @@
"@compiled/parcel-transformer": "^0.19.0",
"@napi-rs/cli": "2.18.3",
"@sentry/cli": "^2.45.0",
"@types/lru-cache": "^7.10.10",
"@types/mocha": "^10.0.10",
"@types/node": ">= 18",
"@types/sinon": "^17.0.4",
"@typescript-eslint/eslint-plugin": "^8.31.1",
"@typescript-eslint/parser": "^8.31.1",
"buffer": "mischnic/buffer#b8a4fa94",
"buffer": "mischnic/buffer#b8a4fa94c96973a5321a95c75e0b16967f0745f3",
"cross-env": "^7.0.0",
"eslint": "^8.57.0",
"glob": "^7.1.6",
Expand Down Expand Up @@ -116,10 +117,10 @@
"*.{json,md}": "prettier --write",
"*.rs": "rustfmt"
},
"packageManager": "yarn@1.22.19",
"packageManager": "yarn@4.12.0",
"browser": {
"react-dom": "preact/compat",
"react": "preact/compat",
"react-dom": "preact/compat",
"scheduler": false
},
"dependencies": {
Expand Down
4 changes: 1 addition & 3 deletions packages/apvm/apvm-linux-amd64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"x86_64-unknown-linux-gnu"
]
},
"bin": {
"apvm-linux-amd64": "apvm-linux-amd64"
},
"bin": "apvm-linux-amd64",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/apvm/apvm-linux-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"aarch64-unknown-linux-gnu"
]
},
"bin": {
"apvm-linux-arm64": "apvm-linux-arm64"
},
"bin": "apvm-linux-arm64",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/apvm/apvm-macos-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"aarch64-apple-darwin"
]
},
"bin": {
"apvm-macos-arm64": "apvm-macos-arm64"
},
"bin": "apvm-macos-arm64",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 1 addition & 3 deletions packages/apvm/apvm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
"version": "0.0.9",
"license": "(MIT OR Apache-2.0)",
"type": "commonjs",
"bin": {
"apvm": "apvm.mjs"
},
"bin": "apvm.mjs",
"publishConfig": {
"access": "public"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/bundlers/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,16 @@
"node": ">= 16.0.0"
},
"dependencies": {
"@atlaspack/types-internal": "2.22.6",
"@atlaspack/diagnostic": "2.14.4",
"@atlaspack/feature-flags": "2.27.7",
"@atlaspack/graph": "3.6.11",
"@atlaspack/plugin": "2.14.49",
"@atlaspack/rust": "3.19.0",
"@atlaspack/types-internal": "2.22.6",
"@atlaspack/utils": "3.3.1",
"@types/sorted-array-functions": "^1.0.0",
"nullthrows": "^1.1.1",
"many-keys-map": "^1.0.3",
"nullthrows": "^1.1.1",
"sorted-array-functions": "^1.0.0"
},
"scripts": {
Expand Down
62 changes: 30 additions & 32 deletions packages/core/atlaspack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,7 @@
"type": "git",
"url": "https://github.com/atlassian-labs/atlaspack.git"
},
"bin": {
"atlaspack": "./static/cli/index.js"
},
"bin": "./static/cli/index.js",
"main": "./static/core/index.js",
"types": "./static/core/index.d.ts",
"files": [
Expand Down Expand Up @@ -146,44 +144,33 @@
}
},
"dependencies": {
"@atlaspack/babel-plugin-transform-contextual-imports": "2.16.2",
"@atlaspack/babel-plugin-transform-runtime": "2.14.4",
"@atlaspack/babel-preset-env": "2.14.4",
"@atlaspack/build-cache": "2.13.8",
"@atlaspack/bundler-default": "3.4.21",
"@atlaspack/bundler-library": "2.12.51",
"@atlaspack/cache": "3.2.44",
"@atlaspack/cli": "2.15.10",
"@atlaspack/codeframe": "2.13.31",
"@atlaspack/compressor-brotli": "2.13.51",
"@atlaspack/compressor-gzip": "2.13.51",
"@atlaspack/compressor-raw": "2.13.51",
"@atlaspack/conditional-import-types": "2.13.9",
"@atlaspack/config-default": "12.0.3",
"@atlaspack/config-webextension": "12.0.3",
"@atlaspack/core": "2.31.3",
"@atlaspack/diagnostic": "2.14.4",
"@atlaspack/domain-sharding": "2.14.4",
"@atlaspack/events": "2.14.4",
"@atlaspack/feature-flags": "2.27.7",
"@atlaspack/fs": "2.15.44",
"@atlaspack/graph": "3.6.11",
"@atlaspack/logger": "2.14.41",
"@atlaspack/markdown-ansi": "2.14.4",
"@atlaspack/package-manager": "2.14.49",
"@atlaspack/plugin": "2.14.49",
"@atlaspack/profiler": "2.15.10",
"@atlaspack/rust": "3.19.0",
"@atlaspack/types-internal": "2.22.6",
"@atlaspack/types": "2.15.39",
"@atlaspack/utils": "3.3.1",
"@atlaspack/workers": "2.14.49",
"@atlaspack/watcher-watchman-js": "2.14.49",
"@atlaspack/babel-plugin-transform-contextual-imports": "2.16.2",
"@atlaspack/babel-plugin-transform-runtime": "2.14.4",
"@atlaspack/babel-preset-env": "2.14.4",
"@atlaspack/swc-plugin-contextual-imports": "2.14.4",
"@atlaspack/domain-sharding": "2.14.4",
"@atlaspack/events": "2.14.4",
"@atlaspack/macros": "2.14.4",
"@atlaspack/node-resolver-core": "3.7.20",
"@atlaspack/service-worker": "2.14.4",
"@atlaspack/bundler-default": "3.4.21",
"@atlaspack/bundler-library": "2.12.51",
"@atlaspack/compressor-brotli": "2.13.51",
"@atlaspack/compressor-gzip": "2.13.51",
"@atlaspack/compressor-raw": "2.13.51",
"@atlaspack/config-default": "12.0.3",
"@atlaspack/config-webextension": "12.0.3",
"@atlaspack/markdown-ansi": "2.14.4",
"@atlaspack/namer-default": "2.14.49",
"@atlaspack/node-resolver-core": "3.7.20",
"@atlaspack/optimizer-blob-url": "2.14.49",
"@atlaspack/optimizer-css": "2.15.10",
"@atlaspack/optimizer-cssnano": "2.15.10",
Expand All @@ -194,16 +181,19 @@
"@atlaspack/optimizer-svgo": "2.14.49",
"@atlaspack/optimizer-swc": "2.15.10",
"@atlaspack/optimizer-terser": "2.15.10",
"@atlaspack/package-manager": "2.14.49",
"@atlaspack/packager-css": "2.15.10",
"@atlaspack/packager-html": "2.15.31",
"@atlaspack/packager-js": "2.24.10",
"@atlaspack/packager-raw-url": "2.14.49",
"@atlaspack/packager-raw": "2.14.49",
"@atlaspack/packager-raw-url": "2.14.49",
"@atlaspack/packager-svg": "2.14.49",
"@atlaspack/packager-ts": "2.14.49",
"@atlaspack/packager-wasm": "2.14.49",
"@atlaspack/packager-webextension": "2.14.49",
"@atlaspack/packager-xml": "2.14.49",
"@atlaspack/plugin": "2.14.49",
"@atlaspack/profiler": "2.15.10",
"@atlaspack/reporter-build-metrics": "2.14.49",
"@atlaspack/reporter-bundle-analyzer": "2.14.49",
"@atlaspack/reporter-bundle-buddy": "2.14.49",
Expand All @@ -222,14 +212,17 @@
"@atlaspack/runtime-react-refresh": "2.16.6",
"@atlaspack/runtime-service-worker": "2.15.6",
"@atlaspack/runtime-webextension": "2.15.6",
"@atlaspack/rust": "3.19.0",
"@atlaspack/service-worker": "2.14.4",
"@atlaspack/swc-plugin-contextual-imports": "2.14.4",
"@atlaspack/transformer-babel": "2.15.10",
"@atlaspack/transformer-css": "2.15.10",
"@atlaspack/transformer-glsl": "2.14.49",
"@atlaspack/transformer-graphql": "2.14.49",
"@atlaspack/transformer-html": "2.15.26",
"@atlaspack/transformer-image": "12.0.3",
"@atlaspack/transformer-inline-string": "2.14.49",
"@atlaspack/transformer-inline": "2.14.49",
"@atlaspack/transformer-inline-string": "2.14.49",
"@atlaspack/transformer-js": "12.1.1",
"@atlaspack/transformer-json": "2.14.49",
"@atlaspack/transformer-jsonld": "2.14.49",
Expand All @@ -241,8 +234,8 @@
"@atlaspack/transformer-raw": "2.14.49",
"@atlaspack/transformer-react-refresh-wrap": "2.15.25",
"@atlaspack/transformer-sass": "2.15.10",
"@atlaspack/transformer-svg-react": "2.14.49",
"@atlaspack/transformer-svg": "2.14.49",
"@atlaspack/transformer-svg-react": "2.14.49",
"@atlaspack/transformer-toml": "2.14.49",
"@atlaspack/transformer-typescript-tsc": "2.15.10",
"@atlaspack/transformer-typescript-types": "2.15.10",
Expand All @@ -251,8 +244,13 @@
"@atlaspack/transformer-worklet": "2.14.49",
"@atlaspack/transformer-xml": "2.14.49",
"@atlaspack/transformer-yaml": "2.14.49",
"@atlaspack/types": "2.15.39",
"@atlaspack/types-internal": "2.22.6",
"@atlaspack/utils": "3.3.1",
"@atlaspack/validator-eslint": "2.14.49",
"@atlaspack/validator-typescript": "2.14.49"
"@atlaspack/validator-typescript": "2.14.49",
"@atlaspack/watcher-watchman-js": "2.14.49",
"@atlaspack/workers": "2.14.49"
},
"scripts": {
"dev:prepare": "node ./scripts/dev-prepare.mjs",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/cli/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@
"@atlaspack/reporter-dev-server": "2.14.49",
"@atlaspack/reporter-tracer": "2.14.49",
"@atlaspack/utils": "3.3.1",
"chalk": "^4.1.0",
"chalk": "^4.1.2",
"commander": "^7.0.0",
"get-port": "^4.2.0"
},
"devDependencies": {
"@babel/core": "^7.22.11",
"@atlaspack/babel-register": "2.14.4",
"@babel/core": "^7.22.11",
"rimraf": "^5.0.5"
}
}
2 changes: 1 addition & 1 deletion packages/core/codeframe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
},
"dependencies": {
"@atlaspack/types-internal": "2.22.6",
"chalk": "^4.1.0",
"chalk": "^4.1.2",
"emphasize": "^4.2.0",
"slice-ansi": "^4.0.0",
"string-width": "^4.2.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/core/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"build:lib": "gulp build --gulpfile ../../../gulpfile.js --cwd ."
},
"dependencies": {
"@mischnic/json-sourcemap": "^0.1.0",
"@atlaspack/build-cache": "2.13.8",
"@atlaspack/cache": "3.2.44",
"@atlaspack/diagnostic": "2.14.4",
Expand All @@ -35,10 +34,11 @@
"@atlaspack/plugin": "2.14.49",
"@atlaspack/profiler": "2.15.10",
"@atlaspack/rust": "3.19.0",
"@atlaspack/source-map": "3.2.4",
"@atlaspack/types": "2.15.39",
"@atlaspack/utils": "3.3.1",
"@atlaspack/workers": "2.14.49",
"@atlaspack/source-map": "3.2.4",
"@mischnic/json-sourcemap": "^0.1.0",
"base-x": "^3.0.8",
"browserslist": "^4.6.6",
"clone": "^2.1.1",
Expand All @@ -52,9 +52,9 @@
"devDependencies": {
"@atlaspack/babel-register": "2.14.4",
"@types/node": ">= 18",
"rfdc": "1",
"jest-diff": "*",
"graphviz": "^0.0.9",
"jest-diff": "*",
"rfdc": "1",
"tempy": "^0.2.1"
},
"browser": {
Expand Down
15 changes: 14 additions & 1 deletion packages/core/core/src/RequestTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1038,8 +1038,18 @@ export class RequestGraph extends ContentGraph<

let _filePath = toProjectPath(options.projectRoot, _path);
let filePath = fromProjectPathRelative(_filePath);

// If the file is an .env file, we should ignore it here and let the env invalidation
// logic handle it. This ensures that we only invalidate if the env vars actually
// changed.
if (path.basename(_path).startsWith('.env')) {
continue;
}

let hasFileRequest = this.hasContentKey(filePath);

// If we see a 'create' event for the project root itself,

// If we see a 'create' event for the project root itself,
// this means the project root was moved and we need to
// re-run all requests.
Expand Down Expand Up @@ -1303,7 +1313,10 @@ export default class RequestTracker {
contentKey: ContentKey,
ifMatch?: string,
): Promise<T | null | undefined> {
let node = nullthrows(this.graph.getNodeByContentKey(contentKey));
let node = this.graph.getNodeByContentKey(contentKey);
if (!node) {
return undefined;
}
invariant(node.type === REQUEST);

if (ifMatch != null && node.resultCacheKey !== ifMatch) {
Expand Down
1 change: 1 addition & 0 deletions packages/core/core/src/loadDotEnv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type {FileSystem} from '@atlaspack/fs';
import type {EnvMap, FilePath} from '@atlaspack/types';

import {resolveConfig} from '@atlaspack/utils';
// @ts-expect-error - JB; just getting yarn upgrade working
import dotenv from 'dotenv';
import variableExpansion from 'dotenv-expand';

Expand Down
6 changes: 3 additions & 3 deletions packages/core/core/src/public/BundleGraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ type BundleFactory<TBundle extends IBundle> = (
arg3: AtlaspackOptions,
) => TBundle;

export default class BundleGraph<TBundle extends IBundle>
implements IBundleGraph<TBundle>
{
export default class BundleGraph<
TBundle extends IBundle,
> implements IBundleGraph<TBundle> {
#graph: InternalBundleGraph;
#options: AtlaspackOptions;
#createBundle: BundleFactory<TBundle>;
Expand Down
Loading
Loading