Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(eslint-plugin): rule against invalid paths #28828

Merged
merged 19 commits into from
Feb 2, 2024
Merged
Show file tree
Hide file tree
Changes from 11 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
2 changes: 1 addition & 1 deletion packages/@aws-cdk/app-staging-synthesizer-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ import { Asset } from 'aws-cdk-lib/aws-s3-assets';
declare const stack: Stack;
const asset = new Asset(stack, 'deploy-time-asset', {
deployTime: true,
path: path.join(__dirname, './deploy-time-asset'),
path: path.join(__dirname, 'deploy-time-asset'),
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ describe(AppStagingSynthesizer, () => {
region: 'us-east-1',
},
});
stack.node.setContext()
kaizencc marked this conversation as resolved.
Show resolved Hide resolved
});

test('stack template is in asset manifest', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-amplify-alpha/test/branch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ test('with env vars', () => {
test('with asset deployment', () => {
// WHEN
const asset = new Asset(app, 'SampleAsset', {
path: path.join(__dirname, './test-asset'),
path: path.join(__dirname, 'test-asset'),
});
app.addBranch('dev', { asset });

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class TestStack extends Stack {
super(scope, id, props);

const asset = new Asset(this, 'SampleAsset', {
path: path.join(__dirname, './test-asset'),
path: path.join(__dirname, 'test-asset'),
});

const amplifyApp = new amplify.App(this, 'App', {});
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-apprunner-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ You can specify whether to enable continuous integration from the source reposit
import * as assets from 'aws-cdk-lib/aws-ecr-assets';

const imageAsset = new assets.DockerImageAsset(this, 'ImageAssets', {
directory: path.join(__dirname, './docker.assets'),
directory: path.join(__dirname, 'docker.assets'),
});
new apprunner.Service(this, 'Service', {
source: apprunner.Source.fromAsset({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const stack = new cdk.Stack(app, 'integ-apprunner');

// Scenario 3: Create the service from local code assets
const imageAsset = new assets.DockerImageAsset(stack, 'ImageAssets', {
directory: path.join(__dirname, './docker.assets'),
directory: path.join(__dirname, 'docker.assets'),
});
const service3 = new Service(stack, 'Service3', {
source: Source.fromAsset({
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-apprunner-alpha/test/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ test('create a service with local assets(image repository type: ECR)', () => {
const stack = new cdk.Stack(app, 'demo-stack');
// WHEN
const dockerAsset = new ecr_assets.DockerImageAsset(stack, 'Assets', {
directory: path.join(__dirname, './docker.assets'),
directory: path.join(__dirname, 'docker.assets'),
});
new apprunner.Service(stack, 'DemoService', {
source: apprunner.Source.fromAsset({
Expand Down Expand Up @@ -864,7 +864,7 @@ test('custom IAM access role and instance role are allowed', () => {
const stack = new cdk.Stack(app, 'demo-stack');
// WHEN
const dockerAsset = new ecr_assets.DockerImageAsset(stack, 'Assets', {
directory: path.join(__dirname, './docker.assets'),
directory: path.join(__dirname, 'docker.assets'),
});
new apprunner.Service(stack, 'DemoService', {
source: apprunner.Source.fromAsset({
Expand Down Expand Up @@ -1177,7 +1177,7 @@ test('autoDeploymentsEnabled flag is set true', () => {
const stack = new cdk.Stack(app, 'demo-stack');
// WHEN
const dockerAsset = new ecr_assets.DockerImageAsset(stack, 'Assets', {
directory: path.join(__dirname, './docker.assets'),
directory: path.join(__dirname, 'docker.assets'),
});
new apprunner.Service(stack, 'DemoService', {
source: apprunner.Source.fromAsset({
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-gamelift-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ match is made after 30 seconds, gradually relax the skill requirements.
```ts
new gamelift.MatchmakingRuleSet(this, 'RuleSet', {
matchmakingRuleSetName: 'my-test-ruleset',
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset/ruleset.json')),
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset', 'ruleset.json')),
});
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TestStack extends cdk.Stack {

const ruleSet = new gamelift.MatchmakingRuleSet(this, 'MatchmakingRuleSet', {
matchmakingRuleSetName: 'my-test-ruleset',
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset/ruleset.json')),
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset', 'ruleset.json')),
});

new CfnOutput(this, 'MatchmakingRuleSetArn', { value: ruleSet.matchmakingRuleSetArn });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TestStack extends cdk.Stack {

const ruleSet = new gamelift.MatchmakingRuleSet(this, 'QueuedMatchmakingConfiguration', {
matchmakingRuleSetName: 'my-test-ruleset',
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset/ruleset.json')),
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset', 'ruleset.json')),
});

const build = new gamelift.Build(this, 'Build', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TestStack extends cdk.Stack {

const ruleSet = new gamelift.MatchmakingRuleSet(this, 'StandaloneMatchmakingConfiguration', {
matchmakingRuleSetName: 'my-test-ruleset',
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset/ruleset.json')),
content: gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset', 'ruleset.json')),
});

const matchmakingConfiguration = new gamelift.StandaloneMatchmakingConfiguration(this, 'MyStandaloneMatchmakingConfiguration', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ describe('MatchmakingRuleSetBody', () => {

describe('gamelift.MatchmakingRuleSetBody.fromJsonFile', () => {
test('new RuleSetBody from Json file', () => {
const ruleSet = gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset/ruleset.json'));
const ruleSet = gamelift.RuleSetContent.fromJsonFile(path.join(__dirname, 'my-ruleset', 'ruleset.json'));
const content = ruleSet.bind(stack);
const result = JSON.parse(fs.readFileSync(path.join(__dirname, 'my-ruleset/ruleset.json')).toString());
const result = JSON.parse(fs.readFileSync(path.join(__dirname, 'my-ruleset', 'ruleset.json')).toString());
expect(content.ruleSetBody).toEqual(JSON.stringify(result));
});

test('fails if file not exist', () => {
const content = path.join(__dirname, 'my-ruleset/file-not-exist.json');
const content = path.join(__dirname, 'my-ruleset', 'file-not-exist.json');
expect(() => gamelift.RuleSetContent.fromJsonFile(content))
.toThrow(`RuleSet path does not exist, please verify it, actual ${content}`);
});
Expand Down
6 changes: 3 additions & 3 deletions packages/@aws-cdk/aws-glue-alpha/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ new glue.Job(this, 'PythonSparkStreamingJob', {
executable: glue.JobExecutable.pythonStreaming({
glueVersion: glue.GlueVersion.V4_0,
pythonVersion: glue.PythonVersion.THREE,
script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),
script: glue.Code.fromAsset(path.join(__dirname, 'job-script', 'hello_world.py')),
}),
description: 'an example Python Streaming job',
});
Expand Down Expand Up @@ -97,7 +97,7 @@ new glue.Job(this, 'RayJob', {
glueVersion: glue.GlueVersion.V4_0,
pythonVersion: glue.PythonVersion.THREE_NINE,
runtime: glue.Runtime.RAY_TWO_FOUR,
script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),
script: glue.Code.fromAsset(path.join(__dirname, 'job-script', 'hello_world.py')),
}),
workerType: glue.WorkerType.Z_2X,
workerCount: 2,
Expand All @@ -118,7 +118,7 @@ new glue.Job(this, 'EnableSparkUI', {
executable: glue.JobExecutable.pythonEtl({
glueVersion: glue.GlueVersion.V3_0,
pythonVersion: glue.PythonVersion.THREE,
script: glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py')),
script: glue.Code.fromAsset(path.join(__dirname, 'job-script', 'hello_world.py')),
}),
});
```
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-glue-alpha/test/code.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ describe('Code', () => {
});

describe('.fromAsset()', () => {
const filePath = path.join(__dirname, 'job-script/hello_world.py');
const filePath = path.join(__dirname, 'job-script', 'hello_world.py');
const directoryPath = path.join(__dirname, 'job-script');

beforeEach(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const app = new cdk.App();

const stack = new cdk.Stack(app, 'aws-glue-job-python-shell');

const script = glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py'));
const script = glue.Code.fromAsset(path.join(__dirname, 'job-script', 'hello_world.py'));

new glue.Job(stack, 'ShellJob', {
jobName: 'ShellJob',
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-glue-alpha/test/integ.job.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const app = new cdk.App();

const stack = new cdk.Stack(app, 'aws-glue-job');

const script = glue.Code.fromAsset(path.join(__dirname, 'job-script/hello_world.py'));
const script = glue.Code.fromAsset(path.join(__dirname, 'job-script', 'hello_world.py'));

[glue.GlueVersion.V2_0, glue.GlueVersion.V3_0, glue.GlueVersion.V4_0].forEach((glueVersion) => {
const etlJob = new glue.Job(stack, 'EtlJob' + glueVersion.name, {
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-go-alpha/lib/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export class Bundling implements cdk.BundlingOptions {
// Docker bundling
const shouldBuildImage = props.forcedDockerBundling || !Bundling.runsLocally;
this.image = shouldBuildImage
? props.dockerImage ?? cdk.DockerImage.fromBuild(path.join(__dirname, '../lib'), {
? props.dockerImage ?? cdk.DockerImage.fromBuild(path.join(__dirname, '..', 'lib'), {
buildArgs: {
...props.buildArgs ?? {},
IMAGE: Runtime.GO_1_X.bundlingImage.image, // always use the GO_1_X build image
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-go-alpha/test/docker.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from 'path';

const docker = process.env.CDK_DOCKER ?? 'docker';
beforeAll(() => {
spawnSync(docker, ['build', '-t', 'golang', path.join(__dirname, '../lib')]);
spawnSync(docker, ['build', '-t', 'golang', path.join(__dirname, '..', 'lib')]);
});

test('golang is available', async () => {
Expand Down
20 changes: 10 additions & 10 deletions packages/@aws-cdk/aws-lambda-go-alpha/test/function.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ beforeEach(() => {
test('GoFunction with defaults', () => {
// WHEN
new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
});

expect(Bundling.bundle).toHaveBeenCalledWith(expect.objectContaining({
Expand All @@ -43,7 +43,7 @@ test('GoFunction with defaults', () => {
test('GoFunction with using provided runtime', () => {
// WHEN
new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
runtime: Runtime.PROVIDED,
});

Expand All @@ -60,7 +60,7 @@ test('GoFunction with using provided runtime', () => {
test('GoFunction with using golang runtime', () => {
// WHEN
new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
runtime: Runtime.GO_1_X,
});

Expand All @@ -77,7 +77,7 @@ test('GoFunction with using golang runtime', () => {
test('GoFunction with container env vars', () => {
// WHEN
new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
bundling: {
environment: {
KEY: 'VALUE',
Expand All @@ -94,7 +94,7 @@ test('GoFunction with container env vars', () => {

test('throws with the wrong runtime family', () => {
expect(() => new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
runtime: Runtime.PYTHON_3_8,
})).toThrow(/Only `go` and `provided` runtimes are supported/);
});
Expand All @@ -112,21 +112,21 @@ test('resolves entry to an absolute path', () => {

test('throws with no existing go.mod file', () => {
expect(() => new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
moduleDir: '/does/not/exist/go.mod',
})).toThrow(/go.mod file at \/does\/not\/exist\/go.mod doesn't exist/);
});

test('throws with incorrect moduleDir file', () => {
expect(() => new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
moduleDir: '/does/not/exist.mod',
})).toThrow(/moduleDir is specifying a file that is not go.mod/);
});

test('custom moduleDir can be used', () => {
new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
moduleDir: path.join(__dirname, 'lambda-handler-vendor'),
});

Expand All @@ -137,8 +137,8 @@ test('custom moduleDir can be used', () => {

test('custom moduleDir with file path can be used', () => {
new GoFunction(stack, 'handler', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
moduleDir: path.join(__dirname, 'lambda-handler-vendor/go.mod'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
moduleDir: path.join(__dirname, 'lambda-handler-vendor', 'go.mod'),
});

Template.fromStack(stack).hasResourceProperties('AWS::Lambda::Function', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class TestStack extends Stack {
super(scope, id, props);

new lambda.GoFunction(this, 'go-handler-docker', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
runtime: Runtime.PROVIDED_AL2023,
bundling: {
forcedDockerBundling: true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class TestStack extends Stack {
super(scope, id, props);

new lambda.GoFunction(this, 'go-handler-docker', {
entry: path.join(__dirname, 'lambda-handler-vendor/cmd/api'),
entry: path.join(__dirname, 'lambda-handler-vendor', 'cmd', 'api'),
bundling: {
forcedDockerBundling: true,
goBuildFlags: ['-mod=readonly', '-ldflags "-s -w"'],
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/aws-lambda-python-alpha/lib/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export class Bundling implements CdkBundlingOptions {
assetExcludes,
});

this.image = image ?? DockerImage.fromBuild(path.join(__dirname, '../lib'), {
this.image = image ?? DockerImage.fromBuild(path.join(__dirname, '..', 'lib'), {
buildArgs: {
...props.buildArgs,
IMAGE: runtime.bundlingImage.image,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ test('Bundling a function without dependencies', () => {
}),
}));

expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(path.join(__dirname, '../lib')), expect.objectContaining({
expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(path.join(__dirname, '..', 'lib')), expect.objectContaining({
buildArgs: expect.objectContaining({
IMAGE: expect.stringMatching(/build-python/),
}),
Expand Down Expand Up @@ -394,7 +394,7 @@ test('Bundling with custom build args', () => {
buildArgs: { PIP_INDEX_URL: testPypi },
});

expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(path.join(__dirname, '../lib')), expect.objectContaining({
expect(DockerImage.fromBuild).toHaveBeenCalledWith(expect.stringMatching(path.join(__dirname, '..', 'lib')), expect.objectContaining({
buildArgs: expect.objectContaining({
PIP_INDEX_URL: testPypi,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ beforeEach(() => {
});

test('Bundling a layer from files', () => {
const entry = path.join(__dirname, 'test/lambda-handler-project');
const entry = path.join(__dirname, 'test', 'lambda-handler-project');
new PythonLayerVersion(stack, 'layer', {
entry,
});
Expand Down
2 changes: 1 addition & 1 deletion packages/@aws-cdk/integ-runner/lib/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ export async function main(args: string[]) {
return;
}

const pool = workerpool.pool(path.join(__dirname, '../lib/workers/extract/index.js'), {
const pool = workerpool.pool(path.join(__dirname, '..', 'lib', 'workers', 'extract', 'index.js'), {
maxWorkers: options.watch ? 1 : options.maxWorkers,
});

Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-eks/lib/cluster.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1967,7 +1967,7 @@ export class Cluster extends ClusterBase {
*/
private addNeuronDevicePlugin() {
if (!this._neuronDevicePlugin) {
const fileContents = fs.readFileSync(path.join(__dirname, 'addons/neuron-device-plugin.yaml'), 'utf8');
const fileContents = fs.readFileSync(path.join(__dirname, 'addons', 'neuron-device-plugin.yaml'), 'utf8');
const sanitized = YAML.parse(fileContents);
this._neuronDevicePlugin = this.addManifest('NeuronDevicePlugin', sanitized);
}
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-lambda-nodejs/lib/bundling.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export class Bundling implements cdk.BundlingOptions {

// Docker bundling
const shouldBuildImage = props.forceDockerBundling || !Bundling.esbuildInstallation;
this.image = shouldBuildImage ? props.dockerImage ?? cdk.DockerImage.fromBuild(path.join(__dirname, '../lib'),
this.image = shouldBuildImage ? props.dockerImage ?? cdk.DockerImage.fromBuild(path.join(__dirname, '..', 'lib'),
{
buildArgs: {
...props.buildArgs ?? {},
Expand Down
3 changes: 2 additions & 1 deletion packages/aws-cdk-lib/cx-api/build-tools/update-vnext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ import { MAGIC_V2NEXT } from '../lib/private/flag-modeling';
async function main() {
const featuresSourceFile = path.join(__dirname, '..', 'lib', 'features.ts');

let currentv2: string | undefined = JSON.parse(await fs.readFile(path.join(__dirname, '../../../../version.v2.json'), { encoding: 'utf-8' })).version;
// eslint-disable-next-line @aws-cdk/no-invalid-path
let currentv2: string | undefined = JSON.parse(await fs.readFile(path.join(__dirname, '..', '..', '..', '..', 'version.v2.json'), { encoding: 'utf-8' })).version;
currentv2 = currentv2?.match(/^[0-9\.]+/)?.[0]; // Make sure to only retain the actual version number, not any '-rc.X' suffix

if (!currentv2) {
Expand Down
1 change: 1 addition & 0 deletions tools/@aws-cdk/cdk-build-tools/config/eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ module.exports = {
'@aws-cdk/no-core-construct': ['error'],
'@aws-cdk/invalid-cfn-imports': ['error'],
'@aws-cdk/no-literal-partition': ['error'],
'@aws-cdk/no-invalid-path': [ 'error' ],
// Require use of the `import { foo } from 'bar';` form instead of `import foo = require('bar');`
'@typescript-eslint/no-require-imports': ['error'],
'@typescript-eslint/indent': ['error', 2],
Expand Down
2 changes: 2 additions & 0 deletions tools/@aws-cdk/cdk-build-tools/lib/package-info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ export function packageCompiler(compilers: CompilerOverrides, options?: CDKBuild
args.push('--compress-assembly');
}
if (options?.stripDeprecated) {
// This package is not published to npm so the linter rule is invalid
// eslint-disable-next-line @aws-cdk/no-invalid-path
args.push(`--strip-deprecated ${path.join(__dirname, '..', '..', '..', '..', 'deprecated_apis.txt')}`);
}
return [compilers.jsii || require.resolve('jsii/bin/jsii'), ...args];
Expand Down
Loading
Loading