Skip to content

Commit 7702b09

Browse files
author
Feiyang Liu
committed
update patches to fix build error
1 parent 4d57f08 commit 7702b09

18 files changed

+182
-270
lines changed

package-lock-overrides/sagemaker.series/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock-overrides/web-embedded-with-terminal.series/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock-overrides/web-embedded.series/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock-overrides/web-server.series/package-lock.json

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
Index: third-party-src/extensions/shared.webpack.config.mjs
2+
===================================================================
3+
--- third-party-src.orig/extensions/shared.webpack.config.mjs
4+
+++ third-party-src/extensions/shared.webpack.config.mjs
5+
@@ -17,6 +17,7 @@ const require = createRequire(import.met
6+
const tsLoaderOptions = {
7+
compilerOptions: {
8+
'sourceMap': true,
9+
+ 'rootDir': '.',
10+
},
11+
onlyCompileBundledFiles: true,
12+
};

patches/common/replace-gulp-untar.diff

Lines changed: 7 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -11,68 +11,21 @@ Index: third-party-src/build/lib/util.ts
1111

1212
const root = path.dirname(path.dirname(import.meta.dirname));
1313

14-
@@ -379,53 +381,38 @@ export function getElectronVersion(): Re
15-
return { electronVersion, msBuildId };
14+
@@ -429,3 +431,39 @@ export class VinylStat implements fs.Sta
15+
isFIFO(): boolean { return false; }
16+
isSocket(): boolean { return false; }
1617
}
17-
18-
-export class VinylStat implements fs.Stats {
18+
+
1919
+export function untar(): Transform {
2020
+ return es.through(function (this: through.ThroughStream, f: VinylFile) {
2121
+ if (!f.contents || !Buffer.isBuffer(f.contents)) {
2222
+ this.emit('error', new Error('Expected file with Buffer contents'));
2323
+ return;
2424
+ }
25-
26-
- readonly dev: number;
27-
- readonly ino: number;
28-
- readonly mode: number;
29-
- readonly nlink: number;
30-
- readonly uid: number;
31-
- readonly gid: number;
32-
- readonly rdev: number;
33-
- readonly size: number;
34-
- readonly blksize: number;
35-
- readonly blocks: number;
36-
- readonly atimeMs: number;
37-
- readonly mtimeMs: number;
38-
- readonly ctimeMs: number;
39-
- readonly birthtimeMs: number;
40-
- readonly atime: Date;
41-
- readonly mtime: Date;
42-
- readonly ctime: Date;
43-
- readonly birthtime: Date;
44-
-
45-
- constructor(stat: Partial<fs.Stats>) {
46-
- this.dev = stat.dev ?? 0;
47-
- this.ino = stat.ino ?? 0;
48-
- this.mode = stat.mode ?? 0;
49-
- this.nlink = stat.nlink ?? 0;
50-
- this.uid = stat.uid ?? 0;
51-
- this.gid = stat.gid ?? 0;
52-
- this.rdev = stat.rdev ?? 0;
53-
- this.size = stat.size ?? 0;
54-
- this.blksize = stat.blksize ?? 0;
55-
- this.blocks = stat.blocks ?? 0;
56-
- this.atimeMs = stat.atimeMs ?? 0;
57-
- this.mtimeMs = stat.mtimeMs ?? 0;
58-
- this.ctimeMs = stat.ctimeMs ?? 0;
59-
- this.birthtimeMs = stat.birthtimeMs ?? 0;
60-
- this.atime = stat.atime ?? new Date(0);
61-
- this.mtime = stat.mtime ?? new Date(0);
62-
- this.ctime = stat.ctime ?? new Date(0);
63-
- this.birthtime = stat.birthtime ?? new Date(0);
64-
- }
25+
+
6526
+ const self = this;
6627
+ const parser = new tar.Parser();
67-
68-
- isFile(): boolean { return true; }
69-
- isDirectory(): boolean { return false; }
70-
- isBlockDevice(): boolean { return false; }
71-
- isCharacterDevice(): boolean { return false; }
72-
- isSymbolicLink(): boolean { return false; }
73-
- isFIFO(): boolean { return false; }
74-
- isSocket(): boolean { return false; }
75-
-}
28+
+
7629
+ parser.on('entry', (entry: tar.ReadEntry) => {
7730
+ if (entry.type === 'File') {
7831
+ const chunks: Buffer[] = [];
@@ -165,7 +118,7 @@ Index: third-party-src/build/gulpfile.reh.ts
165118
import File from 'vinyl';
166119
import * as fs from 'fs';
167120
import glob from 'glob';
168-
@@ -236,14 +236,14 @@ function nodejs(platform: string, arch:
121+
@@ -246,14 +246,14 @@ function nodejs(platform: string, arch:
169122
return (product.nodejsRepository !== 'https://nodejs.org' ?
170123
fetchGithub(product.nodejsRepository, { version: `${nodeVersion}-${internalNodeVersion}`, name: expectedName!, checksumSha256 }) :
171124
fetchUrls(`/dist/v${nodeVersion}/node-v${nodeVersion}-${platform}-${arch}.tar.gz`, { base: 'https://nodejs.org', checksumSha256 })

patches/sagemaker.series

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ common/proposed-api.diff
1717
common/build.diff
1818
common/integration.diff
1919
common/replace-gulp-untar.diff
20+
common/fix-ts-rootdir-webpack.diff
2021
web-server/suppress-known-errors-build-integration.diff
2122
web-server/local-storage.diff
2223
web-server/base-path.diff

patches/sagemaker/post-startup-notifications.diff

Lines changed: 21 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -736,50 +736,41 @@ Index: code-editor-src/extensions/post-startup-notifications/extension-browser.w
736736
===================================================================
737737
--- /dev/null
738738
+++ code-editor-src/extensions/post-startup-notifications/extension-browser.webpack.config.js
739-
@@ -0,0 +1,17 @@
739+
@@ -0,0 +1,13 @@
740740
+/*---------------------------------------------------------------------------------------------
741741
+ * Copyright Amazon.com Inc. or its affiliates. All rights reserved.
742742
+ * Licensed under the MIT License. See License.txt in the project root for license information.
743743
+ *--------------------------------------------------------------------------------------------*/
744-
+
745-
+//@ts-check
746-
+
747-
+'use strict';
748-
+
749-
+const withBrowserDefaults = require('../shared.webpack.config').browser;
750-
+
751-
+module.exports = withBrowserDefaults({
752-
+ context: __dirname,
753-
+ entry: {
754-
+ extension: './src/extension.ts'
755-
+ },
744+
+// @ts-check
745+
+import { browser as withBrowserDefaults } from '../shared.webpack.config.mjs';
746+
+
747+
+export default withBrowserDefaults({
748+
+ context: import.meta.dirname,
749+
+ entry: {
750+
+ extension: './src/extension.ts'
751+
+ },
756752
+});
757753
Index: code-editor-src/extensions/post-startup-notifications/extension.webpack.config.js
758754
===================================================================
759755
--- /dev/null
760756
+++ code-editor-src/extensions/post-startup-notifications/extension.webpack.config.js
761-
@@ -0,0 +1,20 @@
757+
@@ -0,0 +1,16 @@
762758
+/*---------------------------------------------------------------------------------------------
763759
+ * Copyright Amazon.com Inc. or its affiliates. All rights reserved.
764760
+ * Licensed under the MIT License. See License.txt in the project root for license information.
765761
+ *--------------------------------------------------------------------------------------------*/
766-
+
767-
+//@ts-check
768-
+
769-
+'use strict';
770-
+
771-
+const withDefaults = require('../shared.webpack.config');
772-
+
773-
+module.exports = withDefaults({
774-
+ context: __dirname,
775-
+ resolve: {
776-
+ mainFields: ['module', 'main']
777-
+ },
778-
+ entry: {
779-
+ extension: './src/extension.ts',
780-
+ }
762+
+// @ts-check
763+
+import withDefaults from '../shared.webpack.config.mjs';
764+
+
765+
+export default withDefaults({
766+
+ context: import.meta.dirname,
767+
+ resolve: {
768+
+ mainFields: ['module', 'main']
769+
+ },
770+
+ entry: {
771+
+ extension: './src/extension.ts',
772+
+ }
781773
+});
782-
\ No newline at end of file
783774
Index: code-editor-src/build/gulpfile.extensions.ts
784775
===================================================================
785776
--- code-editor-src.orig/build/gulpfile.extensions.ts

patches/sagemaker/sagemaker-extension.diff

Lines changed: 19 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -328,48 +328,40 @@ Index: third-party-src/extensions/sagemaker-extension/extension-browser.webpack.
328328
===================================================================
329329
--- /dev/null
330330
+++ third-party-src/extensions/sagemaker-extension/extension-browser.webpack.config.js
331-
@@ -0,0 +1,17 @@
331+
@@ -0,0 +1,13 @@
332332
+/*---------------------------------------------------------------------------------------------
333333
+ * Copyright Amazon.com Inc. or its affiliates. All rights reserved.
334334
+ * Licensed under the MIT License. See License.txt in the project root for license information.
335335
+ *--------------------------------------------------------------------------------------------*/
336+
+// @ts-check
337+
+import { browser as withBrowserDefaults } from '../shared.webpack.config.mjs';
336338
+
337-
+//@ts-check
338-
+
339-
+'use strict';
340-
+
341-
+const withBrowserDefaults = require('../shared.webpack.config').browser;
342-
+
343-
+module.exports = withBrowserDefaults({
344-
+ context: __dirname,
345-
+ entry: {
346-
+ extension: './src/extension.ts'
347-
+ },
339+
+export default withBrowserDefaults({
340+
+ context: import.meta.dirname,
341+
+ entry: {
342+
+ extension: './src/extension.ts'
343+
+ },
348344
+});
349345
Index: third-party-src/extensions/sagemaker-extension/extension.webpack.config.js
350346
===================================================================
351347
--- /dev/null
352348
+++ third-party-src/extensions/sagemaker-extension/extension.webpack.config.js
353-
@@ -0,0 +1,20 @@
349+
@@ -0,0 +1,16 @@
354350
+/*---------------------------------------------------------------------------------------------
355351
+ * Copyright Amazon.com Inc. or its affiliates. All rights reserved.
356352
+ * Licensed under the MIT License. See License.txt in the project root for license information.
357353
+ *--------------------------------------------------------------------------------------------*/
354+
+// @ts-check
355+
+import withDefaults from '../shared.webpack.config.mjs';
358356
+
359-
+//@ts-check
360-
+
361-
+'use strict';
362-
+
363-
+const withDefaults = require('../shared.webpack.config');
364-
+
365-
+module.exports = withDefaults({
366-
+ context: __dirname,
367-
+ resolve: {
368-
+ mainFields: ['module', 'main']
369-
+ },
370-
+ entry: {
371-
+ extension: './src/extension.ts',
372-
+ }
357+
+export default withDefaults({
358+
+ context: import.meta.dirname,
359+
+ resolve: {
360+
+ mainFields: ['module', 'main']
361+
+ },
362+
+ entry: {
363+
+ extension: './src/extension.ts',
364+
+ }
373365
+});
374366
Index: third-party-src/extensions/sagemaker-extension/src/constant.ts
375367
===================================================================

0 commit comments

Comments
 (0)