Skip to content

Commit 1baf968

Browse files
committed
Repackage action following typescript bump
GitHub downloads each action run in a workflow during runtime and executes it as a complete package of code before you can use workflow commands like run to interact with the runner machine. This means that we must provide all JavaScript package dependencies as part of the distributed action in order for it to be usable in workflows. A naive approach to doing this is checking in the `node_modules` folder. However, this approach results in a huge amount of frequently changing external content being included in the repository, much of which is not even part of the executed program. A far better approach is to use the excellent ncc tool to compile the program, including all the relevant code from the dependencies, into a single file. We use a "continuous packaging" approach, where the packaged action code that is generated via ncc is always kept in sync with the development source code and dependencies. This allows a beta version of the action to be easily used in workflows by beta testers or those who need changes not in the release simply by using the name of the branch as the action ref (e.g., `uses: arduino/arduino-lint-action@main` will cause the version of the action from the tip of the `main` branch to be used by the workflow run). The update of the package dependency results in a change to the packaged code, so the packaging is here updated accordingly.
1 parent 0d37e78 commit 1baf968

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

dist/index.js

+34-14
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
3737
}) : function(o, v) {
3838
o["default"] = v;
3939
});
40-
var __importStar = (this && this.__importStar) || function (mod) {
41-
if (mod && mod.__esModule) return mod;
42-
var result = {};
43-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
44-
__setModuleDefault(result, mod);
45-
return result;
46-
};
40+
var __importStar = (this && this.__importStar) || (function () {
41+
var ownKeys = function(o) {
42+
ownKeys = Object.getOwnPropertyNames || function (o) {
43+
var ar = [];
44+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
45+
return ar;
46+
};
47+
return ownKeys(o);
48+
};
49+
return function (mod) {
50+
if (mod && mod.__esModule) return mod;
51+
var result = {};
52+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
53+
__setModuleDefault(result, mod);
54+
return result;
55+
};
56+
})();
4757
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
4858
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4959
return new (P || (P = Promise))(function (resolve, reject) {
@@ -278,13 +288,23 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
278288
}) : function(o, v) {
279289
o["default"] = v;
280290
});
281-
var __importStar = (this && this.__importStar) || function (mod) {
282-
if (mod && mod.__esModule) return mod;
283-
var result = {};
284-
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
285-
__setModuleDefault(result, mod);
286-
return result;
287-
};
291+
var __importStar = (this && this.__importStar) || (function () {
292+
var ownKeys = function(o) {
293+
ownKeys = Object.getOwnPropertyNames || function (o) {
294+
var ar = [];
295+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
296+
return ar;
297+
};
298+
return ownKeys(o);
299+
};
300+
return function (mod) {
301+
if (mod && mod.__esModule) return mod;
302+
var result = {};
303+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
304+
__setModuleDefault(result, mod);
305+
return result;
306+
};
307+
})();
288308
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
289309
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
290310
return new (P || (P = Promise))(function (resolve, reject) {

0 commit comments

Comments
 (0)