@atlaspack/cli 2.13.7-dev.55 → 2.13.7-dev.72

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,50 @@
1
1
  # @atlaspack/cli
2
2
 
3
+ ## 2.13.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`73ea3c4`](https://github.com/atlassian-labs/atlaspack/commit/73ea3c4d85d4401fdd15abcbf988237e890e7ad3), [`b1b3693`](https://github.com/atlassian-labs/atlaspack/commit/b1b369317c66f8a431c170df2ebba4fa5b2e38ef)]:
8
+ - @atlaspack/feature-flags@2.17.0
9
+ - @atlaspack/config-default@3.1.13
10
+ - @atlaspack/core@2.18.2
11
+ - @atlaspack/fs@2.15.6
12
+ - @atlaspack/utils@2.14.11
13
+ - @atlaspack/reporter-cli@2.15.7
14
+ - @atlaspack/package-manager@2.14.11
15
+ - @atlaspack/reporter-dev-server@2.14.11
16
+ - @atlaspack/reporter-tracer@2.14.11
17
+
18
+ ## 2.13.14
19
+
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies []:
23
+ - @atlaspack/config-default@3.1.12
24
+
25
+ ## 2.13.13
26
+
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies []:
30
+ - @atlaspack/config-default@3.1.11
31
+ - @atlaspack/core@2.18.1
32
+
33
+ ## 2.13.12
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies [[`0999fb7`](https://github.com/atlassian-labs/atlaspack/commit/0999fb78da519a6c7582d212883e515fcf6c1252), [`51aba5f`](https://github.com/atlassian-labs/atlaspack/commit/51aba5fc0e49235ee06bbc3c376f48c3e7da5c4b), [`1e32d4e`](https://github.com/atlassian-labs/atlaspack/commit/1e32d4eae6b3af3968e8a0ef97d35b4347fd4196), [`0b2f6f5`](https://github.com/atlassian-labs/atlaspack/commit/0b2f6f55794d3ff6e2f5a41f963e7e5dd8ad9f8d), [`6dd4ccb`](https://github.com/atlassian-labs/atlaspack/commit/6dd4ccb753541de32322d881f973d571dd57e4ca)]:
38
+ - @atlaspack/fs@2.15.5
39
+ - @atlaspack/core@2.18.0
40
+ - @atlaspack/package-manager@2.14.10
41
+ - @atlaspack/reporter-cli@2.15.6
42
+ - @atlaspack/reporter-dev-server@2.14.10
43
+ - @atlaspack/config-default@3.1.10
44
+ - @atlaspack/logger@2.14.10
45
+ - @atlaspack/utils@2.14.10
46
+ - @atlaspack/reporter-tracer@2.14.10
47
+
3
48
  ## 2.13.11
4
49
 
5
50
  ### Patch Changes
package/lib/bin.js CHANGED
@@ -1,7 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  'use strict';
3
3
 
4
- if (process.env.ATLASPACK_BUILD_ENV !== 'production' || process.env.ATLASPACK_SELF_BUILD) {
5
- require('@atlaspack/babel-register');
6
- }
7
4
  require('./cli');
package/lib/cli.js CHANGED
@@ -116,14 +116,30 @@ command) {
116
116
  entries = ['.'];
117
117
  }
118
118
  entries = entries.map(entry => _path().default.resolve(entry));
119
- let Atlaspack = require('@atlaspack/core').default;
120
119
  let fs = new (_fs().NodeFS)();
120
+ let Atlaspack = require('@atlaspack/core').default;
121
121
  let options = await (0, _normalizeOptions.normalizeOptions)(command, fs);
122
122
  let atlaspack = new Atlaspack({
123
123
  entries,
124
- defaultConfig: require.resolve('@atlaspack/config-default', {
125
- paths: [fs.cwd(), __dirname]
126
- }),
124
+ defaultConfig: (() => {
125
+ if ((0, _core().isSuperPackage)()) {
126
+ // We're in the super package so resolve the inbuilt config
127
+ let inbuiltDefaultConfig = _path().default.join( /*#__ATLASPACK_IGNORE__*/__dirname, '../../configs/default/index.json.js');
128
+ if (!fs.existsSync(inbuiltDefaultConfig)) {
129
+ throw new Error(`Missing inbuilt default config. Expected '${inbuiltDefaultConfig}' to exist`);
130
+ }
131
+ return inbuiltDefaultConfig;
132
+ }
133
+ for (let path of [fs.cwd(), __dirname]) {
134
+ let customRequire = require('module').createRequire(path);
135
+ try {
136
+ return customRequire.resolve('@atlaspack/config-default');
137
+ } catch (e) {
138
+ // Ignore error
139
+ }
140
+ }
141
+ throw new Error(`Can't resolve default config`);
142
+ })(),
127
143
  shouldPatchConsole: false,
128
144
  ...options
129
145
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaspack/cli",
3
- "version": "2.13.7-dev.55+5a11f33c5",
3
+ "version": "2.13.7-dev.72+9840480de",
4
4
  "description": "Blazing fast, zero configuration web application bundler",
5
5
  "license": "(MIT OR Apache-2.0)",
6
6
  "type": "commonjs",
@@ -24,18 +24,18 @@
24
24
  "node": ">= 16.0.0"
25
25
  },
26
26
  "dependencies": {
27
- "@atlaspack/config-default": "3.1.5-dev.55+5a11f33c5",
28
- "@atlaspack/core": "2.16.2-dev.55+5a11f33c5",
29
- "@atlaspack/diagnostic": "2.14.1-dev.123+5a11f33c5",
30
- "@atlaspack/events": "2.14.1-dev.123+5a11f33c5",
31
- "@atlaspack/feature-flags": "2.14.1-dev.123+5a11f33c5",
32
- "@atlaspack/fs": "2.14.5-dev.55+5a11f33c5",
33
- "@atlaspack/logger": "2.14.5-dev.55+5a11f33c5",
34
- "@atlaspack/package-manager": "2.14.5-dev.55+5a11f33c5",
35
- "@atlaspack/reporter-cli": "2.15.1-dev.55+5a11f33c5",
36
- "@atlaspack/reporter-dev-server": "2.14.5-dev.55+5a11f33c5",
37
- "@atlaspack/reporter-tracer": "2.14.5-dev.55+5a11f33c5",
38
- "@atlaspack/utils": "2.14.5-dev.55+5a11f33c5",
27
+ "@atlaspack/config-default": "3.1.5-dev.72+9840480de",
28
+ "@atlaspack/core": "2.16.2-dev.72+9840480de",
29
+ "@atlaspack/diagnostic": "2.14.1-dev.140+9840480de",
30
+ "@atlaspack/events": "2.14.1-dev.140+9840480de",
31
+ "@atlaspack/feature-flags": "2.14.1-dev.140+9840480de",
32
+ "@atlaspack/fs": "2.14.5-dev.72+9840480de",
33
+ "@atlaspack/logger": "2.14.5-dev.72+9840480de",
34
+ "@atlaspack/package-manager": "2.14.5-dev.72+9840480de",
35
+ "@atlaspack/reporter-cli": "2.15.1-dev.72+9840480de",
36
+ "@atlaspack/reporter-dev-server": "2.14.5-dev.72+9840480de",
37
+ "@atlaspack/reporter-tracer": "2.14.5-dev.72+9840480de",
38
+ "@atlaspack/utils": "2.14.5-dev.72+9840480de",
39
39
  "chalk": "^4.1.0",
40
40
  "commander": "^7.0.0",
41
41
  "get-port": "^4.2.0"
@@ -45,5 +45,5 @@
45
45
  "@babel/core": "^7.22.11",
46
46
  "rimraf": "^5.0.5"
47
47
  },
48
- "gitHead": "5a11f33c51ff74d1cf8d4b72cfa0fda833aa980a"
48
+ "gitHead": "9840480de27511f558d8f5b8cf82220de977b4fb"
49
49
  }
package/src/cli.js CHANGED
@@ -1,6 +1,6 @@
1
1
  // @flow
2
2
 
3
- import {BuildError} from '@atlaspack/core';
3
+ import {BuildError, isSuperPackage} from '@atlaspack/core';
4
4
  import {NodeFS} from '@atlaspack/fs';
5
5
  import {openInBrowser} from '@atlaspack/utils';
6
6
  import {Disposable} from '@atlaspack/events';
@@ -132,14 +132,39 @@ async function run(
132
132
 
133
133
  entries = entries.map((entry) => path.resolve(entry));
134
134
 
135
- let Atlaspack = require('@atlaspack/core').default;
136
135
  let fs = new NodeFS();
136
+
137
+ const resolveDefaultConfig = () => {
138
+ if (isSuperPackage()) {
139
+ // We're in the super package so resolve the inbuilt config
140
+ let inbuiltDefaultConfig = path.join(
141
+ /*#__ATLASPACK_IGNORE__*/ __dirname,
142
+ '../../configs/default/index.json.js',
143
+ );
144
+ if (!fs.existsSync(inbuiltDefaultConfig)) {
145
+ throw new Error(
146
+ `Missing inbuilt default config. Expected '${inbuiltDefaultConfig}' to exist`,
147
+ );
148
+ }
149
+ return inbuiltDefaultConfig;
150
+ }
151
+
152
+ for (let path of [fs.cwd(), __dirname]) {
153
+ let customRequire = require('module').createRequire(path);
154
+ try {
155
+ return customRequire.resolve('@atlaspack/config-default');
156
+ } catch (e) {
157
+ // Ignore error
158
+ }
159
+ }
160
+ throw new Error(`Can't resolve default config`);
161
+ };
162
+
163
+ let Atlaspack = require('@atlaspack/core').default;
137
164
  let options = await normalizeOptions(command, fs);
138
165
  let atlaspack = new Atlaspack({
139
166
  entries,
140
- defaultConfig: require.resolve('@atlaspack/config-default', {
141
- paths: [fs.cwd(), __dirname],
142
- }),
167
+ defaultConfig: resolveDefaultConfig(),
143
168
  shouldPatchConsole: false,
144
169
  ...options,
145
170
  });