@graphcommerce/next-config 9.0.4-canary.9 → 9.0.4
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 +7 -17
- package/__tests__/commands/copyFiles.ts +5 -8
- package/__tests__/config/utils/__snapshots__/mergeEnvIntoConfig.ts.snap +905 -0
- package/__tests__/config/utils/mergeEnvIntoConfig.ts +2 -9
- package/__tests__/config/utils/rewriteLegancyEnv.ts +0 -1
- package/__tests__/interceptors/findPlugins.ts +0 -1
- package/__tests__/interceptors/generateInterceptors.ts +0 -1
- package/__tests__/utils/resolveDependenciesSync.ts +0 -1
- package/dist/commands/codegen.js +3 -3
- package/dist/commands/copyFiles.js +7 -12
- package/dist/commands/copyRoutes.js +20 -0
- package/dist/config/commands/generateConfig.js +2 -1
- package/dist/config/utils/mergeEnvIntoConfig.js +3 -1
- package/dist/generated/config.js +15 -20
- package/dist/interceptors/writeInterceptors.js +1 -1
- package/package.json +1 -3
- package/src/commands/codegen.ts +3 -3
- package/src/commands/copyFiles.ts +7 -14
- package/src/config/commands/generateConfig.ts +2 -1
- package/src/config/utils/mergeEnvIntoConfig.ts +3 -1
- package/src/generated/config.ts +245 -299
- package/src/interceptors/Visitor.ts +1 -1
- package/src/interceptors/findOriginalSource.ts +1 -1
- package/src/interceptors/writeInterceptors.ts +1 -1
- package/src/utils/resolveDependenciesSync.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,28 +1,18 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 9.0.4
|
|
3
|
+
## 9.0.4
|
|
4
4
|
|
|
5
|
-
## 9.0.
|
|
5
|
+
## 9.0.3
|
|
6
6
|
|
|
7
|
-
## 9.0.
|
|
7
|
+
## 9.0.3-canary.0
|
|
8
8
|
|
|
9
|
-
## 9.0.
|
|
9
|
+
## 9.0.2
|
|
10
10
|
|
|
11
|
-
## 9.0.
|
|
11
|
+
## 9.0.2-canary.0
|
|
12
12
|
|
|
13
|
-
## 9.0.
|
|
13
|
+
## 9.0.1
|
|
14
14
|
|
|
15
|
-
## 9.0.
|
|
16
|
-
|
|
17
|
-
## 9.0.4-canary.2
|
|
18
|
-
|
|
19
|
-
## 9.0.4-canary.1
|
|
20
|
-
|
|
21
|
-
## 9.0.4-canary.0
|
|
22
|
-
|
|
23
|
-
### Patch Changes
|
|
24
|
-
|
|
25
|
-
- [#2472](https://github.com/graphcommerce-org/graphcommerce/pull/2472) [`905157b`](https://github.com/graphcommerce-org/graphcommerce/commit/905157bec2c9e1dcf51b6e6f7b6913aa9be7b609) - Solve issue with chalk compilation because we’re not migrated to esm modules. ([@paales](https://github.com/paales))
|
|
15
|
+
## 9.0.1-canary.1
|
|
26
16
|
|
|
27
17
|
## 9.0.0
|
|
28
18
|
|
|
@@ -31,7 +31,6 @@ global.performance = { now: mockPerformanceNow } as unknown as typeof performanc
|
|
|
31
31
|
|
|
32
32
|
// Mock process.cwd
|
|
33
33
|
const mockCwd = '/mock/cwd'
|
|
34
|
-
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
35
34
|
const originalCwd = process.cwd
|
|
36
35
|
beforeAll(() => {
|
|
37
36
|
process.cwd = jest.fn().mockReturnValue(mockCwd)
|
|
@@ -43,7 +42,6 @@ afterAll(() => {
|
|
|
43
42
|
|
|
44
43
|
describe('copyFiles', () => {
|
|
45
44
|
let consoleLog: jest.SpyInstance
|
|
46
|
-
let consoleInfo: jest.SpyInstance
|
|
47
45
|
let consoleError: jest.SpyInstance
|
|
48
46
|
let processExit: jest.SpyInstance
|
|
49
47
|
let originalDebug: string | undefined
|
|
@@ -59,7 +57,6 @@ describe('copyFiles', () => {
|
|
|
59
57
|
]),
|
|
60
58
|
)
|
|
61
59
|
consoleLog = jest.spyOn(console, 'log').mockImplementation(() => {})
|
|
62
|
-
consoleInfo = jest.spyOn(console, 'info').mockImplementation(() => {})
|
|
63
60
|
consoleError = jest.spyOn(console, 'error').mockImplementation(() => {})
|
|
64
61
|
processExit = jest.spyOn(process, 'exit').mockImplementation(() => undefined as never)
|
|
65
62
|
|
|
@@ -208,7 +205,7 @@ describe('copyFiles', () => {
|
|
|
208
205
|
expect(writeCall).toBeTruthy()
|
|
209
206
|
const content = writeCall[1].toString()
|
|
210
207
|
expect(content).toContain('new content')
|
|
211
|
-
expect(
|
|
208
|
+
expect(consoleLog).toHaveBeenCalledWith('Updated managed file: file.ts')
|
|
212
209
|
})
|
|
213
210
|
|
|
214
211
|
it('should create new files with management comments', async () => {
|
|
@@ -230,7 +227,7 @@ describe('copyFiles', () => {
|
|
|
230
227
|
|
|
231
228
|
await copyFiles()
|
|
232
229
|
|
|
233
|
-
expect(
|
|
230
|
+
expect(consoleLog).toHaveBeenCalledWith(
|
|
234
231
|
'Creating new file: new-file.ts\nSource: packages/package1/copy/new-file.ts',
|
|
235
232
|
)
|
|
236
233
|
expect(fs.writeFile).toHaveBeenCalledWith(path.join(mockCwd, 'new-file.ts'), expect.any(Buffer))
|
|
@@ -377,8 +374,8 @@ describe('copyFiles', () => {
|
|
|
377
374
|
|
|
378
375
|
await copyFiles()
|
|
379
376
|
|
|
380
|
-
expect(
|
|
381
|
-
expect(
|
|
377
|
+
expect(consoleLog).toHaveBeenCalledWith('[copy-files]', 'Starting copyFiles')
|
|
378
|
+
expect(consoleLog).toHaveBeenCalledWith('[copy-files]', expect.stringContaining('Found'))
|
|
382
379
|
})
|
|
383
380
|
|
|
384
381
|
it('should handle unmanaged files', async () => {
|
|
@@ -400,7 +397,7 @@ describe('copyFiles', () => {
|
|
|
400
397
|
|
|
401
398
|
await copyFiles()
|
|
402
399
|
|
|
403
|
-
expect(
|
|
400
|
+
expect(consoleLog).toHaveBeenCalledWith(
|
|
404
401
|
expect.stringContaining('Note: File file.ts has been modified'),
|
|
405
402
|
)
|
|
406
403
|
})
|