Skip to content

Commit

Permalink
chore(release): 1.8.0 (#1773)
Browse files Browse the repository at this point in the history
  • Loading branch information
mergify[bot] authored Jul 2, 2020
2 parents 179a3a5 + 7c7a2ad commit 4a047ac
Show file tree
Hide file tree
Showing 62 changed files with 2,745 additions and 1,183 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ dist/
*.tsbuildinfo
*.tabl.json
*.swp
*.snk
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [1.8.0](https://github.com/aws/jsii/compare/v1.7.0...v1.8.0) (2020-07-02)


### Bug Fixes

* **kernel:** tarball unpacking does not behave like 'npm install' ([#1766](https://github.com/aws/jsii/issues/1766)) ([2dc1b21](https://github.com/aws/jsii/commit/2dc1b2127295c7b91e95571e6cba246785d98ea3)), closes [aws/aws-cdk#8233](https://github.com/aws/aws-cdk/issues/8233) [#1765](https://github.com/aws/jsii/issues/1765)
* **python:** relative import missing for kwargs types ([#1768](https://github.com/aws/jsii/issues/1768)) ([c174ac5](https://github.com/aws/jsii/commit/c174ac5822d9923c904ec38b3f7d0513310ef973))

## [1.7.0](https://github.com/aws/jsii/compare/v1.6.0...v1.7.0) (2020-06-18)


Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
"rejectCycles": true
}
},
"version": "1.7.0"
"version": "1.8.0"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.34.0",
"@typescript-eslint/parser": "^2.34.0",
"eslint": "^7.2.0",
"eslint": "^7.3.1",
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-typescript": "^2.0.0",
"eslint-plugin-import": "^2.21.2",
"eslint-plugin-import": "^2.22.0",
"lerna": "^3.22.1",
"standard-version": "^8.0.0"
},
Expand Down
4 changes: 2 additions & 2 deletions packages/@jsii/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

<PackageReference Update="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="3.6.0" />
<PackageReference Update="Microsoft.Extensions.DependencyInjection" Version="3.1.5" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="3.1.4" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="3.1.4" />
<PackageReference Update="Microsoft.Extensions.Logging" Version="3.1.5" />
<PackageReference Update="Microsoft.Extensions.Logging.Console" Version="3.1.5" />

<PackageReference Update="Microsoft.NET.Test.Sdk" Version="16.6.1" />
<PackageReference Update="NSubstitute" Version="4.2.2" />
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/dotnet-runtime-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"@types/node": "^10.17.26",
"jsii-calc": "^0.0.0",
"jsii-pacmak": "^0.0.0",
"typescript": "~3.9.5"
"typescript": "~3.9.6"
}
}
4 changes: 2 additions & 2 deletions packages/@jsii/dotnet-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"devDependencies": {
"@jsii/runtime": "^0.0.0",
"@types/node": "^10.17.26",
"@types/semver": "^7.2.0",
"@types/semver": "^7.3.1",
"jsii-build-tools": "^0.0.0",
"semver": "^7.3.2",
"typescript": "~3.9.5"
"typescript": "~3.9.6"
}
}
8 changes: 4 additions & 4 deletions packages/@jsii/integ-test/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@octokit/rest": "^18.0.0",
"dotenv": "^8.2.0",
"fs-extra": "^9.0.1",
"jest": "^26.0.1",
"jest": "^26.1.0",
"jsii": "^0.0.0",
"jsii-pacmak": "^0.0.0",
"jsii-rosetta": "^0.0.0",
Expand All @@ -29,14 +29,14 @@
"devDependencies": {
"@types/dotenv": "^8.2.0",
"@types/fs-extra": "^8.1.0",
"@types/jest": "^26.0.0",
"@types/jest": "^26.0.3",
"@types/node": "^10.17.26",
"@types/tar": "^4.0.3",
"eslint": "^7.2.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"prettier": "^1.19.1",
"typescript": "~3.9.5"
"typescript": "~3.9.6"
},
"jest": {
"errorOnDeprecated": true,
Expand Down
2 changes: 1 addition & 1 deletion packages/@jsii/java-runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"@jsii/runtime": "^0.0.0",
"@types/node": "^10.17.26",
"jsii-build-tools": "^0.0.0",
"typescript": "~3.9.5"
"typescript": "~3.9.6"
}
}
25 changes: 17 additions & 8 deletions packages/@jsii/kernel/lib/kernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,23 @@ export class Kernel {

// Create the install directory (there may be several path components for @scoped/packages)
fs.mkdirpSync(packageDir);
// untar the archive to its final location
tar.extract({
strict: true,
file: req.tarball,
cwd: packageDir,
strip: 1, // Removes the 'package/' path element from entries
sync: true,
});

// Force umask to have npm-install-like permissions
const originalUmask = process.umask(0o022);
try {
// untar the archive to its final location
tar.extract({
cwd: packageDir,
file: req.tarball,
strict: true,
strip: 1, // Removes the 'package/' path element from entries
sync: true,
unlink: true,
});
} finally {
// Reset umask to the initial value
process.umask(originalUmask);
}

// read .jsii metadata from the root of the package
const jsiiMetadataFile = path.join(packageDir, spec.SPEC_FILE_NAME);
Expand Down
8 changes: 4 additions & 4 deletions packages/@jsii/kernel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,19 +40,19 @@
"@scope/jsii-calc-base": "^0.0.0",
"@scope/jsii-calc-lib": "^0.0.0",
"@types/fs-extra": "^8.1.0",
"@types/jest": "^26.0.0",
"@types/jest": "^26.0.3",
"@types/jest-expect-message": "^1.0.2",
"@types/node": "^10.17.26",
"@types/tar": "^4.0.3",
"eslint": "^7.2.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.0.1",
"jest": "^26.1.0",
"jest-expect-message": "^1.0.2",
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^0.0.0",
"prettier": "^1.19.1",
"typescript": "~3.9.5"
"typescript": "~3.9.6"
},
"jest": {
"collectCoverage": true,
Expand Down
22 changes: 22 additions & 0 deletions packages/@jsii/kernel/test/kernel.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,28 @@ defineTest.skip = function (
return defineTest(name, method, test.skip);
};

test('load preserves file permissions', async () => {
// Changing the umask to 077 (which would neutralize group/other permissions)
const originalUmask = process.umask(0o077);

try {
const kernel = await createCalculatorSandbox(
'load_preserves_file_permissions',
);

const result = kernel.sinvoke({
fqn: 'jsii-calc.UmaskCheck',
method: 'mode',
});
expect(result.result).toBe(0o644);

return closeRecording(kernel);
} finally {
// Restore the original umask
process.umask(originalUmask);
}
});

defineTest('stats() return sandbox statistics', (sandbox) => {
const stats = sandbox.stats({});
expect(stats.objectCount).toBe(0);
Expand Down
12 changes: 6 additions & 6 deletions packages/@jsii/runtime/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,21 +40,21 @@
"devDependencies": {
"@scope/jsii-calc-base": "^0.0.0",
"@scope/jsii-calc-lib": "^0.0.0",
"@types/jest": "^26.0.0",
"@types/jest": "^26.0.3",
"@types/node": "^10.17.26",
"eslint": "^7.2.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.0.1",
"jest": "^26.1.0",
"jsii-build-tools": "^0.0.0",
"jsii-calc": "^0.0.0",
"prettier": "^1.19.1",
"source-map": "^0.7.3",
"source-map-loader": "^1.0.0",
"typescript": "~3.9.5",
"source-map-loader": "^1.0.1",
"typescript": "~3.9.6",
"wasm-loader": "^1.3.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.11"
"webpack-cli": "^3.3.12"
},
"jest": {
"collectCoverage": true,
Expand Down
8 changes: 4 additions & 4 deletions packages/@jsii/spec/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,15 +34,15 @@
"jsonschema": "^1.2.6"
},
"devDependencies": {
"@types/jest": "^26.0.0",
"@types/jest": "^26.0.3",
"@types/node": "^10.17.26",
"eslint": "^7.2.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.0.1",
"jest": "^26.1.0",
"jsii-build-tools": "^0.0.0",
"prettier": "^1.19.1",
"typescript": "~3.9.5",
"typescript": "~3.9.6",
"typescript-json-schema": "^0.42.0"
},
"jest": {
Expand Down
3 changes: 2 additions & 1 deletion packages/codemaker/lib/case-utils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import * as camelcase from 'camelcase';
import * as decamelize from 'decamelize';
// eslint-disable-next-line @typescript-eslint/no-require-imports
import decamelize = require('decamelize');

const COMMON_ABBREVIATIONS = ['KiB', 'MiB', 'GiB'];

Expand Down
11 changes: 5 additions & 6 deletions packages/codemaker/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,19 @@
},
"dependencies": {
"camelcase": "^6.0.0",
"decamelize": "^1.2.0",
"decamelize": "^4.0.0",
"fs-extra": "^9.0.1"
},
"devDependencies": {
"@types/decamelize": "^1.2.0",
"@types/fs-extra": "^8.1.0",
"@types/jest": "^26.0.0",
"@types/jest": "^26.0.3",
"@types/node": "^10.17.26",
"eslint": "^7.2.0",
"eslint": "^7.3.1",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.4",
"jest": "^26.0.1",
"jest": "^26.1.0",
"prettier": "^2.0.5",
"typescript": "~3.9.5"
"typescript": "~3.9.6"
},
"jest": {
"collectCoverage": true,
Expand Down
17 changes: 17 additions & 0 deletions packages/jsii-calc/lib/compliance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2502,3 +2502,20 @@ export abstract class Isomorphism {
return this;
}
}

/**
* Checks the current file permissions are cool (no funky UMASK down-scoping happened)
*
* @see https://github.com/aws/jsii/issues/1765
*/
export class UmaskCheck {
/**
* This should return 0o644 (-rw-r--r--)
*/
public static mode(): number {
// The bit-masking is to remove the file type information from .mode
return fs.statSync(__filename).mode & 0o0777;
}

private constructor() {}
}
4 changes: 2 additions & 2 deletions packages/jsii-calc/lib/submodule/my-class.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { nested_submodule } from './nested_submodule';
import { Awesomeness, Goodness } from './child';
import { Awesomeness, Goodness, SomeStruct } from './child';
import { AllTypes } from '..';

export class MyClass implements nested_submodule.deeplyNested.INamespaced {
Expand All @@ -8,5 +8,5 @@ export class MyClass implements nested_submodule.deeplyNested.INamespaced {
public readonly awesomeness = Awesomeness.AWESOME;
public allTypes?: AllTypes;

public constructor() { }
public constructor(public readonly props: SomeStruct) { }
}
60 changes: 58 additions & 2 deletions packages/jsii-calc/test/assembly.jsii
Original file line number Diff line number Diff line change
Expand Up @@ -11869,6 +11869,40 @@
}
]
},
"jsii-calc.UmaskCheck": {
"assembly": "jsii-calc",
"docs": {
"see": "https://github.com/aws/jsii/issues/1765",
"stability": "experimental",
"summary": "Checks the current file permissions are cool (no funky UMASK down-scoping happened)."
},
"fqn": "jsii-calc.UmaskCheck",
"kind": "class",
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2511
},
"methods": [
{
"docs": {
"stability": "experimental",
"summary": "This should return 0o644 (-rw-r--r--)."
},
"locationInModule": {
"filename": "lib/compliance.ts",
"line": 2515
},
"name": "mode",
"returns": {
"type": {
"primitive": "number"
}
},
"static": true
}
],
"name": "UmaskCheck"
},
"jsii-calc.UnaryOperation": {
"abstract": true,
"assembly": "jsii-calc",
Expand Down Expand Up @@ -12755,7 +12789,15 @@
"initializer": {
"docs": {
"stability": "experimental"
}
},
"parameters": [
{
"name": "props",
"type": {
"fqn": "jsii-calc.submodule.child.SomeStruct"
}
}
]
},
"interfaces": [
"jsii-calc.submodule.nested_submodule.deeplyNested.INamespaced"
Expand Down Expand Up @@ -12811,6 +12853,20 @@
"fqn": "jsii-calc.submodule.child.Goodness"
}
},
{
"docs": {
"stability": "experimental"
},
"immutable": true,
"locationInModule": {
"filename": "lib/submodule/my-class.ts",
"line": 11
},
"name": "props",
"type": {
"fqn": "jsii-calc.submodule.child.SomeStruct"
}
},
{
"docs": {
"stability": "experimental"
Expand Down Expand Up @@ -13162,5 +13218,5 @@
}
},
"version": "0.0.0",
"fingerprint": "miVjqwWxNOLMY7fR23c/SVvfiGqkgqLgG+18qp4f8MM="
"fingerprint": "5Tv5ECDhqPZgUeGoaL8LTa8pvOZnosdszen+rYjvQ8s="
}
Loading

0 comments on commit 4a047ac

Please sign in to comment.